Skip to content

Commit

Permalink
add extra logs
Browse files Browse the repository at this point in the history
  • Loading branch information
itegulov committed Mar 4, 2024
1 parent a11b669 commit 8b91205
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ pub(crate) fn new_vm_state<S: WriteStorage, H: HistoryMode>(
} 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,
Expand Down
1 change: 1 addition & 0 deletions core/lib/multivm/src/versions/vm_latest/utils/l2_blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ pub fn load_last_l2_block<S: ReadStorage>(storage: StoragePtr<S>) -> Option<L2Bl
let mut storage_ptr = storage.borrow_mut();
let current_l2_block_info = storage_ptr.read_value(&current_l2_block_info_key);
let (block_number, block_timestamp) = unpack_block_info(h256_to_u256(current_l2_block_info));
tracing::info!(block_number, block_timestamp, "Loaded last L2 block");
let block_number = block_number as u32;
if block_number == 0 {
// The block does not exist yet
Expand Down
1 change: 1 addition & 0 deletions core/lib/state/src/postgres/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ impl<'a> 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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 8b91205

Please sign in to comment.