mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29: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:
@@ -281,11 +281,12 @@ impl<D: Db, T: TransactionTrait, P: P2p> Network for TendermintNetwork<D, T, P>
|
||||
type Weights = Arc<Validators>;
|
||||
type Block = TendermintBlock;
|
||||
|
||||
// These are in seconds and create a six-second block time.
|
||||
// These are in milliseconds and create a six-second block time.
|
||||
// The block time is the latency on message delivery (where a message is some piece of data
|
||||
// embedded in a transaction), hence why it should be kept low.
|
||||
const BLOCK_PROCESSING_TIME: u32 = 3;
|
||||
const LATENCY_TIME: u32 = 1;
|
||||
// embedded in a transaction) times three plus the block processing time, hence why it should be
|
||||
// kept low.
|
||||
const BLOCK_PROCESSING_TIME: u32 = 999;
|
||||
const LATENCY_TIME: u32 = 1667;
|
||||
|
||||
fn signer(&self) -> Arc<Signer> {
|
||||
self.signer.clone()
|
||||
|
||||
Reference in New Issue
Block a user