fix(sdk-ffi): carry the limit in the proposed-epoch-blocks range request - #4456
Conversation
`dash_sdk_evonode_get_proposed_epoch_blocks_by_range` ignored its `limit` parameter and sent the request with `limit: None`. Drive then built the proof for its default page while the verifier re-derived the query shape from the request (no limit), so every proved call failed with `Proof is missing data for query range … KVHash`. The limit now travels in the request (0 ⇒ Drive's default page). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
🕓 Ready for review — 1 ahead in queue (commit 84690af) |
|
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)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe proposed epoch blocks query now accepts and stores an optional page limit. Positive limits are forwarded to the gRPC request, while zero selects Drive’s default page size. ChangesEpoch block query limit
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change carries the requested page limit so proposed epoch block queries can verify successfully; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 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 |
Brings the branch up to date with upstream after #4451 (masternode credit withdrawals), #4452, #4453, #4456, and #4461 landed on v4.2-dev. One conflict, in packages/rs-platform-wallet/src/wallet/core/mod.rs: a module-registration collision where this branch adds 'pub mod spend_observer;' and upstream adds 'pub(crate) use sign_message::is_signable_funding_account;' at the same spot. Resolved as the union — both lines kept, no semantic overlap. Auto-merged overlaps verified by hand: both error.rs files and DashSdkError.kt gained disjoint additions (upstream's MasternodeWithdrawalUnconfirmed / FFI code 42 alongside this branch's StaleReservation reusing code 34 — codes distinct, both mapping arms present). generation.rs (the broadcast-fence redesign) was touched by this branch only. Verified: cargo check -p platform-wallet -p platform-wallet-ffi clean; cargo test -p platform-wallet wallet::core::generation — 15/15 passed, including the settle-boundary and handoff tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Brings the shielded-invite branch up to date with upstream v4.2-dev (#4451 masternode credit withdrawals, #4452, #4453, #4456, #4461). One conflict, in rs-platform-wallet/src/wallet/shielded/operations.rs: upstream #4451 moved carries_consensus_rejection() and broadcast_definitely_failed() out of operations.rs into the new shared crate::broadcast_outcome module (so masternode withdrawals can reuse them), while this branch had inserted its one-time-key claim machinery (NullifierSpentStatus, claim-evidence resolution) directly after those functions. Resolved by dropping the now-local duplicate of broadcast_definitely_failed() — its body is byte-identical to the moved copy, and the file already imports both helpers from crate::broadcast_outcome via upstream's auto-merged use line — and keeping this branch's one-time-key claim block in place. No semantic changes to either side. Verified: cargo check -p platform-wallet -p platform-wallet-ffi -p rs-unified-sdk-jni clean; cargo test -p platform-wallet --features shielded wallet::shielded = 205 passed, 0 failed (includes the one_time_claim_evidence and note_selection suites). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Summary
dash_sdk_evonode_get_proposed_epoch_blocks_by_rangeignored itslimitparameter and sent the request withlimit: None. Drive then built the proof for its default page (100) while the verifier re-derived the query shape from the request (no limit), so every proved call failed with:(seen on mainnet from the iOS wallet). The limit now travels in the request;
0⇒ Drive's default page.This commit was pushed to the
feat/current-epoch-ffibranch right after #4453 had merged (the branch had been deleted), so it never landed — re-opened here on top ofv4.2-dev.Consumer: dashpay/dashwallet-ios#1036 (Nodes shortcut — blocks proposed this epoch).
Test plan
cargo test -p rs-sdk-ffi --lib -- proposed_epoch_blocks,cargo clippy -p rs-sdk-ffi --all-targets -- -D warnings,cargo fmt🤖 Generated with Claude Code
Summary by CodeRabbit