Skip to content

reth 2.0: debug_traceCall{,Many} prestateTracer diffMode shows phantom gas credits when gasPrice > 0 #23475

@davidberiro

Description

@davidberiro

Describe the bug

reth v2.0.0 appears to have a regression in simulation tracing endpoints that set
cfg_env.disable_fee_charge = true, notably:

  • debug_traceCall
  • debug_traceCallMany

When these are used with prestateTracer and diffMode: true, and the traced call
specifies gasPrice > 0 and an explicit gas > 0, the returned state diff can show:

  • the caller balance increasing by a gas-price-scaled amount
  • the beneficiary / coinbase balance increasing as well

This is a phantom balance change during simulation and should not happen.

This does not appear to be a reth DB issue. The root cause is upstream in
revm-handler and has been fixed here:

The issue is that calculate_caller_fee respects disable_fee_charge, but
reimburse_caller and reward_beneficiary still ran unconditionally in the affected
revm-handler version, which causes gas-related balances to be credited even though the
upfront charge was skipped.

reth v2.0.0 resolves revm-handler 17.0.0, which appears affected.
For comparison, reth v1.11.3 resolved revm-handler 15.0.0.

Additional context

This seems best tracked in reth so users hitting it through reth RPC can find the
upstream fix and so reth can update once a revm release includes:

Steps to reproduce

  1. Run reth v2.0.0.
  2. Call debug_traceCall or debug_traceCallMany with:
    • tracer: "prestateTracer"
    • tracerConfig: { "diffMode": true }
    • a transaction/call object with explicit gas > 0
    • gasPrice > 0
  3. Inspect the returned diff.
  4. Observe that the caller balance increases by a gas-price-scaled amount instead of
    remaining unchanged for simulation.

The bug disappears when gasPrice = 0, which is consistent with the upstream
revm-handler fee-handling regression.

Node logs


Platform(s)

Mac (Apple Silicon)

Container Type

Not running in a container

What version/commit are you on?

Reth Version: 2.0.0
Commit SHA: eb4c15e
Build Timestamp: 2026-04-07T12:54:52.441107000Z
Build Features: asm_keccak,jemalloc,keccak_cache_global,min_debug_logs,otlp,otlp_logs
Build Profile: maxperf

What database version are you on?

Current database version: 2
Local database version: 2

Which chain / network are you on?

mainnet

What type of node are you running?

Full via --full flag

What prune config do you use, if any?

No response

If you've built Reth from source, provide the full command you used

No response

Code of Conduct

  • I agree to follow the Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugAn unexpected or incorrect behaviorS-needs-triageThis issue needs to be labelled

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions