Skip to content

fix(test): advance L1 slot after reorg in e2e_offchain_payment test#21752

Draft
AztecBot wants to merge 1 commit intomerge-train/spartanfrom
claudebox/fix-keystore-reload-test
Draft

fix(test): advance L1 slot after reorg in e2e_offchain_payment test#21752
AztecBot wants to merge 1 commit intomerge-train/spartanfrom
claudebox/fix-keystore-reload-test

Conversation

@AztecBot
Copy link
Collaborator

Summary

Fix flaky e2e_offchain_payment test that times out waiting for a new L2 block after an L1 reorg.

After an L1 reorg + rollbackTo, the sequencer's lastCheckpointProposed still remembers it proposed in the current slot and unconditionally skips it (line 248 of sequencer.ts). With a 72s L2 slot duration but only a 30s timeout in forceEmptyBlock, the test times out waiting for a block that can never arrive in the current slot.

The fix calls cheatCodes.rollup.advanceToNextSlot() after the reorg to give the sequencer a fresh slot to propose in.

Test plan

  • Ran e2e_offchain_payment.test.ts locally — both tests pass (42s total, reorg test completes in 9s)

ClaudeBox log: https://claudebox.work/s/32b4387d95dd175d?run=1

ClaudeBox log: https://claudebox.work/s/32b4387d95dd175d?run=1

After an L1 reorg + rollback, the sequencer's lastCheckpointProposed
still remembers it proposed in the current slot and skips it
unconditionally. With a 72s slot duration and a 30s timeout in
forceEmptyBlock, the test times out waiting for a block that can never
arrive in the current slot. Advancing to the next slot gives the
sequencer a fresh slot to propose in.
@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant