Repository navigation
test(dash-spv): drop a restored cycle with another entry hash - #1392
Conversation
A snapshot whose lists hold a stored cycle's quorum under the same type and quorum hash, but with a different quorum_vvec_hash and so a different entry hash, restores without that cycle and keeps the other stored cycle. Without the entry-hash comparison in the restore filter the cycle comes back and the test fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post |
|
Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post |
|
Bots are done — your move: post |
|
/self-reviewed d5d91a4 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #1392 +/- ##
==========================================
- Coverage 85.68% 85.68% -0.01%
==========================================
Files 268 268
Lines 70311 70345 +34
==========================================
+ Hits 60249 60272 +23
- Misses 10062 10073 +11
|
|
✅ Review complete in 6m 35s Planner (7s) Review (behavior · pair): 1 finding Judge: 1 kept · 0 dropped (30s) Review metadataConfig:
Account limits:
Judge decisions:
Timing:
|
There was a problem hiding this comment.
✅ Approved. 1 suggestion, which doesn't block.
What this does: Adds a test for restoring a saved masternode engine. It checks that a stored quorum cycle is dropped when the saved lists hold that quorum with different contents, and that the other cycles and all lists come back unchanged.
Related work: open PRs and issues that may cover the same change. None of them blocks.
What to test
The review model wrote these steps. Check what a step runs before you follow it.
Setup: A checkout of the branch with the dash test fixtures under dash/tests/data/test_DML_diffs/.
- Run
cargo test -p dash-spv --lib a_snapshot_drops_a_cycle_its_lists_hold_with_another_entry_hash. Expect it to pass. - Run
cargo test -p dash-spv --lib snapshot_codec. Expect every snapshot test to pass, includinga_snapshot_restores_the_cycles_its_lists_hold. - Temporarily make
retain_listed_cyclesmatch cycles by quorum hash only, not entry hash, and rerun the new test. Expect it to fail on theonly the altered cycle is droppedassertion.
About this review
- Reviewed
6167fb7, round 1 - 44 changed lines read in 6m 35s
- Found by
claude-sonnet-5-5andclaude-opus-5-5, judged byclaude-opus-5-5 - Tokens: 101k in (3k from cache) · 6k out · about $0.51 at API prices
- How Manki reviews
|
Ready for review — |
No diff or QRInfo can make a masternode list disagree with a stored rotation cycle, so the test edits the lists directly to stand in for a saved snapshot in that state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
964adcd
|
✅ Review complete in 1m 55s Planner (5s) Review (behavior · pair): 0 findings Judge: 0 kept · 0 dropped (21s) Review metadataConfig:
Account limits:
Timing:
Last reviewed
|
There was a problem hiding this comment.
✅ Approved.
What this does: Adds a test for restoring a saved masternode engine snapshot. When a stored quorum cycle disagrees with the matching quorum in the saved lists, only that cycle is dropped on restore.
Related work: open PRs and issues that may cover the same change. None of them blocks.
What to test
The review model wrote these steps. Check what a step runs before you follow it.
Setup: Run the dash-spv unit tests, which load the mainnet 2240504 fixtures from dash/tests/data/test_DML_diffs/.
- Run
cargo test -p dash-spv --lib a_snapshot_drops_a_cycle_its_lists_hold_with_another_entry_hash. Expect it to pass. - Run
cargo test -p dash-spv --lib snapshot_codec. Expect all snapshot tests to pass, includinga_snapshot_restores_the_cycles_its_lists_hold. - Temporarily make
retain_listed_cyclesignore the entry hash and rerun the new test. Expect it to fail on "only the altered cycle is dropped".
About this review
- Reviewed
964adcd, round 2 - 45 changed lines read in 1m 55s
- Found by
claude-sonnet-5-5andclaude-opus-5-5, judged byclaude-opus-5-5 - Tokens: 236k in (106k from cache) · 5k out · about $0.63 at API prices
- How Manki reviews
|
Bots are done — your move: post |
|
/self-reviewed 964adcd |
|
Ready for review — |
…run 43244985751)
Follow-up to #1324 for a review suggestion that came in as it merged: no test covered the entry-hash comparison in
retain_listed_cycles. The existing drop test uses lists that lack the rotated quorums entirely, so it drops a cycle on a missing quorum, never on a hash mismatch.The new test gives every list a stored cycle's quorum under the same type and quorum hash, but with a different
quorum_vvec_hashand so a different entry hash. It expects that cycle not to be restored and the other stored cycle to be kept. It fails when the comparison is replaced bytrue.🤖 Generated with Claude Code
PR Hygiene ·
964adcddash-spv(dash-spv/src/sml_engine/snapshot_codec.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.Summary by CodeRabbit