Skip to content

chore(fast-inbox): delete legacy node message paths (A-1388)#24793

Open
spalladino wants to merge 13 commits into
spl/a-1387-circuits-cleanupfrom
spl/a-1388-node-cleanup
Open

chore(fast-inbox): delete legacy node message paths (A-1388)#24793
spalladino wants to merge 13 commits into
spl/a-1387-circuits-cleanupfrom
spl/a-1388-node-cleanup

Conversation

@spalladino

@spalladino spalladino commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Node cleanup for the Fast Inbox (AZIP-22) project — removes the legacy L1-to-L2 message paths the flip (#24789) left dead. Sits on the Fast Inbox stack (#24784..#24792); base is spl/a-1387-circuits-cleanup.

What's removed

  • stdlib / p2p: computeInHashFromL1ToL2Messages and the whole in_hash.ts; the inHash field on BlockProposal (constructor, signed payload, wire, and the createBlockProposal validator-interface argument); the CheckpointProposal.getBlockProposal inHash pass-through; the padded per-checkpoint InboxLeaf helpers (smallestIndexForCheckpoint / indexRangeForCheckpoint / checkpointNumberFromIndex); the legacy getL1ToL2Messages(checkpointNumber) member from the L1ToL2MessageSource and archiver RPC interfaces.
  • archiver: the legacy per-checkpoint getL1ToL2Messages flow, the padded per-checkpoint index invariants, the inboxTreeInProgress readiness gate + L1ToL2MessagesNotReadyError, and the 128-bit keccak rolling hash. InboxMessage now carries only the compact global index and the full-width consensus rolling hash (the vacuous derived checkpointNumber and the 128-bit rollingHash are gone). Reorg detection compares the local consensus rolling hash and total against the Inbox's current rolling-hash bucket (new getBucket / getCurrentBucketSeq / getCurrentBucket wrappers) instead of the 128-bit getState.
  • sequencer / validator: the dead inHash = Fr.ZERO threading through the checkpoint proposal job and the validator/validation-service create-proposal path, plus the dead in_hash_mismatch validation-failure reason.
  • world-state: the no-op first-in-checkpoint padding alias and the obsolete non-first-block-empty-bundle transitional test (the production assertion was already removed at the flip).
  • node: the public-calls simulator's dead next-checkpoint message fetch and its now-unused l1ToL2MessageSource dependency.
  • config / env: AZTEC_INBOX_LAG / inboxLag from ethereum config, foundation env vars, the network-consensus-config list, the l1-contracts + spartan network defaults, and the e2e option plumbing.
  • docs: THREAT_MODEL.md and the archiver README rewritten from the inHash == inbox.consume(...) model to the consensus rolling-hash / bucket model.

Format / store / wire notes

  • Store version bump: ARCHIVER_DB_VERSION 8 → 9 because InboxMessage serialization dropped rollingHash + checkpointNumber and the inboxTreeInProgress singleton is gone. No migration — nodes resync (fresh rollup instance per release line, same no-migration policy as the rest of the stack).
  • p2p wire format: dropping the (zeroed-since-flip) inHash shrinks the block-proposal bytes. Done as a plain removal at a release boundary (fresh networks), matching the A-1381 optional-tail precedent; the golden wire_compat_fixtures.ts buffers were regenerated. The checkpoint-proposal fixture is unaffected (it never carried inHash).
  • L1 follow-through: deferred. The on-chain Inbox 128-bit messagesRollingHash accumulation + getState() / getTotalMessagesInserted() + MessageSent.rollingHash still have readers (the l1-contracts test suite and the chain_monitor TS test util), so per the plan's conditional they are left in place; deleting them is a separate L1 change.

Testing

Locally green (unit suites that run without @aztec/bb-avm-sim): archiver (561), stdlib p2p + interfaces (76), world-state synchronizer + native (74), validator-client unit (38), ethereum config (6). Suites that import @aztec/bb-avm-sim (p2p libp2p, sequencer-client, node simulator, validator integration) and full typecheck of the packages downstream of the pinned-VK blocker are CI-validated. No e2e / VK regen locally.

Review follow-up (phase-2 final review)

Four commits were appended by the final review pass:

  • The env sweep removed AZTEC_INBOX_LAG from scripts/network-defaults.json while both L1 deploy-script test setUps still readUint the key, reverting before any test ran; the reads are gone.
  • The p2p attestation store version is bumped 2 -> 3: it persists proposal/attestation buffers whose formats changed in this stack (checkpoint header lost inHash; block-proposal wire dropped it), and stored checkpoint attestations decode without a tolerant fallback.
  • l1_publisher.integration.test.ts is reworked for streaming consumption: each checkpoint consumes every message sent while it was built, threading the previous checkpoint's rolling hash and reading the propose bucketHint from the Inbox's current bucket (the legacy inboxLag shift register is gone).
  • Remaining inboxLag/inHash references are swept from the spartan environment profiles, the governance-upgrade tutorial, the validator/sequencer READMEs, and stale e2e comments.

@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch from 92cecbd to 83a74e1 Compare July 19, 2026 01:25
@spalladino
spalladino force-pushed the spl/a-1387-circuits-cleanup branch from d06eb0f to 7e1dc3d Compare July 19, 2026 01:25
@spalladino
spalladino force-pushed the spl/a-1387-circuits-cleanup branch from 7e1dc3d to 0e1e0ed Compare July 19, 2026 14:05
@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch 2 times, most recently from 115b351 to 5817030 Compare July 19, 2026 15:10
@spalladino
spalladino force-pushed the spl/a-1387-circuits-cleanup branch 2 times, most recently from 2277ca8 to 43ac45a Compare July 19, 2026 15:36
@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch from 5817030 to 01b921a Compare July 19, 2026 15:36
@spalladino
spalladino force-pushed the spl/a-1387-circuits-cleanup branch from 43ac45a to b82f5cc Compare July 19, 2026 17:57
@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch from 01b921a to 6269f44 Compare July 19, 2026 17:57
@spalladino
spalladino force-pushed the spl/a-1387-circuits-cleanup branch from b82f5cc to 8287158 Compare July 19, 2026 18:02
@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch from 6269f44 to 3111d18 Compare July 19, 2026 18:02
@spalladino
spalladino force-pushed the spl/a-1387-circuits-cleanup branch from 8287158 to 4c4c1a8 Compare July 19, 2026 20:30
@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch from 38cadbf to 5660774 Compare July 19, 2026 20:30
@spalladino
spalladino force-pushed the spl/a-1387-circuits-cleanup branch from 4c4c1a8 to c51c85b Compare July 19, 2026 20:48
@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch from 5660774 to 7fa4b0a Compare July 19, 2026 20:48
@spalladino
spalladino force-pushed the spl/a-1387-circuits-cleanup branch from c51c85b to de57be7 Compare July 19, 2026 20:51
@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch from 7fa4b0a to 0224d57 Compare July 19, 2026 20:51
@spalladino
spalladino force-pushed the spl/a-1387-circuits-cleanup branch from de57be7 to ce83790 Compare July 20, 2026 13:32
@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch from 0224d57 to 02cd879 Compare July 20, 2026 13:32
@spalladino
spalladino force-pushed the spl/a-1387-circuits-cleanup branch from ce83790 to f853ebe Compare July 20, 2026 14:07
@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch from 02cd879 to 05a1f0c Compare July 20, 2026 14:07
@spalladino
spalladino force-pushed the spl/a-1387-circuits-cleanup branch from f853ebe to 9d37080 Compare July 20, 2026 15:30
@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch from 05a1f0c to 93b18af Compare July 20, 2026 15:30
@spalladino
spalladino force-pushed the spl/a-1387-circuits-cleanup branch from 9d37080 to c50ce18 Compare July 20, 2026 17:28
@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch 2 times, most recently from 5cc8950 to 94dec7d Compare July 20, 2026 21:21
@spalladino
spalladino force-pushed the spl/a-1387-circuits-cleanup branch 2 times, most recently from 6b53788 to ff21647 Compare July 21, 2026 02:58
@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch 2 times, most recently from 855ee1c to 8c420b7 Compare July 21, 2026 03:39
@spalladino
spalladino force-pushed the spl/a-1387-circuits-cleanup branch from ff21647 to 4a8dc8a Compare July 21, 2026 03:39
Removes the legacy inboxLag / AZTEC_INBOX_LAG config field and env var from
ethereum config, foundation env vars, the network-consensus-config list, the
l1-contracts and spartan network defaults, and the e2e test option plumbing.
Also drops the removed inHash argument from the e2e web3signer createBlockProposal
wrapper.
…ers from stdlib/p2p (A-1388)

Deletes computeInHashFromL1ToL2Messages and the inHash field from BlockProposal
(including its signed-payload slot), the CheckpointProposal getBlockProposal
pass-through, and the createBlockProposal inHash argument on the validator
interface. Removes the padded per-checkpoint InboxLeaf helpers
(smallestIndexForCheckpoint / indexRangeForCheckpoint / checkpointNumberFromIndex)
and the legacy getL1ToL2Messages(checkpointNumber) member from the L1ToL2MessageSource
and archiver RPC interfaces. Regenerates the block-proposal golden wire fixtures for
the shrunk payload; the p2p wire format changes at a release boundary (fresh networks),
matching the A-1381 optional-tail precedent.
…aths in the archiver (A-1388)

Removes the legacy getL1ToL2Messages(checkpointNumber) flow, the padded
per-checkpoint index invariants, the inboxTreeInProgress readiness gate, and the
L1ToL2MessagesNotReadyError. InboxMessage drops the 128-bit keccak rollingHash and
the vacuous derived checkpointNumber, so messages carry only the compact global
index and the full-width consensus rolling hash; the store serialization changes and
ARCHIVER_DB_VERSION bumps to 9 (nodes resync, no migration). Reorg detection now
compares the local consensus rolling hash and total against the Inbox's current
rolling-hash bucket via new getBucket/getCurrentBucketSeq/getCurrentBucket wrappers,
replacing the 128-bit getState comparison. Test fakes/mocks move to compact indexing.
…lidator (A-1388)

Removes the dead inHash=Fr.ZERO plumbing through the checkpoint proposal job and
the validator/validation-service createBlockProposal path, and deletes the dead
in_hash_mismatch validation-failure reason from proposal_handler, validator, and
metrics. Updates the sequencer/validator test mocks and callers for the dropped
inHash argument and the removed getL1ToL2Messages message source member.
…ator message fetch (A-1388)

Drops the no-op first-in-checkpoint padding alias and its stale docs in world-state,
and removes the obsolete non-first-block-empty-bundle transitional test. The node
public-calls simulator no longer fetches next-checkpoint messages via the removed
per-checkpoint API and drops its now-unused l1ToL2MessageSource dependency, simulating
against the fork's current tree (streaming Inbox consumes per block). Rewrites the
THREAT_MODEL inHash/consume passages to the consensus rolling-hash / bucket model.
…ts (A-1388)

The optional bucket-reference tail keeps proposals that omit it round-tripping
cleanly; it does not make the wire byte-identical to the pre-inHash-removal format.
Reword the toBuffer/fromBuffer comments to describe only the tail's unset case.
… tests (A-1388)

The env sweep removed AZTEC_INBOX_LAG from scripts/network-defaults.json but
both deploy-script test setUps still readUint the key, which reverts
(vm.parseJsonUint on a missing path), failing the suites before any test
runs. The deploy configuration no longer consumes the env var.
…proposal formats (A-1388)

The attestation store persists raw BlockProposal and CheckpointAttestation
buffers. Both changed shape in this stack (the checkpoint header lost inHash
and the block-proposal wire format dropped its zeroed inHash), and stored
checkpoint attestations are decoded without a tolerant fallback, so a store
written by a pre-Fast-Inbox node would throw on read. Bump 2 -> 3 to wipe
stale pools, matching the archiver's no-migration bump.
…inbox consumption (A-1388)

The suite still modeled the legacy per-checkpoint lag (a shift register
consuming messages sent two checkpoints earlier) and built every checkpoint
header from a zero previous rolling hash, neither of which can pass the
streaming-inbox propose validation. Each checkpoint now consumes every
message sent while it was built: the previous checkpoint's inboxRollingHash
threads into the next header, and the propose bucket hint is read from the
Inbox's current bucket, which also satisfies the mandatory-consumption
assert. Single-checkpoint helpers default to consuming nothing (bucket hint
0 against the genesis bucket) instead of a padded zero-filled list.

The suite cannot run locally (stale circuit artifacts in
noir-protocol-circuits-types); CI is the runner of record.
…388)

Removes the dead AZTEC_INBOX_LAG entries from the spartan environment
profiles and the governance-upgrade tutorial, rewrites the validator and
sequencer README sections that still described the legacy inHash flow, and
drops e2e comments that still explained fixture settings in terms of the
deleted inboxLag / L1ToL2MessagesNotReadyError behavior. Versioned docs
snapshots are left untouched.
…pose expectation (A-1388)

The streaming rework proposes with the Inbox's current bucket seq; the
expected propose calldata must carry the same hint.
…ntegration mock (A-1388)

The streaming flip makes world-state sync reconstruct L1-to-L2 messages per block via
the archiver's bucket queries, but the integration test's block-source mock did not
implement them, so block 1 committed with zero messages and the next fork threw. Back
the mock with MockL1ToL2MessageSource and register a bucket per published block.
@spalladino
spalladino force-pushed the spl/a-1387-circuits-cleanup branch from 4a8dc8a to 9e63607 Compare July 21, 2026 04:43
@spalladino
spalladino force-pushed the spl/a-1388-node-cleanup branch from 8c420b7 to d691947 Compare July 21, 2026 04:43
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.

1 participant