fix(drive): accept MMR-aligned shielded note proof ranges#4201
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe shielded encrypted notes verifier now aligns ChangesShielded notes verification
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
|
🕓 Ready for review — 1 ahead in queue (commit 8e680ab) |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@packages/rs-drive/src/verify/shielded/verify_shielded_encrypted_notes/v0/mod.rs`:
- Around line 47-54: In the shielded notes verification flow around the
start_index alignment check and PathQuery construction, validate the inclusive
end index with checked arithmetic using start_index and limit - 1. If the
addition overflows, return the existing Drive corruption error before
constructing the PathQuery; otherwise use the checked result for the query
range.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 45f7a606-a0fa-4a43-b1b8-dea16c66b770
📒 Files selected for processing (1)
packages/rs-drive/src/verify/shielded/verify_shielded_encrypted_notes/v0/mod.rs
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v4.1-dev #4201 +/- ##
=============================================
+ Coverage 65.42% 87.51% +22.09%
=============================================
Files 26 2666 +2640
Lines 2707 336911 +334204
=============================================
+ Hits 1771 294844 +293073
- Misses 936 42067 +41131
🚀 New features to boost your workflow:
|
Summary
Context
Wallet sync rewinds its encrypted-note watermark to a 2048-note MMR chunk boundary, while one request may fetch four chunks. The verifier previously treated the 8192-element request limit as the alignment unit and rejected the valid 2048 resume point, leaving shielded sync and balance recovery stuck.
Validation
Summary by CodeRabbit