@@ -29,7 +29,7 @@ use reth_rpc_eth_api::{RpcBlock, RpcHeader, RpcReceipt, RpcTransaction};
2929use serde:: Deserialize ;
3030use signet_evm:: EvmErrored ;
3131use std:: borrow:: Cow ;
32- use tracing:: { trace_span, Instrument } ;
32+ use tracing:: { debug , trace_span, Instrument } ;
3333use trevm:: revm:: context:: result:: ExecutionResult ;
3434
3535/// Args for `eth_estimateGas` and `eth_call`.
@@ -447,10 +447,7 @@ where
447447 }
448448 } ;
449449
450- tracing:: span:: Span :: current ( ) . record ( "block_cfg" , format ! ( "{:?}" , & block_cfg) ) ;
451-
452450 // Set up trevm
453-
454451 let trevm = response_tri ! ( ctx. trevm( id, & block_cfg) ) ;
455452
456453 let mut trevm = response_tri ! ( trevm. maybe_apply_state_overrides( state_overrides. as_ref( ) ) )
@@ -461,7 +458,11 @@ where
461458 // modify the gas cap.
462459 let new_gas = response_tri ! ( trevm. cap_tx_gas( ) ) ;
463460 if Some ( new_gas) != request. gas {
464- tracing:: span:: Span :: current ( ) . record ( "request" , format ! ( "{:?}" , & request) ) ;
461+ debug ! (
462+ req_gas = ?request. gas,
463+ new_gas,
464+ "capping gas for call" ,
465+ ) ;
465466 }
466467
467468 let execution_result = response_tri ! ( trevm. call( ) . map_err( EvmErrored :: into_error) ) . 0 ;
@@ -541,8 +542,6 @@ where
541542 let max_gas = ctx. signet ( ) . config ( ) . rpc_gas_cap ;
542543 normalize_gas_stateless ( & mut request, max_gas) ;
543544
544- tracing:: span:: Span :: current ( ) . record ( "normalized_gas" , format ! ( "{:?}" , request. gas) ) ;
545-
546545 let task = async move {
547546 // Get the block cfg from backend, erroring if it fails
548547 let block_cfg = match ctx. signet ( ) . block_cfg ( id) . await {
@@ -555,8 +554,6 @@ where
555554 }
556555 } ;
557556
558- tracing:: span:: Span :: current ( ) . record ( "block_cfg" , format ! ( "{:?}" , & block_cfg) ) ;
559-
560557 let trevm = response_tri ! ( ctx. trevm( id, & block_cfg) ) ;
561558
562559 // Apply state and block overrides (state overrides are fallible as
@@ -570,11 +567,9 @@ where
570567
571568 let ( estimate, _) = response_tri ! ( trevm. estimate_gas( ) . map_err( EvmErrored :: into_error) ) ;
572569
573- tracing:: span:: Span :: current ( ) . record ( "estimate" , format ! ( "{:?}" , & estimate) ) ;
574-
575570 match estimate {
576- trevm:: EstimationResult :: Success { estimation , .. } => {
577- ResponsePayload :: Success ( U64 :: from ( estimation ) )
571+ trevm:: EstimationResult :: Success { limit , .. } => {
572+ ResponsePayload :: Success ( U64 :: from ( limit ) )
578573 }
579574 trevm:: EstimationResult :: Revert { reason, .. } => {
580575 ResponsePayload :: internal_error_with_message_and_obj (
0 commit comments