@@ -2,8 +2,7 @@ use crate::{
22    RpcCtx ,  TraceError , 
33    utils:: { await_jh_option_response,  response_tri} , 
44} ; 
5- use  ajj:: HandlerCtx ; 
6- use  ajj:: ResponsePayload ; 
5+ use  ajj:: { HandlerCtx ,  ResponsePayload } ; 
76use  alloy:: eips:: BlockId ; 
87use  reth:: rpc:: { 
98    server_types:: eth:: EthApiError , 
@@ -12,9 +11,12 @@ use reth::rpc::{
1211use  reth_node_api:: FullNodeComponents ; 
1312use  signet_node_types:: Pnt ; 
1413
14+ /// Params for the `debug_traceBlockByNumber` and `debug_traceBlockByHash` 
15+ /// endpoints. 
1516#[ derive( Debug ,  serde:: Deserialize ) ]  
16- struct  TraceBlockParams < T > ( T ,  #[ serde( default ) ]   Option < GethDebugTracingOptions > ) ; 
17+ pub ( super )   struct  TraceBlockParams < T > ( T ,  #[ serde( default ) ]   Option < GethDebugTracingOptions > ) ; 
1718
19+ /// `debug_traceBlockByNumber` and `debug_traceBlockByHash` endpoint handler. 
1820pub ( super )  async  fn  trace_block < T ,  Host ,  Signet > ( 
1921    hctx :  HandlerCtx , 
2022    TraceBlockParams ( id,  opts) :  TraceBlockParams < T > , 
@@ -28,16 +30,18 @@ where
2830    let  id = id. into ( ) ; 
2931
3032    let  fut = async  move  { 
31-         // //  Fetch the block by ID 
32-         //  let Some((hash, block)) = response_tri!(ctx.signet().raw_block(id).await) else {
33-         //      return ResponsePayload::internal_error_message(
34-         //          EthApiError::HeaderNotFound(id).to_string().into(),
35-         //      );
36-         //  };
37-         // //  Instantiate the EVM with the block 
38-         //  let evm = response_tri!(ctx.trevm(id, & block.header()));
33+         // Fetch the block by ID 
34+         let  Some ( ( hash,  block) )  = response_tri ! ( ctx. signet( ) . raw_block( id) . await )  else  { 
35+             return  ResponsePayload :: internal_error_message ( 
36+                 EthApiError :: HeaderNotFound ( id) . to_string ( ) . into ( ) , 
37+             ) ; 
38+         } ; 
39+         // Instantiate the EVM with the block 
40+         let  evm = response_tri ! ( ctx. trevm( id,  block. header( ) ) ) ; 
3941
40-         ResponsePayload :: Success ( vec ! [ ] ) 
42+         todo ! ( ) 
43+ 
44+         // ResponsePayload::Success(vec![]) 
4145    } ; 
4246
4347    await_jh_option_response ! ( hctx. spawn_blocking( fut) ) 
0 commit comments