Skip to content

fix: add retry in assertMultipleBlocksPerSlot to wait for checkpoint indexing#20977

Open
AztecBot wants to merge 1 commit intomerge-train/spartanfrom
claudebox/09429a0137f87c65-1
Open

fix: add retry in assertMultipleBlocksPerSlot to wait for checkpoint indexing#20977
AztecBot wants to merge 1 commit intomerge-train/spartanfrom
claudebox/09429a0137f87c65-1

Conversation

@AztecBot
Copy link
Collaborator

@AztecBot AztecBot commented Feb 27, 2026

Summary

  • Fixes race condition in epochs_mbps.parallel.test.ts where assertMultipleBlocksPerSlot queries the archiver for checkpoints immediately after all txs are mined, but the archiver hasn't finished indexing the latest checkpoint yet
  • In the failing CI run, checkpoint 3 (with 3 blocks) was being downloaded by the archiver at the exact same millisecond the assertion ran, so only 2 checkpoints were found (max 2 blocks each), causing expect(multiBlockCheckpointNumber).toBeDefined() to fail
  • Adds a retryUntil poll (up to 3 L2 slot durations) that waits for a checkpoint with the expected block count to appear before performing the full block ordering assertions

ClaudeBox log

…indexing

The test was failing because assertMultipleBlocksPerSlot queries the
archiver for checkpoints immediately after all transactions are mined.
In CI, there's a race between the archiver indexing checkpoint 3 (which
has 3 blocks) and the test assertion. Checkpoint 3 was being downloaded
at the same millisecond as the assertion ran, resulting in only 2
checkpoints being found (with max 2 blocks each).

This fix adds a retryUntil poll that waits up to 3 L2 slot durations
for a checkpoint with the expected block count to appear before
performing the full assertion.
@AztecBot AztecBot added the claudebox Owned by claudebox. it can push to this PR. label Feb 27, 2026
@ludamad ludamad marked this pull request as ready for review February 27, 2026 22:48
@AztecBot
Copy link
Collaborator Author

Flakey Tests

🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033FLAKED\033 (8;;http://ci.aztec-labs.com/7358e217bc6222f5�7358e217bc6222f58;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_invalidate_block.parallel.test.ts "proposer invalidates previous block with shuffled attestations" (125s) (code: 0) group:e2e-p2p-epoch-flakes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant