Commit eae69fb
test: fix proof_boundary startup race (#24671)
## What
Fixes a low-frequency (~1 in 140) startup-race flake in the
`proof_boundary` multi-node e2e suite (CI hash `c06563e7d2b7e067`, group
`e2e-p2p-epoch-flakes`). All five scenarios time out in the shared
`computeBoundarySlot()` helper at `waitUntilCheckpointNumber(1)` — the
3-validator committee never produces its first checkpoint.
## Why
`setupTest` created the three validator nodes sequentially (`asyncMap`)
and started each sequencer at node construction. A node subscribes to
the gossip topics when its P2P client starts (unconditionally, at node
creation), but the in-memory mock gossip bus has no message replay. So
when the first-created validator happened to draw the first slot's
proposer, it broadcast the inaugural block proposal before the other two
committee members had been created and subscribed — the proposal was
lost, the 3-of-3 quorum was missed, and the chain forked onto genesis
and never produced checkpoint 1. It's randao-dependent (fatal only when
the first-created node is the first proposer), hence the low frequency.
## Fix
Create the validator nodes with `dontStartSequencer: true`, then
`startSequencers(nodes)` once all three exist. All peers subscribe to
gossip at creation, so no proposal is broadcast before the whole
committee is on the bus. This matches the pattern already used by the
non-flaky sibling tests `first_slot.test.ts` and
`block-production/setup.ts`.
## Scope
Test-only change. Related to A-1419, which tracks the underlying
product-level recovery race (competing block-1 re-executions surfacing
as `BlockNumberNotSequentialError`). This PR implements that issue's
"keep the test startup barrier" acceptance criterion but does **not**
resolve A-1419 — the product-side race is unchanged.
(cherry picked from commit 54edf7a)1 parent 41f0427 commit eae69fb
1 file changed
Lines changed: 13 additions & 2 deletions
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
| 62 | + | |
62 | 63 | | |
63 | | - | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
76 | 82 | | |
77 | 83 | | |
78 | 84 | | |
| |||
216 | 222 | | |
217 | 223 | | |
218 | 224 | | |
| 225 | + | |
219 | 226 | | |
220 | 227 | | |
221 | 228 | | |
| |||
264 | 271 | | |
265 | 272 | | |
266 | 273 | | |
| 274 | + | |
267 | 275 | | |
268 | 276 | | |
269 | 277 | | |
| |||
298 | 306 | | |
299 | 307 | | |
300 | 308 | | |
| 309 | + | |
301 | 310 | | |
302 | 311 | | |
303 | 312 | | |
| |||
335 | 344 | | |
336 | 345 | | |
337 | 346 | | |
| 347 | + | |
338 | 348 | | |
339 | 349 | | |
340 | 350 | | |
| |||
374 | 384 | | |
375 | 385 | | |
376 | 386 | | |
| 387 | + | |
377 | 388 | | |
378 | 389 | | |
379 | 390 | | |
| |||
0 commit comments