feat: add block_root_msgs_only_rollup circuit for no-tx blocks with messages (A-1375)#24612
Open
spalladino wants to merge 3 commits into
Open
feat: add block_root_msgs_only_rollup circuit for no-tx blocks with messages (A-1375)#24612spalladino wants to merge 3 commits into
spalladino wants to merge 3 commits into
Conversation
ef2b683 to
cce1329
Compare
425f45b to
a5eca42
Compare
cce1329 to
d6ea15d
Compare
a5eca42 to
1dd74af
Compare
d6ea15d to
84ffffa
Compare
…essages (A-1375) Adds the block_root_msgs_only_rollup variant (crate rollup-block-root-msgs-only, VK index BLOCK_ROOT_MSGS_ONLY_ROLLUP_VK_INDEX) — a non-first, transaction-less block that still inserts a non-empty L1-to-L2 message bundle, so a proposer can keep draining the Inbox when the tx pool is dry (AZIP-22 Fast Inbox, FI-05). The circuit asserts num_msgs > 0, inherits the sponge blob and message sponge from the previous block, sets is_first_block = false, appends the bundle and absorbs the message sponge, and threads the start sponge blob through unchanged (no tx effects). It is deliberately unable to be leftmost: the checkpoint root requires the leftmost rollup's is_first_block to be true. Wires the new VK into the allowed-VK lists of the block merge and both checkpoint-root variants, the vk tree, and the proving request / artifact / bb-prover registrations. Noir tests prove a checkpoint [first block, msgs-only block, normal block] and cover the num_msgs == 0, non-leftmost, and sponge-continuity failure cases. The orchestrator selection (block-proving-state picking this variant) and its integration test are deferred to FI-12/FI-15: driving a mid-checkpoint msgs-only block requires reworking the transitional per-block message distribution (today the first block carries the whole padded checkpoint bundle and non-first blocks are empty), which belongs with the sequencer that actually produces these blocks. Nothing produces the shape pre-flip.
…s_first_block (A-1375) The message-only block root is listed in the single-block checkpoint-root allowlist only for symmetry; today the inputs validator's is_first_block assertion is the sole reason it cannot stand as a checkpoint's only block. Note that if that assertion is ever relaxed, this entry must be dropped in the same change, so the two decisions are not made independently.
1dd74af to
bae1a1f
Compare
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.
Stacked on #24603 (A-1374). AZIP-22 Fast Inbox, FI-05.
What
Adds
block_root_msgs_only_rollup(craterollup-block-root-msgs-only, VK indexBLOCK_ROOT_MSGS_ONLY_ROLLUP_VK_INDEX) — a non-first, transaction-less block that still inserts a non-empty L1→L2 message bundle. This lets a proposer keep draining the Inbox into a checkpoint when the tx pool is dry. It is completely inert pre-flip: nothing in the node produces this shape until FI-12.Circuit
Modeled on the first-empty variant but for a mid-checkpoint position (
block_root_msgs_only_rollup.nr):num_msgs > 0(a message-only block with no messages has no reason to exist);start_sponge_blobandstart_msg_spongefrom the previous block (non-empty), setsis_first_block = false, appends the bundle to the L1→L2 tree and absorbs the message sponge, threads the start sponge blob through unchanged (no tx effects);is_first_blockto be true.Composes via a new
new_from_no_rollups_with_start_sponge_blob(anew_from_no_rollupsthat takes an inherited sponge blob instead of an empty one; the first-empty variant now delegates to it, preserving its empty-sponge start).Wiring
BLOCK_ROOT_MSGS_ONLY_ROLLUP_VK_INDEXadded to the vk tree and theALLOWED_PREVIOUS_VK_INDICESof the block-merge and both checkpoint-root variants.pinned-build.tar.gzregenerated.ProvingJobResultsMapentry, theServerCircuitProverinterface method and all implementers (bb-prover,TestCircuitProver,MockProver,BrokerCircuitProverFacade), the proving-broker queue map + priority list + job-controller dispatch, and npct artifact/type generation.Tests
Noir (
rollup_lib, 386 passed) covers the roadmap done-when — a checkpoint[first block, msgs-only block, normal block]— plus the failure cases:num_msgs == 0rejected, a msgs-only block cannot be leftmost, and merge continuity catches a bad hintedstart_msg_sponge.yarn build, lint, and the orchestrator + proving-broker suites (123) are green. Cross-chainl1_to_l2e2e: only the two pre-registered-flaky duplicate-consume cases fail (a pre-existing PXE nullifier-sync issue, unrelated). A codex review found no soundness or wiring bugs.Deferred to FI-12/FI-15 (orchestrator selection + integration test)
block-proving-state.tsselecting this variant, and an orchestrator integration test driving a mid-checkpoint msgs-only block, are intentionally not in this PR. Driving one requires reworking the transitional per-block message distribution: today the first block carries the whole padded checkpoint bundle and non-first blocks inherit the full checkpoint sponge and absorb nothing, so a msgs-only block absorbing real messages mid-chain would break both the block-mergeright.start_msg_sponge == left.end_msg_spongecontinuity and the checkpoint-rootmerged.end_msg_sponge == parity.end_spongecheck. That distribution rework belongs with the sequencer that actually produces these blocks (FI-12) and its live-path e2e (FI-15). The circuit is fully proven by the noir tests, and the existingBlockProvingStateguard still rejects non-first zero-tx blocks, so nothing can construct the shape until that work lands.