feat: block proposals carry a bucket reference (A-1381)#24786
Open
spalladino wants to merge 1 commit into
Open
feat: block proposals carry a bucket reference (A-1381)#24786spalladino wants to merge 1 commit into
spalladino wants to merge 1 commit into
Conversation
…rence (A-1381) Adds an optional InboxBucketRef (bucketSeq, bucketTimestamp, inboxRollingHash) to BlockProposal and to the last block of CheckpointProposal (AZIP-22 Fast Inbox), so validators can derive the consumed message bundle from their own Inbox view rather than trusting a proposer-supplied list. - The reference goes inside the signed payload (getPayloadToSign), so a relay cannot strip or inject it without breaking signature recovery. The checkpoint header's inboxRollingHash remains the consensus commitment; a wrong reference can only miss the lookup. - Optional-tail wire encoding: unset proposals serialize byte-identically to the legacy format, and decoders treat EOF after the existing fields as "no reference", so mixed-version gossip keeps working with no topic-version bump. - CheckpointProposal enforces at construction that a set last-block reference's rolling hash equals the checkpoint header's inboxRollingHash, mirroring the existing inHash cross-check. - Plumbing only: the sequencer passes undefined pre-flip and the legacy validation path ignores the field (populated in FI-12, validated in FI-13). Golden fixtures pin the pre-change bytes for the byte-identity and cross-version tolerance tests.
This was referenced Jul 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an optional
InboxBucketRef(bucketSeq,bucketTimestamp,inboxRollingHash) toBlockProposaland to the last block ofCheckpointProposal(AZIP-22 Fast Inbox), so validators can derive the consumed L1-to-L2 message bundle from their own Inbox view instead of trusting a proposer-supplied list. Plumbing only for now — the sequencer passesundefinedpre-flip (populated in FI-12) and the legacy validation path ignores it (validated in FI-13).getPayloadToSign), so a relay cannot strip or inject it without breaking signature recovery. The checkpoint header'sinboxRollingHashremains the consensus commitment; a wrong reference can only miss the Inbox lookup. This discharges the P2-2 residual from the A-1371 design (signedness + republish path).CheckpointProposalenforces at construction that a set last-block reference's rolling hash equals the checkpoint header'sinboxRollingHash, mirroring the existinginHashcross-check.BlockProposal.fromBuffer/CheckpointProposal.fromBufferdecode site inp2p/srcandmessage_validator.ts: none assume a strict buffer length, so the appended tail is tolerated.Tests:
InboxBucketRefround-trip/equals/schema; block + checkpoint proposal round-trips with the reference set (with and without signed txs); byte-identity vs golden fixtures when unset; legacy-buffer tolerance; signature coverage (recovery over a set reference, and recovery breaks when the reference is tampered with or injected); payload hashes differ set-vs-unset; checkpoint header-consistency check throws on mismatch.