You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(dash-spv): track refusals for hedged request copies #1573
The broker tracks refusals only for a request's original carrier. A hedge copy, the duplicate sent to a second peer once the first is overdue, is not covered:
A reply to a hedge copy proves nothing about requests the hedge peer skipped, because the broker does not know where the hedge sat in that connection's send order. A skipped request there falls back to expiring.
A block notfound from a hedge peer leaves the hedge recorded, so no third peer gets a copy while the original carrier stays connected. Dash Core itself never sends notfound for a block, so this only matters for other node implementations.
A hedge peer that refused a request stays eligible for it.
A fix needs each copy's send order on its own connection. Hedges are sent from the hedger task and primary requests from the router, so a shared counter does not follow wire order. A possible shape: take the order when a copy is written to its connection (for example in PeerHandle::send, which serializes writes per connection), keep every copy in Retry across requeue, detect skips per copy, record a refusing hedge peer as refused and drop that hedge so another can go.
Found while reviewing #1374, which keeps the connections each request was sent to across a requeue, the first half of this.
Activity