Skip to content

fix(e2e): pause L1 mining during slot query + warp in epochs_ha_sync#22502

Closed
spypsy wants to merge 3 commits into
merge-train/spartanfrom
spypsy/fix-epochs-ha-sync-warp-race
Closed

fix(e2e): pause L1 mining during slot query + warp in epochs_ha_sync#22502
spypsy wants to merge 3 commits into
merge-train/spartanfrom
spypsy/fix-epochs-ha-sync-warp-race

Conversation

@spypsy

@spypsy spypsy commented Apr 13, 2026

Copy link
Copy Markdown
Member

Fixes a ~1.7% flake in epochs_ha_sync caused by a race between Anvil's interval mining and the test's slot computation + warp sequence. During the ~8s spent proving/sending transactions, L1 blocks kept being mined, and by the time warp() was called, the chain had already advanced past the target timestamp. Wraps the slot query + warp in execWithPausedAnvil so L1 can't advance between the two calls.

Fixes A-892

@spalladino

spalladino commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

I'm not sure this makes a difference. The slot we're jumping ahead to is 2 slots in the future, computed from the slot number we've just read. There's no proving/sending txs in between, so there's no way that 8s pass between the read and the warp.

By the way, does this flake still happen? I had tried fixing it last week in this PR, by jumping 2 slots instead of 1, to prevent the race condition of 1) reading the current slot, 2) time passes and we move into it, 3) we try warping into it.

@spypsy spypsy closed this Apr 14, 2026
@spypsy spypsy deleted the spypsy/fix-epochs-ha-sync-warp-race branch April 14, 2026 12:41
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