Skip to content

Commit 1de569c

Browse files
authored
fix: set anvilSlotsInAnEpoch in e2e_offchain_payment to prevent finalization race (#21452)
## Summary - Sets `anvilSlotsInAnEpoch: 32` in `e2e_offchain_payment` test setup, matching what `epochs_l1_reorgs` already does. ## Problem PR #21156 added `--slots-in-an-epoch 1` as the default for anvil, making `finalized = latest - 2`. PR #20893 added `e2e_offchain_payment` which simulates L1 reorgs. When both landed on `merge-train/fairies`, the reorg test fails deterministically because finalization races past the rollback target block. ## Fix Use `anvilSlotsInAnEpoch: 32` (matching Ethereum mainnet) so the finalized block stays far enough behind latest to allow rollbacks in the test. ClaudeBox log: https://claudebox.work/s/c5ac5d52da86e23a?run=4
1 parent 910d230 commit 1de569c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

yarn-project/end-to-end/src/e2e_offchain_payment.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ describe('e2e_offchain_payment', () => {
2929
jest.setTimeout(TIMEOUT);
3030

3131
beforeAll(async () => {
32-
({ teardown, wallet, accounts, aztecNode, aztecNodeAdmin, cheatCodes } = await setup(2));
32+
({ teardown, wallet, accounts, aztecNode, aztecNodeAdmin, cheatCodes } = await setup(2, {
33+
anvilSlotsInAnEpoch: 32,
34+
}));
3335
});
3436

3537
afterAll(() => teardown());

0 commit comments

Comments
 (0)