Repository navigation
Description
Summary
During SPV initial sync, the masternodes sync manager fails permanently with:
ERROR dash_spv::sync::masternodes::sync_manager: QRInfo failed after 4 retries: Required rotated chain lock sig at h - 0 not present for masternode diff block hash: 0000000ad913ed94a9a64e95a51c82d40c49807a207894e83ebe466f589399f4
ERROR dash_spv::sync::sync_manager: Masternode error handling message: Masternode sync failed: Required rotated chain lock sig at h - 0 not present for masternode diff block hash: 0000000ad913ed94a9a64e95a51c82d40c49807a207894e83ebe466f589399f4
The h - 0 variant means the chain lock signature for the current tip block is missing from the QRInfo response. The retry logic (3 retries × 5s delay = ~15s total) is exhausted without recovery.
Error Origin
dash/src/sml/masternode_list_engine/mod.rs ~line 660:
let sigmtip = maybe_sigmtip.ok_or(
QuorumValidationError::RequiredRotatedChainLockSigNotPresent(
0, mn_list_diff_tip_block_hash,
),
)?;This fires when apply_diff() for the tip block's MnListDiff doesn't yield a chain lock signature, which happens when the QRInfo response references a tip block whose chain lock hasn't propagated yet.
Retry Logic
dash-spv/src/sync/masternodes/sync_manager.rs lines 268–303:
The retry logic specifically handles RequiredRotatedChainLockSigNotPresent(0, _) (tip only) with:
MAX_RETRY_ATTEMPTS = 3CHAINLOCK_RETRY_DELAY_SECS = 5- Fixed delay between retries (not exponential backoff)
- Re-requests QRInfo from peers on each retry via
tick()(lines 509–518)
Potential Issues
-
Fixed retry delay may be insufficient. Chain locks typically propagate within a few seconds, but under network congestion or with stale peers, 15 seconds total may not be enough. Exponential backoff (e.g., 5s, 10s, 20s) would be more resilient.
-
Retries may hit the same stale peer. If the QRInfo re-request goes to the same peer that returned incomplete data, all retries will fail identically. Requesting from a different peer on retry would improve success rate.
-
Tip may advance during retries. If a new block is mined during the 15-second retry window, the original tip's chain lock may never appear in QRInfo responses because peers have moved on to the new tip. The retry should potentially re-request with updated block locators rather than repeating the same request.
-
Failure is permanent. Once
MAX_RETRY_ATTEMPTSis exceeded,MasternodeSyncFailedis returned and the sync manager transitions toSyncState::Errorwith no automatic recovery. The user must manually restart the SPV client.
Observed Context
- Network: Dash Testnet
- Client: Dash Evo Tool using dash-spv via dash-sdk
- Scenario: Initial SPV sync; headers/filters sync completed successfully, masternode sync fails during QRInfo processing
- rust-dashcore revision:
a05d256f59743c69df912462dd77dd487e1ff5b2
Suggested Improvements
- Increase
MAX_RETRY_ATTEMPTSor use exponential backoff - Rotate to a different peer on retry
- Consider re-initiating QRInfo request with fresh block locators on retry (in case the tip advanced)
- Optionally allow automatic recovery by restarting the masternode sync stage instead of failing the entire sync permanently
🤖 Co-authored by Claudius the Magnificent AI Agent
Activity
fix(spv): transition to error status when sync manager fails
fix(spv): add distinct error state for SPV sync failures (#650)
Claudius-Maginificent commentedon May 5, 2026
Reproduced on testnet against v0.42-platform-nightly
We hit this on a cold-cache rs-platform-wallet e2e run while testnet's tip was 31 blocks past a DKG cycle boundary. Confirmed against four independent peers — not a single-bad-peer artifact.
Versions / pin
fe2476611fcf72d6f36f1154a39a2f9af3b6a248onv0.42-platform-nightlyfeat/rs-platform-wallet-id-007-stub, post-merge ofv3.1-devat32ee2cd6beReproducer
000000604acd01b5bbbaed7236a2e9d6620e1a933885fb993c24e7d9c1fe537dat height 1471135Verbatim error
Peer-agreement (rules out single-bad-peer)
4 connected peers from the default DNS seed
testnet-seed.dashdot.io:19999:212.47.68.199:1999968.67.122.1:1999968.67.122.8:1999968.67.122.18:19999All reported identical tip height. All four QRInfo round-trips (across 4 retry rounds, ~22s end-to-end) returned identical responses missing the same H-slot CL sig. So the data is genuinely not yet on the network at the moment dash-spv asks; it isn't a peer divergence.
"h - 0" is a slot index, not arithmetic
This format string cost us several hours of misdirected diagnosis.
"h - {0}"reads like a height offset but theu8is the slot index ofRotationChainLockSignatureSlot(dash/src/sml/masternode_list_engine/mod.rs:82-93): 0=H, 1=HMinusC, 2=HMinus2c, 3=HMinus3c, 4=Tip. So "h - 0" = "the H slot". The newerMissingRotationSignatures { missing: Vec<...> }variant at lines 110–114 is the right shape; the legacyu8constructor atdash/src/sml/quorum_validation_error.rs:30-33is the one firing here. Worth fixing the format string regardless of the underlying retry behavior — zero-risk freebie.Related upstream PRs
Skipped#721 (merged 2026-05-05) — classifies missing rotation CL sigs asSkippedinstead of fatal. Looks like the right shape of fix. Caveat: it was merged onv0.42-dev. Our pin is onv0.42-platform-nightlyand the two branches have diverged with incompatibleManagedCoreAccountsplits — a direct cherry-pick produced 24 API errors locally. Suggest reconciling the branches or cherry-picking fix(dash): classify missing infrastructure errors asSkipped#721 ontov0.42-platform-nightlydirectly.QRInfoFeedResultand return it fromfeed_qr_info#686 (open) —feat: add QRInfoFeedResult and return it from feed_qr_info. Infrastructure that fix(dash): classify missing infrastructure errors asSkipped#721 builds on.HMinusC(h-3c) whenHhas no CL sig" behavior, which would have prevented this stall outright. Worth revisiting.Downstream workaround
dashpay/platform PR #3586 adds an event-driven early-bail that surfaces this error in ~24s instead of the framework's 600s timeout, by subscribing to
SyncEvent::ManagerErrorfiltered byManagerIdentifier::Masternode. It only reduces operator-feedback latency — does not fix the underlying issue.Suggested fixes
Skipped#721'sSkippedclassification ontov0.42-platform-nightlyso fresh-cycle missing-CL-sig stops being terminal.HMinusCwhen slotHhas no CL sig — accept "one cycle behind live tip" rather than "no mn-list at all".dash/src/sml/quorum_validation_error.rs:30-33to render the slot enum (or take the enum directly in the constructor). Independently useful regardless of which retry behavior lands.Full trace log (4646 lines) available on request; key lines are startup ChainLock at 1471098 (L26), peer mode (L51), first QRInfo (L428), retries (L2317 / L2569 / L3611), terminal error (L4623).
🤖 Co-authored by Claudius the Magnificent AI Agent
xdustinface commentedon May 9, 2026
Should be fixed.