Skip to content

test(ci): mark e2e_epochs/epochs_mbps_redistribution as flaky#24098

Merged
alexghr merged 1 commit into
merge-train/spartan-v5from
pw/mark-mbps-redistribution-flaky-v5
Jun 15, 2026
Merged

test(ci): mark e2e_epochs/epochs_mbps_redistribution as flaky#24098
alexghr merged 1 commit into
merge-train/spartan-v5from
pw/mark-mbps-redistribution-flaky-v5

Conversation

@PhilWindle

Copy link
Copy Markdown
Collaborator

What

Adds src/e2e_epochs/epochs_mbps_redistribution.test.ts to .test_patterns.yml as a flaky test so its failures alert owners rather than blocking the merge queue.

Why

epochs_mbps_redistribution ("redistributes checkpoint budget so late txs fit in the last block") dequeued #24053 from the merge queue by failing both its initial run and its retry. It is not a redistribution regression — it is a timing race in the sequencer:

  • The proposer's last block releases as soon as availableTxs >= 1 (waitForMinTxs) and then iterateEligiblePendingTxs freezes the tx set in a single mempool snapshot (p2p/src/client/p2p_client.ts).
  • The four late txs are submitted concurrently and propagate over gossip one at a time, while the proposer polls every 500ms.
  • Whichever subset is present at the releasing poll is what the last block gets; the rest spill into the next checkpoint, so new Set(lateBlockNumbers).size is occasionally 2 instead of 1.

The existing blanket entry src/e2e_epochs/.*\.test\.ts only tolerates this within the e2e-p2p-epoch-flakes group budget (flake_error_threshold: 5), which is why a hard failure still got through. This adds a dedicated, ungrouped entry so the specific test is always treated as a flake.

Follow-up

This is the stop-gap. The real fix (separate PR) makes the final block of a checkpoint collect txs until its build deadline instead of sealing on the first available tx, which removes the race deterministically. Once that lands, this entry should be removed.

The test asserts that all late txs land in the checkpoint's last block, but the
proposer seals the last block as soon as one tx is available and snapshots the
mempool, so late txs still propagating over gossip spill into the next
checkpoint. This is a timing race in the sequencer, not a redistribution bug; a
follow-up makes the last block collect txs until its build deadline.

Until then, flag the test as a flake so it does not block the merge queue.
@alexghr alexghr merged commit 103dc95 into merge-train/spartan-v5 Jun 15, 2026
12 checks passed
@alexghr alexghr deleted the pw/mark-mbps-redistribution-flaky-v5 branch June 15, 2026 16:10
PhilWindle added a commit that referenced this pull request Jun 15, 2026
The waitForBuildDeadlineOnFinalBlock flag enabled in this PR makes the test
deterministic, so it no longer needs to be tolerated as a flake (added in #24098).
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