Repository navigation
fix(dash-spv): stop waiting on a work-block list request no peer answers - #1272
PastaPastaPasta wants to merge 1 commit into
Conversation
The masternode manager asks for the masternode lists at the work blocks of new quorums, and while any MnListDiff request is wanted it starts no other masternode update. A peer that cannot build the requested diff never answers, and the broker re-sends the request without end, so masternode updates stop for good. Work-block list requests now record when they were first queued. Once one has waited WORK_BLOCK_LIST_DEADLINE (100 s, the length of the QRInfo retry ladder), tick drops it, tells the network to stop re-sending it and completes the pipeline if nothing else is wanted. The quorum stays unverified, and the next QRInfo asks for its list again. Tip-update requests keep waiting as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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 22 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #1272 +/- ##
==========================================
- Coverage 80.73% 80.71% -0.03%
==========================================
Files 291 291
Lines 77783 77880 +97
==========================================
+ Hits 62801 62863 +62
- Misses 14982 15017 +35
|
|
This duplicates #1258 |
|
Thanks, you're right. Closing as a duplicate of #1258, which covers this with the wider fix. 🤖 Posted autonomously by Claude on behalf of pasta. |
The masternode manager asks for the masternode list at the work block of each new quorum. While any MnListDiff request is wanted, it starts no other masternode update (
has_pending_requests), neither tip updates nor the catch-up intick. The pipeline drops a wanted target only when its diff arrives, and the network broker keeps re-sending an unanswered request without end.Some requests are never answered: Dash Core drops a
getmnlistdiffit can't build without replying (src/net_processing.cpp:5621-5626). One such work-block request stops masternode-list updates until the process restarts.This change:
tickdrop work-block requests that have waited longer thanWORK_BLOCK_LIST_DEADLINE(100 s, the length of the QRInfo retry ladder). For each one it logs a warning and callsrequest_answered, so the broker stops re-sending it. If nothing else is wanted, the pipeline completes as it does when the last diff arrives.The quorum whose list was dropped stays unverified. The next QRInfo collects the requests for every unverified quorum again, so the list is asked for again then. Tip-update requests have no deadline and behave as before.
This is groundwork for the #1262 fix, which adds more work-block list requests.
Changelog
dash-spvstops waiting on a work-block masternode list request that no peer answers after 100 s, so masternode updates continueTests
an_unanswered_work_block_list_stops_blocking_updates(fails ondev): a tip update asks for a work-block list that is never answered. Nothing expires 1 s before the deadline. After it,tickanswers the request, completes the pipeline and emitsMasternodeStateUpdated, and the next new tip is requested.only_work_block_requests_expire(pipeline): with a tip-update and a work-block request queued together, only the work-block one expires, and only after the deadline.test_qrinfo_timeout_schedulenow also checks that the deadline equals the QRInfo retry ladder.tokio::time::pause/advance.-D warnings(all features and targets),dash-spvclippy forx86_64-pc-windows-gnu, and alldash-spvtests, including the dashd regtest integration tests (dashd_sync,dashd_masternode).🤖 Generated with Claude Code
PR Hygiene ·
ec3636e/skip-botsproceeds without the ones not yet reported/self-revieweddash-spv(dash-spv/src/sync/masternodes/pipeline.rs,dash-spv/src/sync/masternodes/sync_manager.rs) — QuantumExplorer or ZocoLini or xdustinfaceWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.