go-ethereum/internal/ethapi
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 eth/gasestimator: check ErrGasLimitTooHigh conditions (#32348) 2025-08-05 19:51:16 +08:00
testdata core/types: blockTimestamp in logs is hex-encoded (#32129) 2025-07-01 16:53:10 +02:00
addrlock.go all: update license information (#16089) 2018-02-14 13:49:11 +01:00
api.go all: define constructor for BlobSidecar (#32213) 2025-07-17 11:19:20 +08:00
api_test.go all: define constructor for BlobSidecar (#32213) 2025-07-17 11:19:20 +08:00
backend.go ethapi: reduce some of the wasted effort in GetTransactionReceipt (#32021) 2025-07-01 15:18:49 +08:00
dbapi.go all: remove concept of public/private API definitions (#25053) 2022-06-21 12:05:43 +03:00
errors.go all: fix outdated ethereum wiki json-rpc json-rpc doc links (#32209) 2025-07-14 16:08:06 -06:00
logtracer.go internal/ethapi: eth_multicall (#27720) 2024-09-06 11:31:00 +02:00
simulate.go eth/filters: add timestamp to derived logs (#31887) 2025-06-10 11:52:02 +02:00
simulate_test.go internal/ethapi: update default simulation timestamp increment to 12 (#30981) 2025-01-03 20:15:06 +08:00
transaction_args.go all: define constructor for BlobSidecar (#32213) 2025-07-17 11:19:20 +08:00
transaction_args_test.go ethapi: reduce some of the wasted effort in GetTransactionReceipt (#32021) 2025-07-01 15:18:49 +08:00