go-ethereum/core/txpool
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
..
blobpool cmd, core, trie, triedb: split CachingDB into merkle + binary dbs. (#34700) 2026-04-17 08:55:54 +08:00
legacypool core/txpool/legacypool: skip MaxTxGas purge when Amsterdam is active 2026-04-30 18:11:14 +08:00
locals cmd, core, trie, triedb: split CachingDB into merkle + binary dbs. (#34700) 2026-04-17 08:55:54 +08:00
errors.go core/txpool: drop peers on invalid KZG proofs 2026-01-13 17:12:08 +01:00
reserver.go core/txpool: allow tx and authority regardless of admission order (#31373) 2025-04-09 19:11:24 -06:00
subpool.go miner: add OpenTelemetry spans for block building path (#33773) 2026-03-16 19:24:41 +01:00
txpool.go cmd, core, trie, triedb: split CachingDB into merkle + binary dbs. (#34700) 2026-04-17 08:55:54 +08:00
validation.go core: skip tx gas cap after Amsterdam (#34841) 2026-04-28 17:25:16 +02:00
validation_test.go core/txpool: add eip2681 check for incoming transactions (#32726) 2025-09-25 13:15:12 +02:00