diff --git a/yarn-project/end-to-end/src/e2e_amm.test.ts b/yarn-project/end-to-end/src/e2e_amm.test.ts index a6911ed7424c..cbab3c0e92a2 100644 --- a/yarn-project/end-to-end/src/e2e_amm.test.ts +++ b/yarn-project/end-to-end/src/e2e_amm.test.ts @@ -41,12 +41,17 @@ describe('AMM', () => { const INITIAL_TOKEN_BALANCE = 1_000_000_000n; beforeAll(async () => { + // Anchor the PXE to the checkpointed tip rather than the proposed tip. Under pipelining the + // proposed tip can be pruned when a slot ends without a checkpoint landing on L1 (e.g. when a + // time warp races `Sequencer.work`'s two epoch-cache reads and the wait-for-parent gate ends up + // pointing at the wrong slot). The checkpointed tip is L1-confirmed and cannot be pruned, so + // inflight setup txs survive the race. ({ teardown, wallet, accounts: [adminAddress, liquidityProviderAddress, otherLiquidityProviderAddress, swapperAddress], logger, - } = await setup(4, { ...PIPELINING_SETUP_OPTS })); + } = await setup(4, { ...PIPELINING_SETUP_OPTS }, { syncChainTip: 'checkpointed' })); ({ contract: token0 } = await deployToken(wallet, adminAddress, 0n, logger)); ({ contract: token1 } = await deployToken(wallet, adminAddress, 0n, logger));