Repository navigation
fix(dash-spv): hedge the filter batch that blocks the store - #1473
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 46 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
✅ Review complete in 11m 28s Planner (4s) Review (behavior · full): 13 findings Judge: 5 kept · 6 dropped · 2 merged (3m 27s) Review metadataConfig:
Account limits:
Judge decisions:
Timing:
|
|
Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post |
Filters are verified and stored in height order, so one filter batch stuck at a silent peer holds back every batch downloaded above it. Nothing asked another peer for it until the request timed out. Blocks already get a second copy in this case (
Broker::hedge), filter batches did not.The flow controller now calls
Broker::hedge_filters, which sends a second copy of the lowest filter batch not yet delivered once its peer has answered nothing forHEDGE_AFTER. A lower batch still queued goes out next, so it suppresses the hedge. The copy goes to the peer that answers soonest rather than the one with the most free cap, because bulk download keeps every peer at its cap. Peers that owe a reply and answered nothing forHEDGE_AFTERare skipped, since a frozen peer keeps the rate it had, and a batch is hedged again once its second peer falls silent too. The first copy to arrive settles the request, and dropping a peer clears the hedges it held, so a lost copy can be sent again.Router and hedge can now send
getcfiltersto one peer at the same time, soPeerHandle::sendcharges a request under the writer lock. Filter replies settle in the order their requests are written, and charging earlier could leave later batches charged to the peer forever.PR Hygiene ·
d231830/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