2 min read
Add as a preferred source on Google

Geth Draft Would Revise Ethereum Gas Estimates for Failed Contract Calls

In a replay of 432 mainnet transactions, the proposed change corrected 64 of 67 identified gas shortfalls. It remains a draft.

Mentioned assets
A complete outer ring surrounds a broken inner gear / TokenPost.ai
A complete outer ring surrounds a broken inner gear / TokenPost.ai

A draft Geth change would make Ethereum gas estimates account for failed internal contract calls, addressing transactions that finish successfully while leaving users without the result they expected.

The proposal, dated Nov. 8, comes from Spencer Taylor-Brown. Ethereum’s eth_estimateGas method estimates how much gas a transaction needs to complete. That test can miss a failed step inside a smart contract when the contract catches the failure and allows the transaction to finish.

A contract could record the failed call, issue a refund or skip an item. The sender may then see a completed transaction despite getting a different outcome from the one intended. The Geth draft would count failed internal calls and contract creations while searching for a suitable gas limit.

It would compare each candidate limit with a reference execution given more gas, rejecting a candidate that produces more internal failures. A call that fails in both runs would not, by itself, force the estimate higher.

Taylor-Brown replayed 432 Ethereum mainnet transactions under proposed Amsterdam rules. Of 67 identified estimates that left a nested call short of gas, the change corrected 64. The median recommended gas limit rose 4% among those corrected cases, while another 254 estimates were unchanged. The three missed cases involved contracts that skipped work after checking remaining gas, without an internal call failing.

The 4% figure measures a change in recommended limits for the corrected cases, not a change in transaction fees. A gas limit caps consumption; the fee paid in Ether (ETH) depends on gas actually used and the price per unit.

The problem can occur under existing Ethereum rules. EIP-8037 would meter gas for execution and state creation separately. Taylor-Brown said its refund behavior could make internal-call shortfalls more common.

The Ethereum Foundation delayed Glamsterdam’s Hoodi activation as developers examine contract risks involving EIP-8037 and EIP-8038. Gary Rong responded to the Geth proposal: “Good catch! Will bring it to team triage session.”

At 4:22 a.m. ET (09:22 UTC) Nov. 10, the Geth change and a companion draft for the Ethereum Execution API specification remained proposals. No rollout date has been announced.

Simon Yoon

Reporter

Simon Yoon reports on blockchain technology for TokenPost. Send corrections or tips to info@tokenpost.com.

Loading…