mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 20:59:23 +00:00
Define BLOCK_PROCESSING_TIME, LATENCY_TIME in ms
Updates Tributary values to allow 999ms for block processing (from 2s) and 1667ms for latency (up from 1s). The intent is to resolve #365. I don't know if this will, but it increases the chances of success and these values should be fine in prod since Tributary is a post-execution chain (making block procesisng time minimal). Does embed the dagger of N::block_time() panicking if the block time in ms doesn't cleanly divide by 1000.
This commit is contained in:
@@ -35,7 +35,7 @@ impl<N: Network> RoundData<N> {
|
||||
fn timeout(&self, step: Step) -> CanonicalInstant {
|
||||
let adjusted_block = N::BLOCK_PROCESSING_TIME * (self.number.0 + 1);
|
||||
let adjusted_latency = N::LATENCY_TIME * (self.number.0 + 1);
|
||||
let offset = Duration::from_secs(
|
||||
let offset = Duration::from_millis(
|
||||
(match step {
|
||||
Step::Propose => adjusted_block + adjusted_latency,
|
||||
Step::Prevote => adjusted_block + (2 * adjusted_latency),
|
||||
|
||||
Reference in New Issue
Block a user