ethereum-optimism / ethereum-optimism/optimism

debug_verbosity / debug_vmodule return -32603 "Log filter reload not available" on op-reth

Open Beginner friendly
#21,691 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
6.5k
Forks
4k
Avg merge
2d 15h
Merged PRs (30d)
145

Description

# Issue: `debug_verbosity` / `debug_vmodule` return `-32603 "Log filter reload not available"` on op-reth

**Repo:** `ethereum-optimism/optimism` — `rust/op-reth` (observed on `develop`)

## What happens

With the `debug` RPC namespace enabled, both runtime log-level methods fail:

```
$ curl -s $RPC -d '{"jsonrpc":"2.0","id":1,"method":"debug_verbosity","params":[3]}'
{"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"Log filter reload not available"}}

$ curl -s $RPC -d '{"jsonrpc":"2.0","id":1,"method":"debug_vmodule","params":[""]}'
{"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"Log filter reload not available"}}
```

geth returns `result: null` for both.

## Expected

`result: null` (and the log level actually changes at runtime), matching geth and the reth Ethereum CLI.

## Why it's not "method not found"

The error is `-32603` (internal error), not `-32601`. A control call to a nonexistent debug method returns `-32601`, and a no-arg call returns `-32602` — i.e. the methods are registered and the handler runs; it fails specifically at acquiring the log-reload handle.

## Root cause

The reloadable log-filter layer (added in reth [#21497](https://github.com/paradigmxyz/reth/pull/21497)) is installed only when tracing is initialized with `enable_reload = true`. The Ethereum CLI gates this on the `debug` namespace (`Cli::init_tracing` → `enable_reload = self.command.debug_namespace_enabled()`), but op-reth's separate `CliApp::init_tracing` (`rust/op-reth/crates/cli/src/app.rs`) hardcodes `false`:

```rust
self.guard = Some(self.cli.logs.init_tracing_with_layers(layers, false)?);
```

So `reth_tracing::log_handle_available()` is always `false` and `set_log_verbosity`/`set_log_vmodule` return `Err("Log filter reload not available")`. Looks like the gate simply wasn't carried over when the op-reth CLI diverged from the shared init path.

## Suggested fix

Mirror the Ethereum CLI — add `Commands::debug_namespace_enabled()` and pass it as `enable_reload`. One-line behavior change plus a small helper; `reth-rpc-server-types` (for `RethRpcModule` / `is_namespace_enabled`) is already a cli dependency. Reference implementation, fix, and downstream FAIL→PASS verification: mantle-xyz/reth#94. Happy to open a PR (patch ready).

Contributor guide

Open the contributing guide

Research direction

Start in rust/op-reth/crates/cli/src/app.rs at CliApp::init_tracing and compare it with the Ethereum CLI's tracing initialization. Check how Commands::debug_namespace_enabled and the existing reth-rpc-server-types dependency expose the debug namespace, then verify that debug_verbosity and debug_vmodule return result: null and reload logging at runtime when debug is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
86/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.