From 2f07d04d881731869ae0ed8f13dc3dcc275035b6 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Fri, 22 Mar 2024 16:06:26 -0400 Subject: [PATCH] Extend timeout for rebroadcast of consensus messages in coordinator --- coordinator/tributary/src/lib.rs | 2 +- coordinator/tributary/src/tendermint/mod.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/coordinator/tributary/src/lib.rs b/coordinator/tributary/src/lib.rs index 92fb98da..81b4fc17 100644 --- a/coordinator/tributary/src/lib.rs +++ b/coordinator/tributary/src/lib.rs @@ -207,7 +207,7 @@ impl Tributary { for msg in to_rebroadcast { p2p.broadcast(genesis, msg).await; } - tokio::time::sleep(core::time::Duration::from_secs(1)).await; + tokio::time::sleep(core::time::Duration::from_secs(60)).await; } } }) diff --git a/coordinator/tributary/src/tendermint/mod.rs b/coordinator/tributary/src/tendermint/mod.rs index d362364c..40d01380 100644 --- a/coordinator/tributary/src/tendermint/mod.rs +++ b/coordinator/tributary/src/tendermint/mod.rs @@ -331,14 +331,12 @@ impl Network for TendermintNetwork // until the block it's trying to build is complete // If the P2P layer drops a message before all nodes obtained access, or a node had an // intermittent failure, this will ensure reconcilliation - // Resolves halts caused by timing discrepancies, which technically are violations of - // Tendermint as a BFT protocol, and shouldn't occur yet have in low-powered testing - // environments // This is atrocious if there's no content-based deduplication protocol for messages actively // being gossiped // LibP2p, as used by Serai, is configured to content-based deduplicate let mut to_broadcast = vec![TENDERMINT_MESSAGE]; to_broadcast.extend(msg.encode()); + // TODO: Prune messages from old rounds which are no longer necessary self.to_rebroadcast.write().await.push(to_broadcast.clone()); self.p2p.broadcast(self.genesis, to_broadcast).await }