refactor(archiver): drop unused Inbox recovery state - #171
Draft
spalladino wants to merge 1 commit into
Draft
spalladino wants to merge 1 commit into
spalladino wants to merge 1 commit into
Conversation
RecoveryState carried a finalized L1 block that nothing ever read, so it is removed from the type, from startRecovery's signature and from its six call sites. The finality marker itself is untouched: syncPass still takes finalizedL1Block and still hands it to truncate and to every setMessageSyncState call. The synced-status downgrade after continuing a recovery is unreachable since recovery became rollback-then-refetch: continueRecovery returns pending when the anchor search runs out of budget and pending from rollbackTo either way, so it can never return synced. Removed along with the pinned-head alias it needed. Two consumed-message-count call sites now reuse blockLeafCount instead of restating the leaf-count expression.
spalladino
added this pull request to stack #188
September 12, 2026 04:52
spalladino
removed this pull request from stack #188
September 15, 2026 22:42
spalladino
added this pull request to stack #217
September 15, 2026 22:43
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.
This rung is behavior-preserving. It removes state and a branch in the archiver's Inbox message
synchronizer that no code path can reach, and points two call sites at a helper that already exists.
Nothing about how the node ingests, certifies or recovers Inbox messages changes.
RecoveryStatecarried afinalizedL1Blockthat nothing ever read. It was threaded intostartRecoveryand stored on the pinned recovery, and the anchor search deliberately ignores it —searchAnchorreads the finality marker it trusts straight from the store(
getMessagesFinalizedL1Block), precisely because a fresher in-memory height would cover messagesthis node never verified. The field is therefore removed from the type, from
startRecovery'ssignature, and from all six
startRecoverycall sites.The persisted finality marker stays exactly where it was.
syncPassstill receivesfinalizedL1Block, still passes it totruncate, and still writes it in everysetMessageSyncState/storeMessagescall. Only the copy pinned on the in-memory recovery is gone.The second removal is the synced-status downgrade applied after continuing a recovery. It existed
for a design where recovery could finish by reaching agreement with L1 at its pinned head. Since
recovery became rollback-then-refetch,
continueRecoveryhas two return paths:pending()when theper-pass lookup budget runs out before an anchor is found, and
rollbackTo, which returnspending()when the head can no longer be confirmed and
{ status: 'pending', ... }after committing therollback. Neither can yield
synced, so the downgrade is dead and the ternary plus the pinned-headalias it needed are removed. Pending-after-rollback behavior is unchanged — that is what recovery
already returns.
Finally, two places computing the consumed message count from a block header
(
ArchiverDataStoreUpdater.getConsumedMessageCountand the checkpoint rolling-hash check inArchiverL1Synchronizer) now call the existing exportedblockLeafCounthelper instead of restatingBigInt(block.header.state.l1ToL2MessageTree.nextAvailableLeafIndex).Stack position
This is rung 8 of 25 in the Fast Inbox node stack, stacked on
spl/fi-s02-deployment-block.Source
Reconstructs the
yarn-project/archiver/hunks of5397c7d61f("refactor: drop unused streamingInbox plumbing") from old aztec-packages PR #25440. That commit is deliberately split across this stack; the other
three parts are not here:
checkpoint_proposal_job.tsbucket-hint and fisherman-dummy hunks go to rung FI-S09;checkpoint_proposal_job.tsrange-reuse hunks go to rung FI-S11;ethereum/src/contracts/chain_state_override.tsoverride-type hunks and itsnoir-projects/.../rollup_fixture_builder.nrfixture deletion are deferred to the override-type and Noir-fixture cleanup and must notenter this stack.
Verification
Red/green does not apply in its usual form: there is no behavior to redden. The evidence is a
pre-refactor passing baseline and an identical post-refactor result.
JEST_MAX_WORKERS=1 yarn workspace @aztec-labs/archiver test— 23 suites, 678 tests, all passing, exit 0.
behavior-preserving rung requires.
finalizedL1BlockfromRecoveryState, the whole repo was grepped for reads of it:there are none. The only survivors are the
MessageSyncState.finalizedL1Blockpersisted marker, thelocal read in
searchAnchor, andl1_synchronizer's own parameter.continueRecoveryandrollbackTowas read to confirm neither can producesyncedbefore the downgrade was deleted.yarn buildgreen;yarn formatandyarn lintclean.No e2e suites were run; e2e coverage is left to CI.