Skip to content

Change Proof inner representation from Vec<u32> to Vec<u8>#3289

Merged
vbar merged 1 commit intoeqlabs:mainfrom
m-kus:fix/proof-type
Mar 24, 2026
Merged

Change Proof inner representation from Vec<u32> to Vec<u8>#3289
vbar merged 1 commit intoeqlabs:mainfrom
m-kus:fix/proof-type

Conversation

@m-kus
Copy link
Copy Markdown
Contributor

@m-kus m-kus commented Mar 23, 2026

Summary

Changes the inner representation of the Proof type from Vec<u32> to Vec<u8> across RPC,
gateway, and P2P layers.

Rationale

The proof is now compressed before being attached to the transaction, making it an opaque byte blob
rather than a sequence of u32 values. This was a last-minute change on the gateway side.

Spec references:

Changes

  • crates/common/src/lib.rsProof(Vec<u32>)Proof(Vec<u8>); simplified serde to direct
    base64 encode/decode (no more u32 packing, no multiple-of-4 validation)
  • crates/rpc/src/dto/primitives.rs — removed intermediate u32 → big-endian bytes conversion
    step in DTO serialization
  • crates/p2p_proto/proto/transaction.protorepeated uint32 proofbytes proof in
    InvokeV3WithProof
  • crates/p2p_proto/src/transaction.rsproof: Vec<u32>proof: Vec<u8>
  • crates/rpc/fixtures/0.10.0/broadcasted_transactions.json — updated expected base64 value

Notes

  • RPC wire format is still a base64 string — no change for clients sending raw byte payloads
  • P2P wire format is a breaking change (repeated uint32bytes)
  • The proof field remains transient: accepted from clients, forwarded to the sequencer, propagated
    via mempool/consensus P2P, but never stored in the DB or included in the transaction hash (only
    proof_facts are)

@m-kus m-kus requested a review from a team as a code owner March 23, 2026 16:06
Copy link
Copy Markdown
Member

@CHr15F0x CHr15F0x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM mod the changelog.

Copy link
Copy Markdown
Member

@CHr15F0x CHr15F0x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Copy Markdown
Contributor

@kkovaacs kkovaacs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vbar vbar merged commit 48b9d84 into eqlabs:main Mar 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants