Skip to content

test(e2e): fix epoch-2 tip race in proof_fails after-epoch-end test#24441

Merged
PhilWindle merged 1 commit into
merge-train/spartan-v5from
spl/proof-fails-epoch2-race
Jul 2, 2026
Merged

test(e2e): fix epoch-2 tip race in proof_fails after-epoch-end test#24441
PhilWindle merged 1 commit into
merge-train/spartan-v5from
spl/proof-fails-epoch2-race

Conversation

@spalladino

@spalladino spalladino commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Fixes a genuine timing flake in single-node/proving/proof_fails.parallel.test.tsdoes not allow submitting proof after epoch end, observed in CI run 99ed463db48b9cf2 on the v5 line (Expected: 2, Received: 0 at the final epoch assertion).

This test ran into a situation where the proposer pruned the unproven chain without proposeing 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.

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.
@spalladino spalladino force-pushed the spl/proof-fails-epoch2-race branch from 5f8e67a to 08a99df Compare July 1, 2026 20:37
@PhilWindle PhilWindle merged commit f9fcb60 into merge-train/spartan-v5 Jul 2, 2026
15 checks passed
@PhilWindle PhilWindle deleted the spl/proof-fails-epoch2-race branch July 2, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants