fix(sequencer): prune in failed-sync fallback so the chain can recover#24253
Open
spalladino wants to merge 1 commit into
Open
fix(sequencer): prune in failed-sync fallback so the chain can recover#24253spalladino wants to merge 1 commit into
spalladino wants to merge 1 commit into
Conversation
When a proposer fails checkSync it already casts governance/slashing votes; now it also calls the permissionless prune() when the rollup is prunable, so a pending chain wedged by bad data can be wound back to the last proven checkpoint and the network can recover. Fixes A-1260
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
When a node fails
checkSyncduring its slot as proposer it cannot build a checkpoint, but it already still casts governance/slashing votes so voting keeps passing even if the chain is damaged. It did not, however, callprune(). If bad data wedges the pending chain so proposers can't sync and the proof submission window then expires, nobody prunes and the chain stays stuck. This makes the proposer also prune when it can't propose, so the network can recover from data that is blocking syncing.Approach
L1
prune()is permissionless and idempotent (revertsRollup__NothingToPrunewhen not prunable, emitsPrunedPending), so the proposer can call it even with a wedged local view.pruneaction to the sequencer publisher and anenqueuePruneIfPrunable(slot)method that checkscanPruneAtTime— evaluated at the same L1 timestamp the bundle simulator overridesblock.timestampwith — and enqueues aprunerequest keyed on thePrunedPendingevent. Fails closed on an RPC error.tryVoteWhenCannotBuild, renamed totryVoteAndPruneWhenCannotBuild), enqueue the prune alongside the existing votes and submit them in the same multicall at the target slot. The early-return is relaxed so a send still fires when only a prune (and no votes) was enqueued.checkCanProposegate), batched at the target slot, and relies on permissionless idempotency for HA dedup — no new duty type. Thepruneaction is ordered beforeproposein the publisher action list.Changes
SequencerPublisher.enqueuePruneIfPrunable;'prune'action added before'propose'; failed-sync fallback renamed totryVoteAndPruneWhenCannotBuildand now enqueues a prune; shared dedup field renamedlastSlotForFallbackAction.e2e_epochs/epochs_prune_when_cannot_buildthat pauses sync so the proposer cannot build, expires the proof window, and asserts the pending tip winds back to proven via the fallback path; minor import normalization in two sibling epochs tests.Fixes A-1260