Skip to content

Commit 376c85b

Browse files
ardocratwiesche89
andauthored
Fix PIBD sync stuck (#3817)
* pibd: record segment peer to exclude it from re-request * desegmenter is blocked on a missing kernel * segment iter * add indexing * pibd: log excluded peer * segment batch optimization * pibd: debug logging for stale requests * pibd: filter excluded peer * pibd: check existing kernel segment identifier * pibd: simplify peer selection condition --------- Co-authored-by: Joerg <wiesche89@googlemail.com>
1 parent ddea797 commit 376c85b

5 files changed

Lines changed: 316 additions & 124 deletions

File tree

‎chain/src/pibd_params.rs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,12 @@ pub const KERNEL_SEGMENT_HEIGHT: u8 = 11;
3131
/// Maximum number of received segments to cache (across all trees) before we stop requesting others
3232
pub const MAX_CACHED_SEGMENTS: usize = 15;
3333

34+
/// Number of segments to apply in a single LMDB transaction
35+
pub const SEGMENT_APPLY_BATCH_SIZE: usize = 4;
36+
3437
/// How long the state sync should wait after requesting a segment from a peer before
3538
/// deciding the segment isn't going to arrive. The syncer will then re-request the segment
36-
pub const SEGMENT_REQUEST_TIMEOUT_SECS: i64 = 60;
39+
pub const SEGMENT_REQUEST_TIMEOUT_SECS: i64 = 20;
3740

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

0 commit comments

Comments
 (0)