Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Commit

Permalink
fix: extend the batch timeout
Browse files Browse the repository at this point in the history
This mitigates #858, which shows that on Github, this timeout is nto large enough.
We also suspect this may alleviate issues encountered in Sui, e.g. failures in the
Sui reconfiguration end_to_end test.
  • Loading branch information
huitseeker committed Aug 30, 2022
1 parent 6b65680 commit e994f67
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion primary/src/block_waiter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ use types::{
};
use Result::*;

const BATCH_RETRIEVE_TIMEOUT: Duration = Duration::from_secs(1);
//TODO [860]: customize the configuration of the block waiter to allow distinct
// settings for NW block waiter settings when deployed in different contexts.
// Indeed, this is used for NW + external consensus in the validator API (where
// latency is key) as well as NW + internal consensus, in the Executor
// (see #738, there reliability is key).
const BATCH_RETRIEVE_TIMEOUT: Duration = Duration::from_secs(10);

#[cfg(test)]
#[path = "tests/block_waiter_tests.rs"]
Expand Down
4 changes: 3 additions & 1 deletion primary/src/tests/block_waiter_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use crate::{
block_synchronizer::{handler, handler::MockHandler},
block_waiter::{
BatchResult, BlockError, BlockErrorKind, BlockResult, GetBlockResponse, GetBlocksResponse,
BATCH_RETRIEVE_TIMEOUT,
},
BlockCommand, BlockWaiter, PrimaryWorkerMessage,
};
Expand Down Expand Up @@ -536,7 +537,8 @@ async fn test_batch_timeout() {
.unwrap();

// THEN we should expect to get back the result
let timer = sleep(Duration::from_millis(5_000));
// TODO: make sure we can run this test in less than the actual timeout range
let timer = sleep(BATCH_RETRIEVE_TIMEOUT + Duration::from_secs(2));
tokio::pin!(timer);

tokio::select! {
Expand Down

1 comment on commit e994f67

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bench results


SUMMARY:

  • CONFIG:
    Faults: 0 node(s)
    Committee size: 4 node(s)
    Worker(s) per node: 1 worker(s)
    Collocate primary and workers: True
    Input rate: 50,000 tx/s
    Transaction size: 512 B
    Execution time: 18 s

Header size: 1,000 B
Max header delay: 200 ms
GC depth: 50 round(s)
Sync retry delay: 10,000 ms
Sync retry nodes: 3 node(s)
batch size: 500,000 B
Max batch delay: 200 ms
Max concurrent requests: 500,000

  • RESULTS:
    Consensus TPS: 16,125 tx/s
    Consensus BPS: 8,256,112 B/s
    Consensus latency: 770 ms

End-to-end TPS: 16,025 tx/s
End-to-end BPS: 8,204,779 B/s
End-to-end latency: 2,046 ms

PR to merge e994f67 ->

Please sign in to comment.