Skip to content

Commit f8b7185

Browse files
authored
Downgrade some logs to INFO level. (#4838)
## Motivation We have several WARN- and ERROR-level logs that can occur during normal operations, without a faulty validity threshold among the validators. ## Proposal Downgrade them to INFO. ## Test Plan (Only log level changes.) ## Release Plan - These changes should be backported to `testnet_conway`, then - be released in a new SDK. (Low priority.) ## Links - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
1 parent 5e19532 commit f8b7185

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

linera-core/src/client/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ impl<Env: Environment> Client<Env> {
373373
.download_certificates_from(&remote_node, chain_id, target_next_block_height)
374374
.await
375375
{
376-
Err(err) => warn!(
376+
Err(err) => info!(
377377
"Failed to download certificates from validator {:?}: {err}",
378378
remote_node.public_key
379379
),
@@ -1207,7 +1207,7 @@ impl<Env: Environment> Client<Env> {
12071207
{
12081208
Ok(content) => content,
12091209
Err(err) => {
1210-
warn!(
1210+
info!(
12111211
"Skipping proposal from {owner} and validator {} at \
12121212
height {}; failed to download {blob_id}: {err}",
12131213
remote_node.public_key, local_info.next_block_height
@@ -3227,7 +3227,7 @@ impl<Env: Environment> ChainClient<Env> {
32273227
if let Some(round_timeout) = info.manager.round_timeout {
32283228
if round_timeout <= self.storage_client().clock().current_time() {
32293229
if let Err(e) = self.request_leader_timeout().await {
3230-
warn!("Failed to obtain a timeout certificate: {}", e);
3230+
debug!("Failed to obtain a timeout certificate: {}", e);
32313231
} else {
32323232
info = self.chain_info_with_manager_values().await?;
32333233
}
@@ -3912,7 +3912,7 @@ impl<Env: Environment> ChainClient<Env> {
39123912
)
39133913
.await?;
39143914
if self.local_next_height_to_receive(origin).await? <= height {
3915-
warn!(
3915+
info!(
39163916
chain_id = %self.chain_id,
39173917
"NewIncomingBundle: Fail to synchronize new message after notification"
39183918
);
@@ -3941,7 +3941,7 @@ impl<Env: Environment> ChainClient<Env> {
39413941
.await?
39423942
<= height
39433943
{
3944-
error!("NewBlock: Fail to synchronize new block after notification");
3944+
info!("NewBlock: Fail to synchronize new block after notification");
39453945
}
39463946
trace!(
39473947
chain_id = %self.chain_id,
@@ -4034,7 +4034,7 @@ impl<Env: Environment> ChainClient<Env> {
40344034
return Ok(());
40354035
};
40364036
if (info.next_block_height, info.manager.current_round) < (height, round) {
4037-
error!(
4037+
info!(
40384038
chain_id = %self.chain_id,
40394039
"NewRound: Fail to synchronize new block after notification"
40404040
);
@@ -4173,7 +4173,7 @@ impl<Env: Environment> ChainClient<Env> {
41734173
})
41744174
.filter_map(move |result| async move {
41754175
if let Err(error) = &result {
4176-
warn!(?error, "Could not connect to validator {public_key}");
4176+
info!(?error, "Could not connect to validator {public_key}");
41774177
} else {
41784178
debug!("Connected to validator {public_key}");
41794179
}
@@ -4197,7 +4197,7 @@ impl<Env: Environment> ChainClient<Env> {
41974197
)
41984198
.await
41994199
{
4200-
tracing::warn!(
4200+
tracing::info!(
42014201
chain_id = %this.chain_id,
42024202
validator_public_key = ?remote_node.public_key,
42034203
?notification,

linera-core/src/remote_node.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use linera_chain::{
2222
},
2323
};
2424
use rand::seq::SliceRandom as _;
25-
use tracing::{debug, instrument, warn};
25+
use tracing::{debug, info, instrument};
2626

2727
use crate::{
2828
data_types::{ChainInfo, ChainInfoQuery, ChainInfoResponse},
@@ -186,7 +186,7 @@ impl<N: ValidatorNode> RemoteNode<N> {
186186
) -> Result<ConfirmedBlockCertificate, NodeError> {
187187
let certificate = self.node.blob_last_used_by_certificate(blob_id).await?;
188188
if !certificate.block().requires_or_creates_blob(&blob_id) {
189-
warn!(
189+
info!(
190190
"Got invalid last used by certificate for blob {} from validator {}",
191191
blob_id, self.public_key
192192
);
@@ -338,13 +338,13 @@ impl<N: ValidatorNode> RemoteNode<N> {
338338
let public_key = &self.public_key;
339339
for blob_id in blob_ids {
340340
if !required.contains(blob_id) {
341-
warn!("validator {public_key} requested blob {blob_id:?} but it is not required");
341+
info!("validator {public_key} requested blob {blob_id:?} but it is not required");
342342
return Err(NodeError::UnexpectedEntriesInBlobsNotFound);
343343
}
344344
}
345345
let unique_missing_blob_ids = blob_ids.iter().copied().collect::<HashSet<_>>();
346346
if blob_ids.len() > unique_missing_blob_ids.len() {
347-
warn!("blobs requested by validator {public_key} contain duplicates");
347+
info!("blobs requested by validator {public_key} contain duplicates");
348348
return Err(NodeError::DuplicatesInBlobsNotFound);
349349
}
350350
Ok(())

0 commit comments

Comments
 (0)