Geth developer proposes fix for Ethereum gas estimates missing failed internal calls

Editorial illustration: Layered transparent panels bearing an Ethereum symbol contain a glowing green loop surrounding a smaller red pathway with a break in its center.

In brief

  • Geth draft pull request #36084 proposes a stricter definition of success for gas estimates.
  • Current gas estimates can ignore failed internal calls between smart contracts.
  • A replay of 432 mainnet transactions fixed 64 of 67 cases, the developer said.
  • The proposal remains a draft from one developer, not a merged change.

Where the current estimator falls short

The problem shows up when one smart contract calls another, catches an error and then carries on (issuing a refund, recording the failure or skipping an item), according to U.Today. The transaction completes. The user's intended action doesn't.

That gap matters for wallets. Per the report, a wallet could suggest a gas limit that's high enough to finish the transaction but not high enough to complete the work inside it, because the estimator only checks whether the transaction completes. The developer also noted that EIP-8037 could make this behavior more common, since gas returned from failed internal execution can help fund the fallback.

How the proposed fix works

The draft pull request introduces a stricter definition of success for gas estimates. Instead of only checking whether a transaction completes, the proposed Geth version counts failed internal calls and contract creations. An estimate gets rejected if it produces more internal failures than a reference execution with a higher gas limit, even when the transaction itself completes.

That reference run is the key piece (it lets the estimator keep failures that already exist without allowing extra ones caused by insufficient gas). The developer stressed that an internal call that always fails shouldn't push the estimate higher indefinitely. A separate Amsterdam reference is also included to prevent unnecessary increases made only to access the state gas reservoir.

Replay results and open questions

The developer said they replayed 432 mainnet transactions under the Amsterdam update rules and that the change fixed 64 of 67 cases. The report's wider breakdown of those replays doesn't add up to 432, so we're leaving the other figures out until they can be checked against the PR.

It's a draft pull request from one developer, not a merged change.

U.Today assessed that the change should make wallet estimates more reliable and reduce transactions that complete without the intended result, though it would raise gas limits in some cases. The outlet added that there's no proven link between higher gas limits and higher fees.

Frequently asked questions

Why can an Ethereum transaction succeed while the user's action fails?

A smart contract can call another contract, catch an error, and then issue a refund, record the failure or skip an item. The transaction technically succeeds, but the user doesn't get the intended outcome, according to U.Today's report on Geth pull request #36084.

How does the proposed Geth gas estimation fix work?

The draft counts failed internal calls and contract creations instead of only checking whether a transaction completes. An estimate is rejected if it produces more internal failures than a reference execution with a higher gas limit, even if the transaction completes.

Has the Geth gas estimation change been tested?

The developer said they replayed 432 mainnet transactions under the Amsterdam update rules and that the change fixed 64 of 67 cases. The proposal is still a draft pull request.