diff --git a/chain-signatures/node/src/mesh/connection.rs b/chain-signatures/node/src/mesh/connection.rs index 498cb23c6..8c3dfdc36 100644 --- a/chain-signatures/node/src/mesh/connection.rs +++ b/chain-signatures/node/src/mesh/connection.rs @@ -135,10 +135,6 @@ impl Pool { async fn set_participants(&self, participants: &Participants) { *self.connections.write().await = participants.clone(); - tracing::debug!( - "Pool set participants to {:?}", - self.connections.read().await.keys_vec() - ); } async fn set_potential_participants(&self, participants: &Participants) { diff --git a/chain-signatures/node/src/mesh/mod.rs b/chain-signatures/node/src/mesh/mod.rs index ae823face..ff1f7c457 100644 --- a/chain-signatures/node/src/mesh/mod.rs +++ b/chain-signatures/node/src/mesh/mod.rs @@ -65,15 +65,17 @@ impl Mesh { .establish_participants(contract_state) .await; self.ping().await; + + tracing::debug!( + active = ?self.active_participants.keys_vec(), + active_potential = ?self.active_potential_participants.keys_vec(), + "mesh pinging", + ); } /// Ping the active participants such that we can see who is alive. pub async fn ping(&mut self) { self.active_participants = self.connections.ping().await; - tracing::debug!( - "Mesh.ping set active participants to {:?}", - self.active_participants.keys_vec() - ); self.active_potential_participants = self.connections.ping_potential().await; } } diff --git a/chain-signatures/node/src/protocol/cryptography.rs b/chain-signatures/node/src/protocol/cryptography.rs index 12f08c811..909f5883a 100644 --- a/chain-signatures/node/src/protocol/cryptography.rs +++ b/chain-signatures/node/src/protocol/cryptography.rs @@ -358,12 +358,6 @@ impl CryptographicProtocol for RunningState { ) -> Result { let protocol_cfg = &ctx.cfg().protocol; let active = ctx.mesh().active_participants(); - tracing::debug!( - "RunningState.progress active participants: {:?} potential participants: {:?} me: {:?}", - active.keys_vec(), - ctx.mesh().potential_participants().await.keys_vec(), - ctx.me().await - ); if active.len() < self.threshold { tracing::info!( active = ?active.keys_vec(), diff --git a/chain-signatures/node/src/protocol/mod.rs b/chain-signatures/node/src/protocol/mod.rs index 2570ce471..7b1fa5e43 100644 --- a/chain-signatures/node/src/protocol/mod.rs +++ b/chain-signatures/node/src/protocol/mod.rs @@ -284,15 +284,13 @@ impl MpcSignProtocol { }; let crypto_time = Instant::now(); - tracing::debug!("State progress. Node state: {}", state); let mut state = match state.progress(&mut self).await { Ok(state) => { - tracing::debug!("Progress ok. New state: {}", state); + tracing::debug!("progress ok: {state}"); state } Err(err) => { - tracing::debug!("Progress error. State not changed"); - tracing::info!("protocol unable to progress: {err:?}"); + tracing::warn!("protocol unable to progress: {err:?}"); tokio::time::sleep(Duration::from_millis(100)).await; continue; } @@ -303,19 +301,14 @@ impl MpcSignProtocol { let consensus_time = Instant::now(); if let Some(contract_state) = contract_state { - tracing::debug!( - "State advance. Node state: {}, contract state: {:?}", - state, - contract_state - ); + let from_state = format!("{state}"); state = match state.advance(&mut self, contract_state).await { Ok(state) => { - tracing::debug!("Advance ok. New node state: {}", state); + tracing::debug!("advance ok: {from_state} => {state}"); state } Err(err) => { - tracing::debug!("Advance error. State not changed"); - tracing::info!("protocol unable to advance: {err:?}"); + tracing::warn!("protocol unable to advance: {err:?}"); tokio::time::sleep(Duration::from_millis(100)).await; continue; } @@ -327,9 +320,7 @@ impl MpcSignProtocol { let message_time = Instant::now(); if let Err(err) = state.handle(&self, &mut queue).await { - tracing::info!("protocol unable to handle messages: {err:?}"); - tokio::time::sleep(Duration::from_millis(100)).await; - continue; + tracing::warn!("protocol unable to handle messages: {err:?}"); } crate::metrics::PROTOCOL_LATENCY_ITER_MESSAGE .with_label_values(&[my_account_id.as_str()]) diff --git a/chain-signatures/node/src/protocol/presignature.rs b/chain-signatures/node/src/protocol/presignature.rs index 852feb798..c8e75a3b4 100644 --- a/chain-signatures/node/src/protocol/presignature.rs +++ b/chain-signatures/node/src/protocol/presignature.rs @@ -62,7 +62,9 @@ impl PresignatureGenerator { pub fn poke(&mut self) -> Result>, ProtocolError> { if self.timestamp.elapsed() > self.timeout { - tracing::info!( + let id = hash_as_id(self.triple0, self.triple1); + tracing::warn!( + presignature_id = id, self.triple0, self.triple1, self.mine, @@ -392,8 +394,8 @@ impl PresignatureManager { } pub fn take_mine(&mut self) -> Option { - tracing::info!(mine = ?self.mine, "my presignatures"); let my_presignature_id = self.mine.pop_front()?; + tracing::debug!(my_presignature_id, "take presignature of mine"); // SAFETY: This unwrap is safe because taking mine will always succeed since it is only // present when generation completes where the determination of ownership is made. Some(self.take(my_presignature_id).unwrap())