Skip to content

debug_trace* rejects an empty tracer string instead of using the opcode logger #1901

Closed

Description

@Wodann

Problem

The Ethereum execution-apis spec says of the tracer field in TraceConfig: "When absent or empty, the opcode (struct) logger is used." EDR rejects an empty string.

Request:

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

Response:

{ "error": { "code": -32602, "message": "JS Tracer is not enabled" } }

The same happens for debug_traceCall. Hardhat 2 forwards tracing options unchanged (NomicFoundation/hardhat#7985), so its users see this error too.

Cause

alloy_rpc_types_trace::geth::GethDebugTracerType is #[serde(untagged)] over BuiltInTracer(GethDebugBuiltInTracerType) and JsTracer(String). Any string that is not a built-in name, including the empty string, deserialises as JsTracer. DebugInspector::new in revm-inspectors then returns DebugInspectorError::JsTracerNotEnabled, which edr_provider::debug_trace::DebugTraceError::from_debug_inspector_creation_error maps to JsTracerNotEnabled.

Possible fixes

  • In edr_provider, treat tracer: Some(JsTracer("")) as tracer: None before constructing the DebugInspector, in both debug_trace_transaction and ProviderData::debug_trace_call.
  • Or upstream in alloy, so an empty string deserialises to None.

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