From 404ecbb4f7f72f72e3c027000ca0931bef3969a5 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 18 Jun 2025 11:48:52 -0400 Subject: [PATCH 1/3] refactor: clean up some tracing mistakes we've made --- crates/rpc/src/eth/endpoints.rs | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/crates/rpc/src/eth/endpoints.rs b/crates/rpc/src/eth/endpoints.rs index e5ad459b..7f29afc8 100644 --- a/crates/rpc/src/eth/endpoints.rs +++ b/crates/rpc/src/eth/endpoints.rs @@ -29,7 +29,7 @@ use reth_rpc_eth_api::{RpcBlock, RpcHeader, RpcReceipt, RpcTransaction}; use serde::Deserialize; use signet_evm::EvmErrored; use std::borrow::Cow; -use tracing::{trace_span, Instrument}; +use tracing::{debug, trace_span, Instrument}; use trevm::revm::context::result::ExecutionResult; /// Args for `eth_estimateGas` and `eth_call`. @@ -447,10 +447,7 @@ where } }; - tracing::span::Span::current().record("block_cfg", format!("{:?}", &block_cfg)); - // Set up trevm - let trevm = response_tri!(ctx.trevm(id, &block_cfg)); let mut trevm = response_tri!(trevm.maybe_apply_state_overrides(state_overrides.as_ref())) @@ -461,7 +458,11 @@ where // modify the gas cap. let new_gas = response_tri!(trevm.cap_tx_gas()); if Some(new_gas) != request.gas { - tracing::span::Span::current().record("request", format!("{:?}", &request)); + debug!( + req_gas = ?request.gas, + new_gas, + "capping gas for call", + ); } let execution_result = response_tri!(trevm.call().map_err(EvmErrored::into_error)).0; @@ -541,8 +542,6 @@ where let max_gas = ctx.signet().config().rpc_gas_cap; normalize_gas_stateless(&mut request, max_gas); - tracing::span::Span::current().record("normalized_gas", format!("{:?}", request.gas)); - let task = async move { // Get the block cfg from backend, erroring if it fails let block_cfg = match ctx.signet().block_cfg(id).await { @@ -555,8 +554,6 @@ where } }; - tracing::span::Span::current().record("block_cfg", format!("{:?}", &block_cfg)); - let trevm = response_tri!(ctx.trevm(id, &block_cfg)); // Apply state and block overrides (state overrides are fallible as @@ -570,8 +567,6 @@ where let (estimate, _) = response_tri!(trevm.estimate_gas().map_err(EvmErrored::into_error)); - tracing::span::Span::current().record("estimate", format!("{:?}", &estimate)); - match estimate { trevm::EstimationResult::Success { estimation, .. } => { ResponsePayload::Success(U64::from(estimation)) From df62e9d3bb7dd05e243144e24c18e081878184b2 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 18 Jun 2025 12:16:52 -0400 Subject: [PATCH 2/3] fix: update trevm --- Cargo.toml | 2 +- crates/rpc/src/eth/endpoints.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 94342af7..51ef29f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,7 +49,7 @@ signet-zenith = { version = "0.2.0", path = "crates/zenith" } ajj = { version = "0.3.4" } # trevm -trevm = { version = "0.23.4", features = ["full_env_cfg"] } +trevm = { version = "0.23.7", features = ["full_env_cfg"] } # Alloy periphery crates alloy = { version = "=1.0.11", features = [ diff --git a/crates/rpc/src/eth/endpoints.rs b/crates/rpc/src/eth/endpoints.rs index 7f29afc8..75465c35 100644 --- a/crates/rpc/src/eth/endpoints.rs +++ b/crates/rpc/src/eth/endpoints.rs @@ -568,8 +568,8 @@ where let (estimate, _) = response_tri!(trevm.estimate_gas().map_err(EvmErrored::into_error)); match estimate { - trevm::EstimationResult::Success { estimation, .. } => { - ResponsePayload::Success(U64::from(estimation)) + trevm::EstimationResult::Success { limit, .. } => { + ResponsePayload::Success(U64::from(limit)) } trevm::EstimationResult::Revert { reason, .. } => { ResponsePayload::internal_error_with_message_and_obj( From 6b99ea2267901a0e0551bb256ada43be1b3ebc47 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 18 Jun 2025 12:17:10 -0400 Subject: [PATCH 3/3] fix: minor --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 51ef29f5..100f9231 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["crates/*"] resolver = "2" [workspace.package] -version = "0.2.3" +version = "0.2.4" edition = "2021" rust-version = "1.81" authors = ["init4"]