Skip to content

fix(dash-spv): replay a first QRInfo before the diffs built on its lists - #1091

Merged
ZocoLini merged 1 commit into
devfrom
fix/masternode-replay-genesis-base
Sep 30, 2026
Merged

ZocoLini merged 1 commit into
devfrom
fix/masternode-replay-genesis-base

Conversation

@ZocoLini

@ZocoLini ZocoLini commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • Bots — coderabbitai not yet — /skip-bots proceeds without the ones not yet reported
  • Self-review — post /self-reviewed once the bots are done
  • Within your 5 open PRs
  • Build running
  • Approvals
    • dash-spv (dash-spv/Cargo.toml, dash-spv/src/storage/masternode.rs) — QuantumExplorer or xdustinface

When every box is checked the PR Hygiene check passes and this can merge.

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>
@coderabbitai

coderabbitai Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 22 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: dashpay/rust-dashcore/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: c2bea96c-4905-49d9-b0bf-58fa01a45398

📥 Commits

Reviewing files that changed from the base of the PR and between 46db9da and c8d80ff.

📒 Files selected for processing (2)
  • dash-spv/Cargo.toml
  • dash-spv/src/storage/masternode.rs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ZocoLini

Copy link
Copy Markdown
Collaborator Author

@coderabbitai approve

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Sep 30, 2026
@coderabbitai

coderabbitai Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Comments resolved and changes approved.

@ZocoLini
ZocoLini merged commit f3dc260 into dev Sep 30, 2026
35 of 37 checks passed
@ZocoLini
ZocoLini deleted the fix/masternode-replay-genesis-base branch September 30, 2026 00:12
@codecov

codecov Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.49%. Comparing base (46db9da) to head (c8d80ff).
⚠️ Report is 1 commits behind head on dev.

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     
Flag Coverage Δ
core 78.90% <ø> (ø)
ffi 50.78% <ø> (+<0.01%) ⬆️
rpc 20.00% <ø> (ø)
spv 92.18% <100.00%> (-0.07%) ⬇️
wallet 80.22% <ø> (ø)
Files with missing lines Coverage Δ
dash-spv/src/storage/masternode.rs 99.53% <100.00%> (+0.04%) ⬆️

... and 6 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-bots Waiting for the review bots to report on this head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant