Repository navigation
fix(dash-spv): route block requests to the shortest queue - #1365
Conversation
Block getdata went to the peer least loaded relative to its cap. A slow peer at the minimum cap holds 5 to 30 s of work, so a block the rescans wait on could sit behind it while a fast peer had room. Blocks now go where they are answered soonest, by the queue time `choose_peer` already uses for header requests, with the same cap ratio fallback while a busy peer is unmeasured. All blocks take this route, not only the lowest few. The filters manager processes blocks in height order, so any late block holds back the ones above it, and picking the earliest finishing peer per request also spreads bulk work by serving rate.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #1365 +/- ##
=======================================
Coverage 85.35% 85.36%
=======================================
Files 268 268
Lines 68948 68948
=======================================
+ Hits 58853 58856 +3
+ Misses 10095 10092 -3
|
|
/self-reviewed |
|
Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post |
|
Policy satisfied — this can merge. |
Block
getdatawent to the peer least loaded relative to its cap. A slow peer at the minimum cap can hold 5 to 30 s of work, so a block the filter rescans wait on could sit behind it while a fast peer had room. The filters manager processes blocks in height order, so one late block holds back every block above it.Block requests now go to the peer with the shortest expected queue,
in_flight / serving_rate, which #1349 introduced for header requests, with the same cap ratio fallback while a busy peer has no serving rate yet. Bulk filter traffic keeps the cap ratio.route_picks_the_peer_by_classgains the two block cases.Summary by CodeRabbit
PR Hygiene ·
8aa6300When every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.