fix(dash-spv): fire catch-up QRInfo past Incremental mining window#743
Conversation
When a header batch lands during an in-flight `Incremental` `MnListDiff`, intermediate `BlockHeadersStored` events get dropped by the `has_pending_requests` guard, and the tick's `current_height < block_header_tip_height` check is false once `Incremental` catches up. If the cycle's mining window opens and closes inside that batch, the catch-up branch in `next_pipeline_mode` never fires and the cycle's rotated quorums stay unvalidated until a later block extends past the window. Re-evaluate `next_pipeline_mode` at the advanced tip when `Incremental` completes and fire the QRInfo immediately if the gate picks `QuorumValidation`. Fixes a race in `test_masternode_list_sync_with_quorum_rotation` where `dashd` delivered headers in two batches straddling the third DKG cycle's mining window.
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR extends ChangesIncremental Pipeline Catch-up QRInfo Dispatch
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v0.42-dev #743 +/- ##
=============================================
+ Coverage 71.31% 71.40% +0.09%
=============================================
Files 321 321
Lines 70339 70401 +62
=============================================
+ Hits 50160 50273 +113
+ Misses 20179 20128 -51
|
|
@CodeRabbit review! |
✅ Actions performedReview triggered.
|
|
✅ Actions performedReview triggered.
|
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
When a header batch lands during an in-flight
IncrementalMnListDiff, intermediateBlockHeadersStoredevents get dropped by thehas_pending_requestsguard, and the tick'scurrent_height < block_header_tip_heightcheck is false onceIncrementalcatches up. If the cycle's mining window opens and closes inside that batch, the catch-up branch innext_pipeline_modenever fires and the cycle's rotated quorums stay unvalidated until a later block extends past the window.Re-evaluate
next_pipeline_modeat the advanced tip whenIncrementalcompletes and fire the QRInfo immediately if the gate picksQuorumValidation. Fixes a race intest_masternode_list_sync_with_quorum_rotationwheredashddelivered headers in two batches straddling the third DKG cycle's mining window.Summary by CodeRabbit