Skip to content

debug_trace* ignores the limit tracing option #1902

Closed

Description

@Wodann

Problem

The Ethereum execution-apis spec defines the limit field of TraceConfig as the "maximum number of opcode steps to capture. Zero means no limit. When the limit is reached, execution continues but no further StructLog entries are recorded." EDR accepts the field and ignores it.

Request, for a transaction that executes seven opcodes:

{ "method": "debug_traceTransaction", "params": ["<hash>", { "limit": 2 }] }

Response: structLogs has seven entries.

Hardhat 2 forwards tracing options unchanged (NomicFoundation/hardhat#7985), so its users get the full trace too.

Cause

alloy_rpc_types_trace::geth::GethDefaultTracingOptions has a limit: Option<u64> field, but revm-inspectors never reads it. TracingInspectorConfig::from_geth_config only maps enable_memory, disable_stack, disable_storage and enable_return_data, and CallTraceArena::geth_traces emits every recorded step.

Possible fixes

  • Upstream in revm-inspectors, stop recording steps once limit steps have been emitted, or truncate in geth_traces.
  • Or in edr_provider, truncate structLogs to limit entries after DebugInspector::get_result when limit is non-zero.

References

Activity

  1. Wodann commented on Oct 29, 2026

    @Wodann
    MemberAuthor

    Fixed on main by the revm-inspectors 0.44 upgrade in #1847, and pinned by a test in #1907.

  2. moved this from Inbox to Done in EDRon Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions