Repository navigation
fix(dash-spv): replay a first QRInfo before the diffs built on its lists - #1091
Conversation
The replay orders stored masternode messages by the height of their newest base. A first QRInfo is requested with no base, so Core builds it from genesis, and on mainnet the header storage starts at a checkpoint and has no height for genesis. The QRInfo was then ordered by its own tip height and replayed last, after every work-block diff requested from one of its lists, and each of those diffs failed with a missing base. A later QRInfo, requested from a list the first one built, failed the same way. The replay now gives the engine the genesis height before ordering. Copy of a mainnet storage with headers anchored at 2298000: 3 of 25 messages replayed before, 25 of 25 now, and 34 of 34 after one more restart, with no "does not apply" warning. After the start, sync requested 10 diffs instead of 23. The new test replays the captured mainnet QRInfo at 2518986 plus a diff on its h-c list, which failed before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 22 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: dashpay/rust-dashcore/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
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 |
|
@coderabbitai approve |
✅ Action performedComments resolved and changes approved. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #1091 +/- ##
==========================================
- Coverage 77.49% 77.49% -0.01%
==========================================
Files 318 318
Lines 81094 81134 +40
==========================================
+ Hits 62846 62871 +25
- Misses 18248 18263 +15
|
The replay orders stored masternode messages by the height of their newest base. A first QRInfo is requested with no base, so Core builds it from genesis, and on mainnet the header storage starts at a checkpoint and has no height for genesis. The QRInfo was then ordered by its own tip height and replayed last, after every work-block diff requested from one of its lists, and each of those diffs failed with a missing base. A later QRInfo, requested from a list the first one built, failed the same way. The replay now gives the engine the genesis height before ordering.
Copy of a mainnet storage with headers anchored at 2298000: 3 of 25 messages replayed before, 25 of 25 now, and 34 of 34 after one more restart, with no "does not apply" warning. After the start, sync requested 10 diffs instead of 23. The new test replays the captured mainnet QRInfo at 2518986 plus a diff on its h-c list, which failed before.
PR Hygiene ·
c8d80ff/skip-botsproceeds without the ones not yet reported/self-reviewedonce the bots are donedash-spv(dash-spv/Cargo.toml,dash-spv/src/storage/masternode.rs) — QuantumExplorer or xdustinfaceWhen every box is checked the
PR Hygienecheck passes and this can merge.