go-ethereum/core/txpool/legacypool
rayoo 0ab02b4383 core/txpool/legacypool: skip MaxTxGas purge when Amsterdam is active
PR #34841 lifts the EIP-7825 per-transaction gas cap once Amsterdam
(EIP-8037) is active, since tx.Gas() then includes the state-gas
reservoir in addition to the regular gas dimension. The PR added an
!IsAmsterdam guard in five call sites (txpool.ValidateTransaction,
state_transition.preCheck, miner.fillTransactions, eth/gasestimator,
cmd/evm t8ntool) but missed one: legacypool.runReorg still purges all
transactions with tx.Gas() > MaxTxGas at the Osaka fork boundary,
regardless of whether Amsterdam is also active on the new head.

On a chain that activates Osaka and Amsterdam at the same timestamp
(the expected EIP-8037 devnet/testnet layout before mainnet cuts the
two forks), the first reorg crossing that boundary deletes otherwise
valid Amsterdam transactions whose total gas legitimately exceeds
MaxTxGas.

Add the missing IsAmsterdam guard so the purge matches the stated
semantics of #34841. Add a regression test that constructs a chain
config with OsakaTime == AmsterdamTime, injects a tx with
gas = MaxTxGas+100k in the pre-fork state, and verifies the tx
survives the reorg into the post-fork head. The test fails on master
and passes with this change.
2026-04-30 18:11:14 +08:00
..
legacypool.go core/txpool/legacypool: skip MaxTxGas purge when Amsterdam is active 2026-04-30 18:11:14 +08:00
legacypool2_test.go eth: add tx to locals only if it has a chance of acceptance (#31618) 2025-04-17 21:27:48 +02:00
legacypool_test.go core/txpool/legacypool: skip MaxTxGas purge when Amsterdam is active 2026-04-30 18:11:14 +08:00
list.go core/txpool: add sanity overflow check (#32544) 2025-09-10 21:33:15 +08:00
list_test.go core/types: fix transaction pool price-heap comparison (#33923) 2026-03-02 23:42:39 +01:00
noncer.go all: move main transaction pool into a subpool (#27463) 2023-06-16 15:29:40 +03:00
queue.go core/txpool/legacypool: clarify and fix non-executable tx heartbeat (#33704) 2026-01-29 10:53:55 +01:00