Expand description
Merkle proof construction for L2→L1 send messages.
Implements NodeInterface.constructOutboxProof(size, leaf). Walks the
Merkle accumulator from leaf toward the root, collecting sibling
positions at each level. Nodes within the committed range (< size)
come from L2ToL1Tx / SendMerkleUpdate event logs; nodes past the
balanced-tree boundary come from partial accumulator state.
Structs§
- Level
AndLeaf - A position in the Merkle tree: level (0 = leaves) + leaf index within that level.
- Proof
Plan - Result of planning a proof construction: which nodes to fetch from
logs (
query) and which nodes form the proof path (nodes), plus which of those are “partials” that are computed from the accumulator state rather than fetched.
Functions§
- encode_
outbox_ proof - ABI-encode the outbox proof return value.
- finalize_
proof - Given a resolved map from
LevelAndLeaf → hash(fetched from log scan + partials), walk the proof path and return(send, root, proof_vec)ready for ABI encoding. - plan_
proof - Plan the outbox-proof walk: given the tree
size(send count) and theleafwe want to prove, compute the list of sibling positions that together form the proof path.