You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
debug_trace* rejects an empty tracer string instead of using the opcode logger #1901
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.
{ "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.
Found while writing the debug_trace* contract tests in crates/edr_provider/src/requests/debug/tests.rs on the test/debug-trace-contract branch. A test for this requirement can be added once the behaviour is fixed.
Activity
Wodann commentedon Oct 29, 2026
Fixed on
mainby the revm-inspectors 0.44 upgrade in #1847, and pinned by a test in #1907.