Repository navigation
fix(dash-spv): hedge a request once it waited twice its queue - #1474
Merged
Merged
Conversation
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.
A hedge, the second copy of a request sent to another peer, fired only once the request's peer answered nothing for
HEDGE_AFTER. A peer that keeps trickling other replies never goes silent, and one held a frontier filter batch for 118 s in a testnet run. A fixed 10 s bound instead hedged the mainnet frontier batch 20 to 76 times per sync, mostly while the batch merely waited in a long queue.The frontier filter batch and the lowest endgame block now also get a second copy once they have been on the wire for twice the queue they were sent behind, their own reply included. The queue is measured from the peer's serving rate at send, and the copy never goes before 10 s. A peer whose serving rate is not measured yet gets the 10 s.
The copy goes to the answering peer that finishes the reply soonest at its rate, since an idle slow peer used to win the second copy. A peer with a measured serving rate goes first. A frozen peer keeps its serving rate, so a block is no longer hedged to a silent peer either.
Running the hedges outside the flow controller is split out into #1531.
PR Hygiene ·
a64e87d/self-reviewedWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.Summary by CodeRabbit