Skip to content

Commit

Permalink
Merge branch 'main' into keyao/ci-task-unit-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shenkeyao committed Dec 13, 2023
2 parents b8f20e6 + 33241fd commit 04e37bb
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
9 changes: 5 additions & 4 deletions crates/task-impls/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,9 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>, A: ConsensusApi<TYPES, I> +
.publish_proposal_if_able(qc.clone(), qc.view_number + 1, None)
.await
{
warn!("Wasn't able to publish proposal");
debug!(
"Wasn't able to publish proposal when QC was formed, still may publish"
);
}
}
}
Expand Down Expand Up @@ -906,7 +908,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>, A: ConsensusApi<TYPES, I> +
return;
}

info!("VID disperse data is not more than one view older.");
debug!("VID disperse data is not more than one view older.");
let payload_commitment = disperse.data.payload_commitment;

// Check whether the sender is the right leader for this view
Expand Down Expand Up @@ -1122,8 +1124,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>, A: ConsensusApi<TYPES, I> +
self.payload_commitment_and_metadata = None;
return true;
}
warn!("Cannot propose because we don't have the VID payload commitment and metadata");
debug!("Self block was None");
debug!("Cannot propose because we don't have the VID payload commitment and metadata");
false
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/task-impls/src/da.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>, A: ConsensusApi<TYPES, I> +
}

if *view - *self.cur_view > 1 {
error!("View changed by more than 1 going to view {:?}", view);
warn!("View changed by more than 1 going to view {:?}", view);
}
self.cur_view = view;

Expand Down
4 changes: 2 additions & 2 deletions crates/task-impls/src/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>, A: ConsensusApi<TYPES, I> +
}

if *view - *self.cur_view > 1 {
error!("View changed by more than 1 going to view {:?}", view);
warn!("View changed by more than 1 going to view {:?}", view);
}
self.cur_view = view;

Expand Down Expand Up @@ -283,7 +283,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>, A: ConsensusApi<TYPES, I> +
match result {
Err(_) => {
// Fall through below to updating new block
error!(
debug!(
"propose_max_round_time passed, sending transactions we have so far"
);
}
Expand Down
4 changes: 2 additions & 2 deletions crates/task-impls/src/vid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use hotshot_task::event_stream::EventStream;
use snafu::Snafu;
use std::marker::PhantomData;
use std::sync::Arc;
use tracing::{debug, error, instrument};
use tracing::{debug, error, instrument, warn};

#[derive(Snafu, Debug)]
/// Error type for consensus tasks
Expand Down Expand Up @@ -133,7 +133,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>, A: ConsensusApi<TYPES, I> +
}

if *view - *self.cur_view > 1 {
error!("View changed by more than 1 going to view {:?}", view);
warn!("View changed by more than 1 going to view {:?}", view);
}
self.cur_view = view;

Expand Down
16 changes: 8 additions & 8 deletions crates/task-impls/src/view_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use hotshot_types::{
};
use snafu::Snafu;
use std::{collections::HashMap, sync::Arc, time::Duration};
use tracing::{debug, error, info, instrument};
use tracing::{debug, error, info, instrument, warn};
#[derive(PartialEq, PartialOrd, Clone, Debug, Eq, Hash)]
/// Phases of view sync
pub enum ViewSyncPhase {
Expand Down Expand Up @@ -620,7 +620,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>, A: ConsensusApi<TYPES, I> +

// Ignore certificate if it is for an older round
if certificate.get_view_number() < self.next_view {
error!("We're already in a higher round");
warn!("We're already in a higher round");

return (None, self);
}
Expand Down Expand Up @@ -671,7 +671,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>, A: ConsensusApi<TYPES, I> +
let phase = self.phase.clone();
async move {
async_sleep(self.view_sync_timeout).await;
error!("Vote sending timed out in ViewSyncCertificateRecv");
info!("Vote sending timed out in ViewSyncCertificateRecv");
stream
.publish(HotShotEvent::ViewSyncTimeout(
TYPES::Time::new(*self.next_view),
Expand All @@ -688,7 +688,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>, A: ConsensusApi<TYPES, I> +

// Ignore certificate if it is for an older round
if certificate.get_view_number() < self.next_view {
error!("We're already in a higher round");
warn!("We're already in a higher round");

return (None, self);
}
Expand Down Expand Up @@ -742,7 +742,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>, A: ConsensusApi<TYPES, I> +
let phase = self.phase.clone();
async move {
async_sleep(self.view_sync_timeout).await;
error!("Vote sending timed out in ViewSyncCertificateRecv");
info!("Vote sending timed out in ViewSyncCertificateRecv");
stream
.publish(HotShotEvent::ViewSyncTimeout(
TYPES::Time::new(*self.next_view),
Expand All @@ -759,7 +759,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>, A: ConsensusApi<TYPES, I> +

// Ignore certificate if it is for an older round
if certificate.get_view_number() < self.next_view {
error!("We're already in a higher round");
warn!("We're already in a higher round");

return (None, self);
}
Expand Down Expand Up @@ -821,7 +821,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>, A: ConsensusApi<TYPES, I> +
let stream = self.event_stream.clone();
async move {
async_sleep(self.view_sync_timeout).await;
error!("Vote sending timed out in ViewSyncTrigger");
info!("Vote sending timed out in ViewSyncTrigger");
stream
.publish(HotShotEvent::ViewSyncTimeout(
TYPES::Time::new(*self.next_view),
Expand Down Expand Up @@ -910,7 +910,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>, A: ConsensusApi<TYPES, I> +
let stream = self.event_stream.clone();
async move {
async_sleep(self.view_sync_timeout).await;
error!("Vote sending timed out in ViewSyncTimeout");
info!("Vote sending timed out in ViewSyncTimeout");
stream
.publish(HotShotEvent::ViewSyncTimeout(
TYPES::Time::new(*self.next_view),
Expand Down

0 comments on commit 04e37bb

Please sign in to comment.