test(supernode): wait on EL finalized before fresh-data-dir restart#20945
Merged
Conversation
41d94b7 to
1f8acdc
Compare
The supernode CL's safety.Finalized advances in-memory before the corresponding forkchoiceUpdated is delivered to and persisted by the EL. If RestartWithFreshDataDir is called inside that window, op-reth still reports finalized=L2 genesis to the fresh op-node, which then correctly resets the pipeline back to L2 genesis. The resulting "L1=0 / L2=genesis" SafeDB pin makes FirstSafeHeadTimestamp return the genesis time, the cold-start backfill window collapses to empty, and the assertion first sealed timestamp < FirstVerifiableTimestamp fires. Also wait on each EL's finalized label so op-reth has persisted the advance before we wipe the supernode data dir. L2ELNode.AdvancedFn now defaults to block+30 polling attempts (was block+3) and takes a varargs WithTimeout option so callers like this test can extend the budget to match the CL wait (180 attempts = 360s). Refs: #20944
1f8acdc to
ad1feb7
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.
Closes #20944.
TestSupernodeResyncResumesAtActivation_PostActivationwas flaking (~6 hits in CI Insights) withfirst seal ts == backfill handoff ts == activationTimestamp, breakingLessf(first.Timestamp, backfillHandoff)inAssertBackfillCovers.Root cause: the supernode CL's
safety.Finalizedadvances in-memory before the correspondingforkchoiceUpdatedis delivered to and persisted by the EL. The test only waited on the CL's view, so under CI scheduling pressureRestartWithFreshDataDircould fire inside that window. op-reth then still reportedfinalized = L2 genesisto the fresh op-node, which correctly reset the pipeline back to genesis, wrote theL1=0 / L2=genesisSafeDB pin inonEngineConfirmedReset, and collapsed the cold-start backfill window to empty.Fix is test-only — the supernode's reset-to-genesis behaviour is correct given op-reth's persisted state:
eth.Finalizedlabel as well as the CL'ssafety.Finalizedso op-reth has persisted the advance before we wipe the supernode data dir.L2ELNode.AdvancedFnnow defaults toblock+30polling attempts (wasblock+3) and takes a varargsWithTimeoutoption so callers can extend the budget. The supernode test passesWithTimeout(180)to match the CL wait (180 attempts × 2s = 360s).No deterministic local repro — flake requires CI scheduling to land the restart inside the CL→EL FCU window.