@@ -755,6 +755,21 @@ where
755755
756756 // Check if we already processed this block.
757757 let tip = self . chain . tip_state . get ( ) . clone ( ) ;
758+ let used_blobs_snapshot: Vec < _ > = self
759+ . chain
760+ . execution_state
761+ . system
762+ . used_blobs
763+ . indices ( )
764+ . await
765+ . unwrap_or_default ( ) ;
766+ warn ! (
767+ %chain_id, %height, %block_hash,
768+ tip_height = %tip. next_block_height,
769+ used_blobs_count = used_blobs_snapshot. len( ) ,
770+ ?used_blobs_snapshot,
771+ "used_blobs_trace: process_confirmed_block: ENTRY"
772+ ) ;
758773 if tip. next_block_height > height {
759774 let actions = self . create_network_actions ( None ) . await ?;
760775 self . register_delivery_notifier ( height, & actions, notify_when_messages_are_delivered)
@@ -2126,11 +2141,34 @@ where
21262141 chain_id = %self . chain_id( )
21272142 ) ) ]
21282143 async fn save ( & mut self ) -> Result < ( ) , WorkerError > {
2144+ let chain_id = self . chain_id ( ) ;
2145+ let tip_height = self . chain . tip_state . get ( ) . next_block_height ;
2146+ let used_blobs_count = self
2147+ . chain
2148+ . execution_state
2149+ . system
2150+ . used_blobs
2151+ . indices ( )
2152+ . await
2153+ . map ( |v| v. len ( ) )
2154+ . unwrap_or ( usize:: MAX ) ;
2155+ warn ! (
2156+ %chain_id, %tip_height, used_blobs_count,
2157+ "used_blobs_trace: save: START"
2158+ ) ;
21292159 if let Err ( error) = self . chain . save ( ) . await {
2160+ warn ! (
2161+ %chain_id, %tip_height, %error,
2162+ "used_blobs_trace: save: FAILED"
2163+ ) ;
21302164 tracing:: error!( ?error, "Chain save failed; marking worker as poisoned" ) ;
21312165 self . poisoned = true ;
21322166 return Err ( WorkerError :: PoisonedWorker ) ;
21332167 }
2168+ warn ! (
2169+ %chain_id, %tip_height,
2170+ "used_blobs_trace: save: OK"
2171+ ) ;
21342172 Ok ( ( ) )
21352173 }
21362174}
0 commit comments