fix(test): advance L1 slot after reorg in e2e_offchain_payment test#21752
Draft
AztecBot wants to merge 1 commit intomerge-train/spartanfrom
Draft
fix(test): advance L1 slot after reorg in e2e_offchain_payment test#21752AztecBot wants to merge 1 commit intomerge-train/spartanfrom
AztecBot wants to merge 1 commit intomerge-train/spartanfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix flaky
e2e_offchain_paymenttest that times out waiting for a new L2 block after an L1 reorg.After an L1 reorg +
rollbackTo, the sequencer'slastCheckpointProposedstill remembers it proposed in the current slot and unconditionally skips it (line 248 ofsequencer.ts). With a 72s L2 slot duration but only a 30s timeout inforceEmptyBlock, 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
e2e_offchain_payment.test.tslocally — 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