diff --git a/Cargo.toml b/Cargo.toml index 94342af7..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"] @@ -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 e5ad459b..75465c35 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,11 +567,9 @@ 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)) + trevm::EstimationResult::Success { limit, .. } => { + ResponsePayload::Success(U64::from(limit)) } trevm::EstimationResult::Revert { reason, .. } => { ResponsePayload::internal_error_with_message_and_obj(