Skip to content

Commit

Permalink
[Consensus] increase commit syncer fetch timeouts (#18793)
Browse files Browse the repository at this point in the history
## Description 

Validators with limited network need larger timeout for the requests to
succeed. In future, we will add support for partial results.

## Test plan 

n/a

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] REST API:
  • Loading branch information
mwtian authored Jul 25, 2024
1 parent 255d868 commit 4e30767
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions consensus/core/src/commit_syncer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ impl<C: NetworkClient> CommitSyncer<C> {
fetch_state: Arc<Mutex<FetchState>>,
commit_range: CommitRange,
) -> ConsensusResult<(Vec<TrustedCommit>, Vec<VerifiedBlock>)> {
const FETCH_COMMITS_TIMEOUT: Duration = Duration::from_secs(10);
const FETCH_BLOCKS_TIMEOUT: Duration = Duration::from_secs(60);
const FETCH_COMMITS_TIMEOUT: Duration = Duration::from_secs(30);
const FETCH_BLOCKS_TIMEOUT: Duration = Duration::from_secs(120);
const FETCH_RETRY_BASE_INTERVAL: Duration = Duration::from_secs(1);
const FETCH_RETRY_INTERVAL_LIMIT: u32 = 30;
const MAX_RETRY_INTERVAL: Duration = Duration::from_secs(1);
Expand Down

0 comments on commit 4e30767

Please sign in to comment.