go-ethereum/internal/ethapi/override
Minhyuk Kim 59405c40d3
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
eth/gasestimator: check ErrGasLimitTooHigh conditions (#32348)
This PR makes 2 changes to how
[EIP-7825](https://github.com/ethereum/go-ethereum/pull/31824) behaves.

When `eth_estimateGas` or `eth_createAccessList` is called without any
gas limit in the payload, geth will choose the block's gas limit or the
`RPCGasCap`, which can be larger than the `maxTxGas`.

When this happens for `estimateGas`, the gas estimation just errors out
and ends, when it should continue doing binary search to find the lowest
possible gas limit.

This PR will: 
- Add a check to see if `hi` is larger than `maxTxGas` and cap it to
`maxTxGas` if it's larger. And add a special case handling for gas
estimation execute when it errs with `ErrGasLimitTooHigh`

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-08-05 19:51:16 +08:00
..
override.go internal/ethapi: support for beacon root and withdrawals in simulate api (#31304) 2025-03-24 19:08:53 +01:00
override_test.go eth/gasestimator: check ErrGasLimitTooHigh conditions (#32348) 2025-08-05 19:51:16 +08:00