go-ethereum/core
Giulio rebuffo 01036bed83
Some checks failed
/ Linux Build (push) Has been cancelled
/ Linux Build (arm) (push) Has been cancelled
/ Keeper Build (push) Has been cancelled
/ Windows Build (push) Has been cancelled
/ Docker Image (push) Has been cancelled
core: skip tx gas cap after Amsterdam (#34841)
EIP-7825 caps the transaction gas limit at `MaxTxGas`, but after
Amsterdam/EIP-8037 the transaction gas limit can include state gas
reservoir in addition to the regular gas dimension. Applying the Osaka
cap to the full `tx.Gas()` rejects otherwise valid Amsterdam
transactions that need more than `MaxTxGas` total gas because of state
gas, while their regular gas use remains within the intended limit.

This changes geth to stop applying the full transaction gas cap once
Amsterdam is active:

- txpool stateless validation no longer rejects `tx.Gas() > MaxTxGas`
under Amsterdam
- legacy pool reorg cleanup does not purge high-total-gas transactions
at the Osaka transition if Amsterdam is also active
- execution precheck mirrors the txpool behavior and does not reject
high-total-gas messages under Amsterdam

The block gas limit check remains in place, so transactions still cannot
request more total gas than the current block gas limit.

Validation run:

```
go test ./core/txpool ./core/txpool/legacypool
go test ./core -run TestStateProcessorErrors
```

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2026-04-28 17:25:16 +02:00
..
filtermaps core/filtermaps: remove dead condition check (#34695) 2026-04-10 17:41:59 +02:00
forkid params: set osaka and BPO1 & BPO2 mainnet dates (#33063) 2025-11-03 17:41:22 +01:00
history cmd/geth: add Prague pruning points for hoodi (#34714) 2026-04-14 14:58:27 +02:00
overlay cmd, core, trie, triedb: split CachingDB into merkle + binary dbs. (#34700) 2026-04-17 08:55:54 +08:00
rawdb core/rawdb: clarify ReadLastPivotNumber comment (#34773) 2026-04-21 09:19:03 +08:00
state core/state: opt stateObject.GetState (#34825) 2026-04-28 20:33:40 +08:00
stateless core/stateless: fix parsing an empty witness (#34683) 2026-04-09 09:19:54 +08:00
tracing core/vm, eth, tests: introduce gas budget (#34712) 2026-04-20 15:33:29 +08:00
txpool core: skip tx gas cap after Amsterdam (#34841) 2026-04-28 17:25:16 +02:00
types core/types/bal: update the BAL definition to the latest spec (#34799) 2026-04-26 23:32:39 +08:00
vm core/vm: implement stack arena (#33960) 2026-04-28 11:10:44 +02:00
.gitignore Renamed chain => core 2014-12-04 10:28:02 +01:00
bench_test.go core/vm, eth, tests: introduce gas budget (#34712) 2026-04-20 15:33:29 +08:00
bintrie_witness_test.go core/vm, eth, tests: introduce gas budget (#34712) 2026-04-20 15:33:29 +08:00
block_validator.go core,miner: implement EIP-7934 - RLP Execution Block Size Limit (#31990) 2025-07-09 11:24:44 +02:00
block_validator_test.go eth/catalyst: add initial OpenTelemetry tracing for newPayload (#33521) 2026-02-17 17:08:57 +01:00
blockchain.go cmd, core, trie, triedb: split CachingDB into merkle + binary dbs. (#34700) 2026-04-17 08:55:54 +08:00
blockchain_insert.go core: remove unused peek function in insertIterator (#33155) 2025-11-12 15:30:16 +08:00
blockchain_reader.go cmd, core, trie, triedb: split CachingDB into merkle + binary dbs. (#34700) 2026-04-17 08:55:54 +08:00
blockchain_repair_test.go core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
blockchain_sethead_test.go core, miner, tests: introduce codedb and simplify cachingDB (#33816) 2026-03-10 08:29:21 +01:00
blockchain_snapshot_test.go triedb/pathdb, eth: use double-buffer mechanism in pathdb (#30464) 2025-06-22 20:40:54 +08:00
blockchain_stats.go core, miner, tests: introduce codedb and simplify cachingDB (#33816) 2026-03-10 08:29:21 +01:00
blockchain_test.go cmd, core, trie, triedb: split CachingDB into merkle + binary dbs. (#34700) 2026-04-17 08:55:54 +08:00
chain_makers.go consensus, core, internal, miner: remove FinalizeAndAssemble (#34726) 2026-04-21 20:58:21 +02:00
chain_makers_test.go core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
dao_test.go core: consolidate BlockChain constructor options (#31925) 2025-06-19 12:21:15 +02:00
error.go core, internal/ethapi: fix incorrect max-initcode RPC error mapping (#34067) 2026-03-23 22:10:32 +08:00
eth_transfer_logs_test.go core, core/vm: implement EIP-7708 (#33645) 2026-03-23 22:29:53 +08:00
events.go ethstats: report newPayload processing time to stats server (#33395) 2026-01-05 17:49:30 +01:00
evm.go core, core/vm: implement EIP-7708 (#33645) 2026-03-23 22:29:53 +08:00
gaspool.go core: implement eip-7778: block gas accounting without refunds (#33593) 2026-03-04 18:18:18 +08:00
gen_genesis.go core/vm: implement eip-7843: SLOTNUM (#33589) 2026-02-26 13:53:46 +01:00
genesis.go cmd, core, trie, triedb: split CachingDB into merkle + binary dbs. (#34700) 2026-04-17 08:55:54 +08:00
genesis_alloc.go params: add hoodi testnet definition (#31406) 2025-03-18 12:07:49 +01:00
genesis_test.go cmd, core, trie, triedb: split CachingDB into merkle + binary dbs. (#34700) 2026-04-17 08:55:54 +08:00
headerchain.go core/rawdb: reduce allocations in rawdb.ReadHeaderNumber (#31913) 2025-07-15 15:48:36 +02:00
headerchain_test.go core/state, core/tracing: new state update hook (#33490) 2026-01-08 11:07:19 +08:00
mkalloc.go accounts, cmd/geth, core: close opened files (#29598) 2024-04-30 15:47:21 +02:00
rlp_test.go crypto/keccak: vendor in golang.org/x/crypto/sha3 (#33323) 2026-02-03 14:55:27 -07:00
sender_cacher.go core: use sync.Once for SenderCacher initialization (#31029) 2025-01-16 14:36:45 +01:00
state_prefetcher.go core/vm: implement stack arena (#33960) 2026-04-28 11:10:44 +02:00
state_processor.go core/vm: implement stack arena (#33960) 2026-04-28 11:10:44 +02:00
state_processor_test.go core/vm: implement eip-7843: SLOTNUM (#33589) 2026-02-26 13:53:46 +01:00
state_transition.go core: skip tx gas cap after Amsterdam (#34841) 2026-04-28 17:25:16 +02:00
stateless.go core: fix code database initialization in stateless mode (#34011) 2026-03-16 09:45:26 +01:00
txindexer.go core/rawdb: reduce allocations in rawdb.ReadHeaderNumber (#31913) 2025-07-15 15:48:36 +02:00
txindexer_test.go core/rawdb: integrate eradb backend for RPC (#31604) 2025-06-03 10:47:38 +02:00
types.go eth/catalyst: add initial OpenTelemetry tracing for newPayload (#33521) 2026-02-17 17:08:57 +01:00