Skip to content

Report no transfer for root calls halted before running - #96

Merged
sduchesneau merged 2 commits into
release/reth-2.xfrom
bump/reth-2.11.0-fh3.1-1
Nov 11, 2026
Merged

sduchesneau merged 2 commits into
release/reth-2.xfrom
bump/reth-2.11.0-fh3.1-1

Conversation

@sduchesneau

@sduchesneau sduchesneau commented Nov 11, 2026 •

Copy link
Copy Markdown

Merging this PR releases reth-v2.11.0-fh3.1-1.

Bug

On Amsterdam, reth-v2.11.0-fh3.1 reports a value transfer that never happened. When a transaction's root call sends value and runs out of gas in the EIP-2780 runtime gas phase, the block shows a REASON_TRANSFER debit of the sender and credit of the recipient inside the failed root call. evm2 halts before the value moves, so go-ethereum reports no transfer. reth-v2.10.0-fh3.1 did not report it either.

A Sepolia block had 7 such transactions: 3 wei sent to an empty account with a 24000 gas limit, too little for the new-account state gas. The sender's next REASON_GAS_BUY starts from the balance before the reported debit.

Cause

evm2 66687c18 runs the root frame's call/call_end hooks for a transaction halted in the runtime gas phase (go-ethereum's haltTopFrame). In exit_frame, the inspector takes a value transfer the journal never showed as one that happened and was rolled back, unless the call stopped with OutOfFunds or CallTooDeep. The halted frame stops with OutOfGas, so the inspector reported its transfer.

Fix

evm2 gives the hooks no sign that the frame was halted. halted_in_runtime_gas_phase repeats the two out-of-gas halts of evm2's ethereum::prepare_initial_frame, and exit_frame skips the transfer of a root call that matches either:

  • value sent to an empty recipient: a call to an empty account runs no code, and a precompile that runs out of gas stops with PrecompileOOG, so OutOfGas means the new-account charge failed;
  • an EIP-7702 delegated recipient whose delegation was never resolved (code_address == call_target): the delegate access charge failed.

The helper's doc comment says it must stay in sync with prepare_initial_frame. Replacing it with a flag from evm2 on the halted frame needs an upstream evm2 change.

Tests

New tests in inspector/tests/balance.rs:

  • root_call_halted_on_new_account_gas_reports_no_transfer and root_call_halted_on_delegation_access_gas_reports_no_transfer fail without the fix.
  • root_call_to_precompile_out_of_gas_reports_the_transfer checks that a value call to an empty precompile that pays the new-account charge and then runs out of gas still reports its transfer.

cargo test -p reth-firehose -p reth-firehose-tests passes (84 + 9 tests).

Battlefield reth-dev (Amsterdam): the new test in streamingfast/battlefield-ethereum#48 fails on reth-v2.11.0-fh3.1 and passes on this branch. The full suite on this branch has 95 passing, 0 failing and 43 pending, Compare blocks included.

On Amsterdam, evm2 runs the root frame hooks for a transaction whose
runtime gas phase ran out of gas, so the inspector took the value of
that call as transferred and rolled back. It never moved.
@sduchesneau sduchesneau added the bug Something isn't working label Nov 11, 2026
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Merging this PR will release reth-v2.11.0-fh3.1-1

Release notes

Fixed

  • On Amsterdam, a transaction whose root call sends value and runs out of gas in its runtime gas
    phase no longer reports a REASON_TRANSFER debit of the sender and credit of the recipient.
    The value never moves, and go-ethereum reports no transfer. This happens when the recipient is
    empty and the transaction cannot pay its new-account state gas, or when the recipient is an
    EIP-7702 delegated account and the transaction cannot pay to access the delegate.
    reth-v2.11.0-fh3.1 reported the transfer.

@sduchesneau
sduchesneau marked this pull request as ready for review November 11, 2026 16:35
@sduchesneau
sduchesneau requested a review from maoueh November 11, 2026 16:35
@sduchesneau
sduchesneau merged commit 1c41ea3 into release/reth-2.x Nov 11, 2026
5 checks passed
@sduchesneau
sduchesneau deleted the bump/reth-2.11.0-fh3.1-1 branch November 11, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant