diff --git a/Cargo.lock b/Cargo.lock index c22e923952..969ed1ddb6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5986,6 +5986,7 @@ dependencies = [ "hyper", "jsonrpsee", "jsonwebtoken", + "lazy_static", "pin-project", "rand 0.8.5", "rayon", diff --git a/crates/rpc/rpc-api/src/debug.rs b/crates/rpc/rpc-api/src/debug.rs index 6fba56c83d..9137701742 100644 --- a/crates/rpc/rpc-api/src/debug.rs +++ b/crates/rpc/rpc-api/src/debug.rs @@ -123,4 +123,10 @@ pub trait DebugApi { opts: Option, state_override: Option, ) -> RpcResult>; + + /// Sets the logging backtrace location. When a backtrace location is set and a log message is + /// emitted at that location, the stack of the goroutine executing the log statement will + /// be printed to stderr. + #[method(name = "backtraceAt")] + async fn debug_backtrace_at(&self, location: &str) -> RpcResult<()>; } diff --git a/crates/rpc/rpc/Cargo.toml b/crates/rpc/rpc/Cargo.toml index 756fefd8a1..3be464d0af 100644 --- a/crates/rpc/rpc/Cargo.toml +++ b/crates/rpc/rpc/Cargo.toml @@ -25,6 +25,7 @@ reth-tasks.workspace = true reth-metrics.workspace = true reth-consensus-common = { path = "../../consensus/common" } reth-rpc-types-compat.workspace = true +lazy_static = "*" # eth revm = { workspace = true, features = [ diff --git a/crates/rpc/rpc/src/debug.rs b/crates/rpc/rpc/src/debug.rs index 147c2a9f35..aac4f176ef 100644 --- a/crates/rpc/rpc/src/debug.rs +++ b/crates/rpc/rpc/src/debug.rs @@ -643,6 +643,10 @@ where Ok(res.into()) } + async fn debug_backtrace_at(&self, _location: &str) -> RpcResult<()> { + Ok(()) + } + /// Handler for `debug_getRawBlock` async fn raw_block(&self, block_id: BlockId) -> RpcResult { let block = self.inner.provider.block_by_id(block_id).to_rpc_result()?;