peer: Add per-peer stall detection (WIP) - #32
Draft
pzafonte wants to merge 2 commits into
Draft
Conversation
Contributor
|
Converting to draft because this depends on 65bf637 |
rustaceanrob
marked this pull request as draft
March 5, 2026 14:24
pzafonte
force-pushed
the
multi-peer-ibd-v4
branch
2 times, most recently
from
April 17, 2026 18:52
0038c8a to
e1ee32b
Compare
Syncing from one peer is only as fast as that peer. Connect to several at once and share the work of downloading blocks between them, so a slow or unresponsive peer no longer holds up the whole sync. A shared queue and an in-flight set coordinate the peers: each block is fetched by exactly one peer, and any block left behind when a peer drops returns to the queue for another to fetch, so none is stranded. Peers fetch blocks out of order, but the kernel must connect them in chain order. A shared buffer holds each arriving block until its parent has been handed off, then releases the unbroken run that now extends the tip. Without it the sync stalls the moment one peer holds a block whose parent another peer has not yet delivered.
A peer connection can stay alive while never delivering the blocks it was requested, leaving the sync partially stuck behind a peer that is effectively idle. Detect a peer that has gone too long without making progress and drop it, letting the pool replace it with another one.
pzafonte
force-pushed
the
multi-peer-ibd-v4
branch
from
August 13, 2026 21:45
e1ee32b to
4224851
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #31.
Detects a peer that keeps its connection open but stops delivering the blocks it was asked for, and drops it so the work can go to another peer. Full description and rationale once the approach settles. Not ready for review.