Skip to content

feat: merge-train/spartan-v5#24677

Merged
AztecBot merged 1 commit into
v5-nextfrom
merge-train/spartan-v5
Jul 14, 2026
Merged

feat: merge-train/spartan-v5#24677
AztecBot merged 1 commit into
v5-nextfrom
merge-train/spartan-v5

Conversation

@AztecBot

Copy link
Copy Markdown
Collaborator

See merge-train-readme.md.
This is a merge-train.

## 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.

@ludamad ludamad left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Auto-approved

@AztecBot AztecBot added this pull request to the merge queue Jul 14, 2026
@AztecBot

Copy link
Copy Markdown
Collaborator Author

🤖 Auto-merge enabled after 4 hours of inactivity. This PR will be merged automatically once all checks pass.

Merged via the queue into v5-next with commit 2697f22 Jul 14, 2026
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants