mirror of
https://github.com/serai-dex/serai.git
synced 2024-11-16 17:07:35 +00:00
Extend timeout for rebroadcast of consensus messages in coordinator
This commit is contained in:
parent
e0259f2fe5
commit
2f07d04d88
2 changed files with 2 additions and 4 deletions
|
@ -207,7 +207,7 @@ impl<D: Db, T: TransactionTrait, P: P2p> Tributary<D, T, P> {
|
||||||
for msg in to_rebroadcast {
|
for msg in to_rebroadcast {
|
||||||
p2p.broadcast(genesis, msg).await;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -331,14 +331,12 @@ impl<D: Db, T: TransactionTrait, P: P2p> Network for TendermintNetwork<D, T, P>
|
||||||
// until the block it's trying to build is complete
|
// 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
|
// If the P2P layer drops a message before all nodes obtained access, or a node had an
|
||||||
// intermittent failure, this will ensure reconcilliation
|
// 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
|
// This is atrocious if there's no content-based deduplication protocol for messages actively
|
||||||
// being gossiped
|
// being gossiped
|
||||||
// LibP2p, as used by Serai, is configured to content-based deduplicate
|
// LibP2p, as used by Serai, is configured to content-based deduplicate
|
||||||
let mut to_broadcast = vec![TENDERMINT_MESSAGE];
|
let mut to_broadcast = vec![TENDERMINT_MESSAGE];
|
||||||
to_broadcast.extend(msg.encode());
|
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.to_rebroadcast.write().await.push(to_broadcast.clone());
|
||||||
self.p2p.broadcast(self.genesis, to_broadcast).await
|
self.p2p.broadcast(self.genesis, to_broadcast).await
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue