diff --git a/core/bin/external_node/src/main.rs b/core/bin/external_node/src/main.rs index 378efc3f738a..dbd6203590f7 100644 --- a/core/bin/external_node/src/main.rs +++ b/core/bin/external_node/src/main.rs @@ -1019,9 +1019,12 @@ async fn run_node( let mut tasks = ManagedTasks::new(task_handles); tokio::select! { - () = tasks.wait_single() => {}, + // We don't want to log unnecessary warnings in `tasks.wait_single()` if we have received a stop signal. + biased; + _ = stop_receiver.changed() => {}, - }; + () = tasks.wait_single() => {}, + } // Reaching this point means that either some actor exited unexpectedly or we received a stop signal. // Broadcast the stop signal (in case it wasn't broadcast previously) to all actors and exit. diff --git a/core/lib/web3_decl/src/client/metrics.rs b/core/lib/web3_decl/src/client/metrics.rs index be07e68c8a29..01daf76cf07c 100644 --- a/core/lib/web3_decl/src/client/metrics.rs +++ b/core/lib/web3_decl/src/client/metrics.rs @@ -83,7 +83,7 @@ impl L2ClientMetrics { }; let info = &self.info[&network]; if let Err(err) = info.set(config_labels) { - tracing::warn!( + tracing::debug!( "Error setting configuration info {:?} for L2 client; already set to {:?}", err.into_inner(), info.get() diff --git a/core/lib/web3_decl/src/client/mod.rs b/core/lib/web3_decl/src/client/mod.rs index 090d766f8f54..3e2795edd073 100644 --- a/core/lib/web3_decl/src/client/mod.rs +++ b/core/lib/web3_decl/src/client/mod.rs @@ -196,7 +196,7 @@ impl Client { origin, &stats, ); - tracing::warn!( + tracing::debug!( network = network_label, component = self.component_name, %origin, diff --git a/core/lib/web3_decl/src/error.rs b/core/lib/web3_decl/src/error.rs index c52bc3054f82..e80ea23d8e3a 100644 --- a/core/lib/web3_decl/src/error.rs +++ b/core/lib/web3_decl/src/error.rs @@ -11,7 +11,7 @@ use std::{ task::{Context, Poll}, }; -use jsonrpsee::core::ClientError; +use jsonrpsee::{core::ClientError, types::error::ErrorCode}; use pin_project_lite::pin_project; use thiserror::Error; use zksync_types::{api::SerializationTransactionError, L1BatchNumber, L2BlockNumber}; @@ -87,10 +87,15 @@ impl EnrichedClientError { /// Whether the error should be considered transient. pub fn is_transient(&self) -> bool { - matches!( - self.as_ref(), - ClientError::Transport(_) | ClientError::RequestTimeout - ) + match self.as_ref() { + ClientError::Transport(_) | ClientError::RequestTimeout => true, + ClientError::Call(err) => { + // At least some RPC providers use "internal error" in case of the server being overloaded + err.code() == ErrorCode::ServerIsBusy.code() + || err.code() == ErrorCode::InternalError.code() + } + _ => false, + } } } diff --git a/core/node/consensus/src/era.rs b/core/node/consensus/src/era.rs index 5cf537f65300..05b5fc81720e 100644 --- a/core/node/consensus/src/era.rs +++ b/core/node/consensus/src/era.rs @@ -44,7 +44,7 @@ pub async fn run_en( let en = en::EN { pool: ConnectionPool(pool), sync_state: sync_state.clone(), - client: main_node_client, + client: main_node_client.for_component("block_fetcher"), }; let res = match cfg { Some((cfg, secrets)) => en.run(ctx, actions, cfg, secrets).await,