@@ -14,7 +14,7 @@ use alloy::{
1414use eyre:: OptionExt ;
1515use init4_bin_base:: { deps:: metrics:: counter, utils:: signer:: LocalOrAws } ;
1616use tokio:: { sync:: mpsc, task:: JoinHandle } ;
17- use tracing:: { Instrument , debug, debug_span, error} ;
17+ use tracing:: { Instrument , debug, debug_span, error, instrument } ;
1818
1919/// Handles preparation and submission of simulated rollup blocks to the
2020/// Flashbots relay as MEV bundles.
@@ -69,6 +69,7 @@ impl FlashbotsTask {
6969 /// 2. Tracking the transaction hash for monitoring
7070 /// 3. Encoding the transaction for bundle inclusion
7171 /// 4. Constructing the complete bundle body
72+ #[ instrument( skip_all, level = "debug" ) ]
7273 async fn prepare_bundle ( & self , sim_result : & SimResult ) -> eyre:: Result < MevSendBundle > {
7374 // Prepare and sign the transaction
7475 let block_tx = self . prepare_signed_transaction ( sim_result) . await ?;
@@ -95,6 +96,7 @@ impl FlashbotsTask {
9596 ///
9697 /// Creates a `SubmitPrep` instance to build the transaction, then fills
9798 /// and signs it using the host provider.
99+ #[ instrument( skip_all, level = "debug" ) ]
98100 async fn prepare_signed_transaction (
99101 & self ,
100102 sim_result : & SimResult ,
@@ -107,7 +109,11 @@ impl FlashbotsTask {
107109 ) ;
108110
109111 let tx = prep. prep_transaction ( sim_result. prev_host ( ) ) . await ?;
110- let sendable = self . host_provider ( ) . fill ( tx. into_request ( ) ) . await ?;
112+ let sendable = self
113+ . host_provider ( )
114+ . fill ( tx. into_request ( ) )
115+ . instrument ( tracing:: debug_span!( "fill_tx" ) . or_current ( ) )
116+ . await ?;
111117
112118 sendable. as_envelope ( ) . ok_or_eyre ( "failed to get envelope from filled tx" ) . cloned ( )
113119 }
@@ -159,7 +165,7 @@ impl FlashbotsTask {
159165 break ;
160166 } ;
161167
162- let span = sim_result. sim_env . clone_span ( ) ;
168+ let span = sim_result. clone_span ( ) ;
163169
164170 // Don't submit empty blocks
165171 if sim_result. block . is_empty ( ) {
0 commit comments