Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion chain/src/pibd_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ pub const KERNEL_SEGMENT_HEIGHT: u8 = 11;
/// Maximum number of received segments to cache (across all trees) before we stop requesting others
pub const MAX_CACHED_SEGMENTS: usize = 15;

/// Number of segments to apply in a single LMDB transaction
pub const SEGMENT_APPLY_BATCH_SIZE: usize = 4;

/// How long the state sync should wait after requesting a segment from a peer before
/// deciding the segment isn't going to arrive. The syncer will then re-request the segment
pub const SEGMENT_REQUEST_TIMEOUT_SECS: i64 = 60;
pub const SEGMENT_REQUEST_TIMEOUT_SECS: i64 = 20;
Copy link
Member

Choose a reason for hiding this comment

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

This may be okay, but we do have a lot of slow peers on the network and the rangeproof segments can be kind of large IIUC. It'd be a good idea to look for someone with a slow connection to test this change and make sure we aren't causing needless churn with the timeout reduction.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, will try to simulate slow connection to see the difference.


/// Number of simultaneous requests for segments we should make. Note this is currently
/// divisible by 3 to try and evenly spread requests amount the 3 main MMRs (Bitmap segments
Expand Down
Loading