Commit 9dc804b
authored
fix(sequencer): use evmMine in automine auto-settle to avoid dropping test L1 txs (#24421)
The local-network `AutomineSequencer` auto-settle loop hangs a test's
direct L1 tx (~180s viem `WaitForTransactionReceiptTimeoutError`),
surfacing as the `e2e_token_bridge_tutorial` flake.
## Context
After `markAsProven`, `runProve()` called `mineEmptyBlock()` purely to
advance the L1 block hash so the archiver re-reads the proven tip.
`mineEmptyBlock` drops and re-adds the anvil mempool non-atomically
(snapshot → `anvil_dropAllTransactions` → mine → re-add snapshotted
txs). A direct test L1 tx submitted in the snapshot→drop window is
dropped and never re-added; with the sequencer otherwise idle it is
never mined, so the caller hangs until viem times out.
## Approach
Replace `mineEmptyBlock()` with `evmMine()` at that call site.
`evm_mine` advances the block hash and includes whatever is pending,
with no mempool drop and no automine toggle — so there is no race
window. The call site only needs a new block hash, not an empty block.
`mineEmptyBlock()` itself is unchanged: its other callers invoke it
single-threaded with no concurrent external tx and some rely on the
block being empty, and making it race-safe across independent RPC
clients is out of scope.1 parent d3e4633 commit 9dc804b
1 file changed
Lines changed: 6 additions & 3 deletions
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
715 | 715 | | |
716 | 716 | | |
717 | 717 | | |
718 | | - | |
719 | | - | |
720 | | - | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
721 | 724 | | |
722 | 725 | | |
723 | 726 | | |
| |||
0 commit comments