fix(archiver): skip descendants of invalid-attestations checkpoints#23502
Merged
spalladino merged 2 commits intoMay 27, 2026
Merged
Conversation
Adds an e2e test that deterministically reproduces the archiver retry loop documented at l1_synchronizer.ts:905-908: when a checkpoint with insufficient attestations lands and the next proposer publishes a valid descendant without first invalidating it, block_store.addCheckpoints throws InitialCheckpointNumberNotSequentialError on every poll. Gated by a new test-only sequencer flag skipWaitForValidParentCheckpointOnL1 that bypasses the parent-validity check inside the checkpoint proposal job.
a78bb63 to
9b97cbf
Compare
9b97cbf to
ab6e131
Compare
PhilWindle
approved these changes
May 27, 2026
|
|
||
| // Drop any rejected entry for this archive root: a checkpoint that was previously rejected | ||
| // (e.g. invalid attestations) is now being ingested as valid, so its descendants are allowed. | ||
| await this.removeRejectedCheckpointByArchiveRoot(checkpoint.checkpoint.archive.root); |
Collaborator
There was a problem hiding this comment.
Invalid checkpoints that aren't later replaced by valid ones with an exact archive root, will they just accumulate in the store?
Contributor
Author
There was a problem hiding this comment.
Yep. Though I don't expect many invalid checkpoints out there, and the invalid checkpoints are smaller than the valid ones, which we store forever.
PhilWindle
pushed a commit
that referenced
this pull request
May 27, 2026
Fixes the invalid checkpoint descendant e2e timing by keeping sequencers stopped until the test has selected adjacent target proposers, installed listeners, applied malicious configs, and warped to the intended pipelined build window. This avoids applying malicious config to an earlier slot owned by the same validator, which is what caused the CI run for PR #23502 to miss the intended P1/P2 checkpoint pair.
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.
Motivation
archiver/src/modules/l1_synchronizer.tsskipped checkpoints with insufficient/invalid attestations under the assumption that the next proposer would invalidate them before publishing. When that assumption was violated — i.e., proposer P2 published a valid-attestations checkpoint that extended P1's invalid one — the archiver hitInitialCheckpointNumberNotSequentialErrorinblock_store.addCheckpoints, the catch handler rolled back the L1 sync point, and the next poll re-fetched the same range and re-threw. The archiver looped indefinitely. The protocol already definesOffenseType.PROPOSED_DESCENDANT_OF_CHECKPOINT_WITH_INVALID_ATTESTATIONSfor exactly this case but the slasher couldn't see valid-attestations descendants because the archiver threw before emitting any event.Human Note
This is particularly relevant under pipelining. Attestors now attest to a checkpoint before the previous one is pushed to L1, so they can be inadvertently attesting to a checkpoint built on top of one that became invalid as it was published to the rollup the contract with wrong attestations. So an honest attestor could get slashed if the proposer was malicious.
Approach
In the synchronizer, persist rejected ancestors in the block store keyed by archive root. On each new checkpoint, before attestation validation, compare its
header.lastArchiveRootagainst the persisted set — if it matches, skip the checkpoint as a descendant of an invalid ancestor and emit a newL2BlockSourceEvents.CheckpointBuiltOnInvalidAncestorDetectedevent with enough metadata to resolve the proposer. The slasher'sAttestationsBlockWatcheris fixed to slash the proposer (not the attestors) under the new event.Fixes A-1072