Commit d4a2817
authored
fix(e2e): wait for checkpointed blocks in rediscovery test (#22399)
## Summary
- Fix flaky `e2e_p2p/rediscovery.test.ts` caused by a race between
uncheckpointed block pruning and PXE transaction simulation
- After `setupAccount()` deploys accounts, wait for blocks to reach
`CHECKPOINTED` status before proceeding with the stop/restart cycle
- Refactor `deployAccounts` in `setup.ts` to accept optional
`DeployOptions`, with `from: NO_FROM` always applied as the base
**Root cause**: After `setupAccount()` produces blocks, the test stops
and restarts validator nodes. During the restart (~25s), the L1 clock
advances past the block's slot. When restarted nodes sync,
`pruneUncheckpointedBlocks()` removes the block because its slot has
passed without a checkpoint. The PXE then fails simulating a transaction
against the pruned block.
**Fix**: Pass `wait: { waitForStatus: TxStatus.CHECKPOINTED }` to
`deployAccounts`, which waits for the deploy tx's block to be
checkpointed before returning. This replaces the previous manual
`retryUntil` loop.
CI log of the flake: http://ci.aztec-labs.com/19edb028126f87c3
Full analysis:
https://gist.github.com/AztecBot/b4101abd080ebd536ac09e7c821885182 files changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
299 | 300 | | |
300 | 301 | | |
301 | 302 | | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
306 | 308 | | |
307 | 309 | | |
308 | 310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
834 | 836 | | |
835 | 837 | | |
836 | 838 | | |
837 | | - | |
| 839 | + | |
838 | 840 | | |
839 | 841 | | |
840 | 842 | | |
| |||
853 | 855 | | |
854 | 856 | | |
855 | 857 | | |
| 858 | + | |
856 | 859 | | |
857 | 860 | | |
858 | 861 | | |
| |||
0 commit comments