From 1b2b101c277972974d11003a1fc5728508c104e3 Mon Sep 17 00:00:00 2001 From: Coa Date: Tue, 17 Sep 2024 08:31:34 +0200 Subject: [PATCH] Add logs on consensus client creation --- client/src/client.rs | 2 -- client/src/main_utils.rs | 17 ++++++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/client/src/client.rs b/client/src/client.rs index 3157b36..2ec1ff3 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -75,8 +75,6 @@ impl ConsensusClient { .await .wrap_err("Failed to get latest valid executor block")?; - debug!("Latest valid executor block is: {latest_valid_executor_block:?}"); - Ok(Self { config, execution_api, diff --git a/client/src/main_utils.rs b/client/src/main_utils.rs index d61303e..6170333 100644 --- a/client/src/main_utils.rs +++ b/client/src/main_utils.rs @@ -59,9 +59,17 @@ pub async fn build_consensus_client( CannotStartConsensusClient(e.to_string()) })?; - // Translator + info!( + "Created client with latest EVM block: {:?}", + client.latest_evm_number() + ); + let lib = client.db.get_lib()?; + if let Some(lib_number) = lib.as_ref().map(|lib| lib.number) { + info!("Last stored LIB: {lib_number}"); + } + let latest_number = lib .as_ref() .map(|lib| lib.number + config.chain_id.block_delta()) @@ -73,6 +81,13 @@ pub async fn build_consensus_client( None => None, }; + if let Some(last_checked) = last_checked.as_ref() { + info!( + "Last stored final block: {}, {}", + last_checked.number, last_checked.hash + ); + } + if let Some(last_checked) = last_checked { if client.is_in_start_stop_range(last_checked.number + 1) { config.evm_start_block = last_checked.number + 1;