test(e2e): fix epoch-2 tip race in proof_fails after-epoch-end test#24441
Merged
Conversation
The rollback is already proven by the retryUntil gate that waits for the pending checkpoint number to drop below the pre-rollback value. Re-asserting `checkpointAfterRollback < checkpointBeforeRollback` after the epoch-2 poll is redundant and reintroduces a timing race: once the chain has resumed in epoch 2 the checkpoint number can climb back to or past the pre-rollback value as further epoch-2 checkpoints are proposed, which is still a valid resumed state but would fail the comparison. Assert only on the epoch of the settled tip, which is the property under test.
5f8e67a to
08a99df
Compare
PhilWindle
approved these changes
Jul 2, 2026
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.
Fixes a genuine timing flake in
single-node/proving/proof_fails.parallel.test.ts›does not allow submitting proof after epoch end, observed in CI run99ed463db48b9cf2on the v5 line (Expected: 2, Received: 0at the final epoch assertion).This test ran into a situation where the proposer
pruned the unproven chain withoutproposeing a new checkpoint, so the check for "has the last checkpoint been mined in epoch 2" failed, since there was no checkpoint at all in the entire chain.This fixes it so we wait until there's actually a checkpoint mined. In parallel, I'm looking into why the proposer decided to prune without proposing.