core: fix pre-check for account balance under EIP-1559 (#23244)
When processing a transaction with London fork rules, EIP-1559 mandates
checking that the sender must have sufficient balance to cover gas * gasFeeCap.
In the EIP's pseudocode, this check happens after the value transferred by the
transaction has already been deducted. However, in go-ethereum, the balance
has not yet been updated when the check happens, and therefore needs to be
added explicitly.
Co-authored-by:
Martin Holst Swende <martin@swende.se>
Showing
- cmd/evm/testdata/12/alloc.json 11 additions, 0 deletionscmd/evm/testdata/12/alloc.json
- cmd/evm/testdata/12/env.json 10 additions, 0 deletionscmd/evm/testdata/12/env.json
- cmd/evm/testdata/12/readme.md 40 additions, 0 deletionscmd/evm/testdata/12/readme.md
- cmd/evm/testdata/12/txs.json 20 additions, 0 deletionscmd/evm/testdata/12/txs.json
- core/state_processor_test.go 1 addition, 1 deletioncore/state_processor_test.go
- core/state_transition.go 1 addition, 0 deletionscore/state_transition.go
- eth/tracers/api_test.go 1 addition, 1 deletioneth/tracers/api_test.go
Loading
Please register or sign in to comment