From 8b91205b6909972f440186d4b2067a96d9be2043 Mon Sep 17 00:00:00 2001 From: Daniyar Itegulov Date: Mon, 4 Mar 2024 17:40:36 +1100 Subject: [PATCH] add extra logs --- .../src/versions/vm_latest/types/internals/vm_state.rs | 1 + core/lib/multivm/src/versions/vm_latest/utils/l2_blocks.rs | 1 + core/lib/state/src/postgres/mod.rs | 1 + .../src/state_keeper/batch_executor/main_executor.rs | 6 +++++- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/lib/multivm/src/versions/vm_latest/types/internals/vm_state.rs b/core/lib/multivm/src/versions/vm_latest/types/internals/vm_state.rs index 54aa44874e8..6560c606867 100644 --- a/core/lib/multivm/src/versions/vm_latest/types/internals/vm_state.rs +++ b/core/lib/multivm/src/versions/vm_latest/types/internals/vm_state.rs @@ -68,6 +68,7 @@ pub(crate) fn new_vm_state( } else { // This is the scenario of either the first L2 block ever or // the first block after the upgrade for support of L2 blocks. + tracing::info!("Could not locate the last L2 block, presuming this is the first one"); L2Block { number: l1_batch_env.first_l2_block.number.saturating_sub(1), timestamp: 0, diff --git a/core/lib/multivm/src/versions/vm_latest/utils/l2_blocks.rs b/core/lib/multivm/src/versions/vm_latest/utils/l2_blocks.rs index e5832f7f587..052ea935e8c 100644 --- a/core/lib/multivm/src/versions/vm_latest/utils/l2_blocks.rs +++ b/core/lib/multivm/src/versions/vm_latest/utils/l2_blocks.rs @@ -62,6 +62,7 @@ pub fn load_last_l2_block(storage: StoragePtr) -> Option PostgresStorage<'a> { .with_context(|| { format!("failed resolving L1 batch number for miniblock #{block_number}") })?; + tracing::info!(?resolved, "Resolved L1 batch for Postgres storage"); Ok(Self { rt_handle, connection, diff --git a/core/lib/zksync_core/src/state_keeper/batch_executor/main_executor.rs b/core/lib/zksync_core/src/state_keeper/batch_executor/main_executor.rs index 6b5c70de4b7..c61feebb17c 100644 --- a/core/lib/zksync_core/src/state_keeper/batch_executor/main_executor.rs +++ b/core/lib/zksync_core/src/state_keeper/batch_executor/main_executor.rs @@ -130,7 +130,11 @@ impl CommandReceiver { system_env: SystemEnv, upload_witness_inputs_to_gcs: bool, ) { - tracing::info!("Starting executing batch #{:?}", &l1_batch_params.number); + tracing::info!( + first_l2_block = ?l1_batch_params.first_l2_block, + l1_batch_number = ?l1_batch_params.number, + "Starting executing batch", + ); let storage_view = StorageView::new(secondary_storage).to_rc_ptr();