@@ -74,6 +74,7 @@ pub struct Committer {
7474 execution_cache_manager : Arc < ExecutionCacheManager > ,
7575 protocol_manager : Arc < ProtocolManager > ,
7676 ledger_metrics : Arc < LedgerMetrics > ,
77+ formatter : Arc < Formatter > ,
7778}
7879
7980impl Committer {
@@ -86,6 +87,7 @@ impl Committer {
8687 execution_cache_manager : Arc < ExecutionCacheManager > ,
8788 protocol_manager : Arc < ProtocolManager > ,
8889 ledger_metrics : Arc < LedgerMetrics > ,
90+ formatter : Arc < Formatter > ,
8991 ) -> Self {
9092 Self {
9193 database,
@@ -95,6 +97,7 @@ impl Committer {
9597 execution_cache_manager,
9698 protocol_manager,
9799 ledger_metrics,
100+ formatter,
98101 }
99102 }
100103}
@@ -171,6 +174,12 @@ impl Committer {
171174 . start_series_execution ( database. deref ( ) ) ;
172175 self . verify_pre_commit_invariants ( & series_executor, transactions. len ( ) , & proof) ;
173176
177+ debug ! (
178+ "Starting commit of normal transaction batch on top of existing state version {} until state version {}" ,
179+ series_executor. latest_state_version( ) ,
180+ commit_state_version,
181+ ) ;
182+
174183 // Naively, the below could be a part of pre-commit invariants (see above); however, we do
175184 // not want to panic, but rather return an `Err` for the consensus layer, since a
176185 // transaction root mismatch may mean a malicious peer (and not our inconsistent state).
@@ -221,6 +230,16 @@ impl Committer {
221230 let hashes = validated. create_hashes ( ) ;
222231 let executable = validated. create_ledger_executable ( ) ;
223232
233+ if let Some ( user_hashes) = hashes. as_user ( ) {
234+ debug ! (
235+ "Starting commit execution of {} for {:?}" ,
236+ user_hashes
237+ . transaction_intent_hash
238+ . display( & * self . formatter) ,
239+ series_executor. latest_state_version( ) . next( ) . unwrap( ) ,
240+ ) ;
241+ }
242+
224243 let commit = series_executor
225244 . execute_and_update_state ( & executable, & hashes, "prepared" )
226245 . expect ( "cannot execute transaction to be committed" ) ;
@@ -304,6 +323,12 @@ impl Committer {
304323 . start_series_execution ( database. deref ( ) ) ;
305324 self . verify_pre_commit_invariants ( & series_executor, transactions. len ( ) , & proof) ;
306325
326+ debug ! (
327+ "Starting commit of system transaction batch on top of existing state version {} until state version {}" ,
328+ series_executor. latest_state_version( ) ,
329+ proof. ledger_header. state_version,
330+ ) ;
331+
307332 let mut commit_bundle_builder = series_executor. start_commit_builder ( ) ;
308333 let mut transactions_metrics_data = Vec :: new ( ) ;
309334 for ProcessedLedgerTransaction {
@@ -312,6 +337,15 @@ impl Committer {
312337 hashes,
313338 } in transactions
314339 {
340+ if let Some ( user_hashes) = hashes. as_user ( ) {
341+ debug ! (
342+ "Starting commit execution of {} for {:?}" ,
343+ user_hashes
344+ . transaction_intent_hash
345+ . display( & * self . formatter) ,
346+ series_executor. latest_state_version( ) . next( ) . unwrap( ) ,
347+ ) ;
348+ }
315349 let mut commit = series_executor
316350 . execute_and_update_state ( & executable, & hashes, "system transaction" )
317351 . expect ( "cannot execute system transaction" ) ;
0 commit comments