diff --git a/crates/hotshot/src/tasks/mod.rs b/crates/hotshot/src/tasks/mod.rs index edbd31e8b4..6b30d5b535 100644 --- a/crates/hotshot/src/tasks/mod.rs +++ b/crates/hotshot/src/tasks/mod.rs @@ -140,7 +140,6 @@ pub fn add_network_message_task< let network = Arc::clone(channel); let mut state = network_state.clone(); let shutdown_signal = create_shutdown_event_monitor(handle).fuse(); - let my_id = handle.hotshot.id; let task_handle = spawn(async move { futures::pin_mut!(shutdown_signal); @@ -158,7 +157,6 @@ pub fn add_network_message_task< // Make sure the message did not fail let message = match message { Ok(message) => { - tracing::error!("lrzasik: Received message, my id: {:?}\nmessage: {:?}", my_id, message); message } Err(e) => { @@ -205,7 +203,6 @@ pub fn add_network_event_task< consensus: OuterConsensus::new(handle.consensus()), upgrade_lock: handle.hotshot.upgrade_lock.clone(), transmit_tasks: BTreeMap::new(), - id: handle.hotshot.id, }; let task = Task::new( network_state, diff --git a/crates/task-impls/src/consensus/handlers.rs b/crates/task-impls/src/consensus/handlers.rs index b61eadc99e..856cbe85ec 100644 --- a/crates/task-impls/src/consensus/handlers.rs +++ b/crates/task-impls/src/consensus/handlers.rs @@ -81,11 +81,6 @@ pub(crate) async fn handle_quorum_vote_recv< .membership .has_stake(&vote.signing_key(), vote.epoch() + 1) { - tracing::error!( - "lrzasik: received vote from next epoch node, view: {:?}, epoch: {:?}", - vote.view_number, - vote.epoch() - ); handle_vote( &mut task_state.next_epoch_vote_collectors, &vote.clone().into(), diff --git a/crates/task-impls/src/network.rs b/crates/task-impls/src/network.rs index f1ba74a8d3..648f59fbed 100644 --- a/crates/task-impls/src/network.rs +++ b/crates/task-impls/src/network.rs @@ -224,7 +224,6 @@ pub struct NetworkEventTaskState< pub upgrade_lock: UpgradeLock, /// map view number to transmit tasks pub transmit_tasks: BTreeMap>>, - pub id: u64, } #[async_trait] @@ -303,14 +302,12 @@ impl< let net = Arc::clone(&self.network); let storage = Arc::clone(&self.storage); let consensus = OuterConsensus::new(Arc::clone(&self.consensus.inner_consensus)); - let my_id = self.id; spawn(async move { if NetworkEventTaskState::::maybe_record_action( Some(HotShotAction::VidDisperse), storage, consensus, view, - my_id, ) .await .is_err() @@ -332,36 +329,26 @@ impl< storage: Arc>, consensus: OuterConsensus, view: ::View, - id: u64, ) -> std::result::Result<(), ()> { - tracing::error!("lrzasik: entered maybe_record_action, maybe_action: {:?}, view: {:?}, my id: {}", maybe_action, view, id); - let res = if let Some(mut action) = maybe_action { - tracing::error!("lrzasik: maybe_record_action, calling update_action, maybe_action: {:?}, view: {:?}, my id: {}", maybe_action, view, id); + if let Some(mut action) = maybe_action { if !consensus.write().await.update_action(action, view) { - tracing::warn!("Already actioned {:?} in view {:?}", action, view); return Err(()); } - tracing::error!("lrzasik: maybe_record_action, finished update_action, maybe_action: {:?}, view: {:?}, my id: {}", maybe_action, view, id); // If the action was view sync record it as a vote, but we don't // want to limit to 1 View sync vote above so change the action here. if matches!(action, HotShotAction::ViewSyncVote) { action = HotShotAction::Vote; } - tracing::error!("lrzasik: maybe_record_action, calling record_action, maybe_action: {:?}, view: {:?}, my id: {}", maybe_action, view, id); - let res = match storage.write().await.record_action(view, action).await { + match storage.write().await.record_action(view, action).await { Ok(()) => Ok(()), Err(e) => { tracing::warn!("Not Sending {:?} because of storage error: {:?}", action, e); Err(()) } - }; - tracing::error!("lrzasik: maybe_record_action, finished record_action, maybe_action: {:?}, view: {:?}, my id: {}", maybe_action, view, id); - res + } } else { Ok(()) - }; - tracing::error!("lrzasik: exiting maybe_record_action, maybe_action: {:?}, view: {:?}, my id: {}", maybe_action, view, id); - res + } } /// Cancel all tasks for previous views @@ -456,7 +443,6 @@ impl< .await >= V::Epochs::VERSION { - tracing::error!("lrzasik: extended quorum vote sent from network, id: {:?}", self.id); MessageKind::::from_consensus_message(SequencingMessage::General( GeneralConsensusMessage::Vote2(vote.clone()), )) @@ -734,7 +720,6 @@ impl< transmit: TransmitType, sender: TYPES::SignatureKey, ) { - tracing::error!("lrzasik: entered spawn_transmit_task, message kind: {:?}, transmit type: {:?}, my id: {}", message_kind, transmit, self.id); let broadcast_delay = match &message_kind { MessageKind::Consensus( SequencingMessage::General(GeneralConsensusMessage::Vote(_)) @@ -755,28 +740,22 @@ impl< let storage = Arc::clone(&self.storage); let consensus = OuterConsensus::new(Arc::clone(&self.consensus.inner_consensus)); let upgrade_lock = self.upgrade_lock.clone(); - let my_id = self.id; let handle = spawn(async move { - tracing::error!("lrzasik: entered spawn transmit task, message kind: {:?}, transmit type: {:?}, my id: {}", message.kind, transmit, my_id); if NetworkEventTaskState::::maybe_record_action( maybe_action, Arc::clone(&storage), consensus, view_number, - my_id, ) .await .is_err() { - tracing::error!("lrzasik: spawn transmit task, error maybe_record_action, my id: {}", my_id); return; } - tracing::error!("lrzasik: spawn transmit task, finished maybe_record_action, message kind: {:?}, transmit type: {:?}, my id: {}", message.kind, transmit, my_id); if let MessageKind::Consensus(SequencingMessage::General( GeneralConsensusMessage::Proposal(prop), )) = &message.kind { - tracing::error!("lrzasik: spawn transmit task, call append_proposal2, message kind: {:?}, transmit type: {:?}, my id: {}", message.kind, transmit, my_id); if storage .write() .await @@ -784,33 +763,17 @@ impl< .await .is_err() { - tracing::error!("lrzasik: spawn transmit task, error append_proposal2, my id: {}", my_id); return; } - tracing::error!("lrzasik: spawn transmit task, finished append_proposal2, message kind: {:?}, transmit type: {:?}, my id: {}", message.kind, transmit, my_id); } - tracing::error!("lrzasik: spawn transmit task, call serialize, message kind: {:?}, transmit type: {:?}, my id: {}", message.kind, transmit, my_id); let serialized_message = match upgrade_lock.serialize(&message).await { - Ok(serialized) => { - if matches!(transmit, TransmitType::Broadcast) { - if let MessageKind::Consensus(SequencingMessage::General(GeneralConsensusMessage::Vote2(ref vote))) = message.kind { - tracing::error!("lrzasik: sending extended vote, my id: {:?}, vote view: {:?}, vote epoch: {:?}\nserialized message: {:?}", - my_id, - vote.view_number(), - vote.epoch(), - serialized, - ); - } - } - serialized - }, + Ok(serialized) => serialized, Err(e) => { tracing::error!("Failed to serialize message: {}", e); return; } }; - tracing::error!("lrzasik: spawn transmit task, finished serialize, message kind: {:?}, transmit type: {:?}, my id: {}", message.kind, transmit, my_id); let transmit_result = match transmit { TransmitType::Direct(recipient) => { diff --git a/crates/testing/src/byzantine/byzantine_behaviour.rs b/crates/testing/src/byzantine/byzantine_behaviour.rs index 034b0939d2..449629d5ca 100644 --- a/crates/testing/src/byzantine/byzantine_behaviour.rs +++ b/crates/testing/src/byzantine/byzantine_behaviour.rs @@ -350,7 +350,6 @@ impl + std::fmt::Debug, V: Version consensus: OuterConsensus::new(handle.consensus()), upgrade_lock: handle.hotshot.upgrade_lock.clone(), transmit_tasks: BTreeMap::new(), - id: handle.hotshot.id, }; let modified_network_state = NetworkEventTaskStateModifier { network_event_task_state: network_state, diff --git a/crates/testing/tests/tests_1/network_task.rs b/crates/testing/tests/tests_1/network_task.rs index 2da123027d..a4e1c29a03 100644 --- a/crates/testing/tests/tests_1/network_task.rs +++ b/crates/testing/tests/tests_1/network_task.rs @@ -69,7 +69,6 @@ async fn test_network_task() { storage, consensus, transmit_tasks: BTreeMap::new(), - id: 1, }; let (tx, rx) = async_broadcast::broadcast(10); let mut task_reg = ConsensusTaskRegistry::new(); @@ -239,7 +238,6 @@ async fn test_network_storage_fail() { storage, consensus, transmit_tasks: BTreeMap::new(), - id: 1, }; let (tx, rx) = async_broadcast::broadcast(10); let mut task_reg = ConsensusTaskRegistry::new();