chore: bump rust-dashcore to eb889af#3762
Conversation
Picks up two upstream changes: - `refactor: avoid rebuilding script_pubkey`s for BIP158 filter matching` (#781). Adds `monitored_script_pubkeys` to `WalletInfoInterface` so filter matching reads cached `ScriptBuf`s instead of rebuilding P2PKH scripts per address per batch. Delegated through `PlatformWalletInfo`. - `feat(dash-spv): consolidate devnet config into DevnetConfig struct` (#788). `ClientConfig.llmq_devnet_params` is gone; devnet knobs now live on `ClientConfig.devnet: Option<DevnetConfig>` whose presence must match `network == Network::Devnet`. `platform_wallet_manager_spv_start` now builds a `DevnetConfig` whenever `devnet_name` is provided and hangs the optional `LlmqDevnetParams` off it, keeping the FFI surface unchanged. Re-export `DevnetConfig` from `platform_wallet::spv` so the FFI doesn't reach into `dash_spv` directly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR updates the workspace dependencies for rust-dashcore crates to a new git revision, then refactors SPV FFI devnet configuration to construct and wrap LLMQ parameters in a ChangesDevnetConfig Refactoring
Wallet Information Interface Extension
🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsStopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v3.1-dev #3762 +/- ##
==========================================
Coverage 87.17% 87.17%
==========================================
Files 2607 2607
Lines 319484 319589 +105
==========================================
+ Hits 278500 278602 +102
- Misses 40984 40987 +3
🚀 New features to boost your workflow:
|
|
✅ DashSDKFFI.xcframework built for this PR.
SwiftPM (host the zip at a stable URL, then use): .binaryTarget(
name: "DashSDKFFI",
url: "https://your.cdn.example/DashSDKFFI.xcframework.zip",
checksum: "2c2a78b5f88cc382387f6acab1d949cc215a5532de6871bc6bd407b74f069fcf"
)Xcode manual integration:
|
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
Clean rust-dashcore dependency bump with two narrow FFI adaptations: a passthrough monitored_script_pubkeys delegate and migration to Option<DevnetConfig>. No consensus, security, or memory-safety issues found. One in-scope suggestion: extend the pre-existing FFI validation block to mirror the new upstream DevnetConfig::validate() constraints (empty/slash names), matching the pattern already used for the devnet.is_some() == (network == Devnet) invariant.
🟡 1 suggestion(s)
1 additional finding(s) omitted (not in diff).
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `packages/rs-platform-wallet-ffi/src/spv.rs`:
- [SUGGESTION] packages/rs-platform-wallet-ffi/src/spv.rs:245-268: Mirror new DevnetConfig::validate() constraints in FFI pre-checks
Upstream `DevnetConfig::validate()` (in dash-spv) now rejects empty `devnet_name` and names containing `/`. `platform_wallet_manager_spv_start` only null-checks the pointer and then hands the config to `spawn_in_background`, which logs but does not surface startup failures synchronously. The result is a successful FFI return followed by a background spawn that immediately fails validation — a new failure mode introduced by this PR's adoption of `DevnetConfig`. The existing validation block at lines 245-268 already mirrors the upstream `devnet.is_some() == (network == Devnet)` invariant for synchronous reporting; extending it for empty/slash names keeps the FFI's error surface consistent and matches the established pattern. Not blocking — the failure is devnet-only and fails closed.
Issue being fixed or feature implemented
Picks up two upstream rust-dashcore changes on top of
58d61ea:refactor: avoid rebuilding script_pubkeys for BIP158 filter matching. Addsmonitored_script_pubkeystoWalletInfoInterfaceand threads cachedScriptBufs through the rescan path so a full testnet sync no longer rebuilds ~7M P2PKHScriptBuf`s.feat(dash-spv): consolidate devnet config into DevnetConfig struct. ReplacesClientConfig.llmq_devnet_paramswithClientConfig.devnet: Option<DevnetConfig>, which also holds the-llmq{chainlocks,instantsenddip0024,platform}routing overrides.ClientConfig::validatenow enforcesdevnet.is_some() == (network == Network::Devnet).What was done?
Cargo.toml/Cargo.lock: bump all rust-dashcore git deps from58d61ea→eb889af.packages/rs-platform-wallet/src/wallet/platform_wallet_traits.rs: implement the newmonitored_script_pubkeystrait method by delegating to the innerManagedWalletInfo, and importScriptBuf.packages/rs-platform-wallet-ffi/src/spv.rs: inplatform_wallet_manager_spv_start, build aDevnetConfigwheneverdevnet_nameis non-null and hang the optionalLlmqDevnetParamsoff it, replacing the removedClientConfig.llmq_devnet_paramswrite. The FFI signature is unchanged.packages/rs-platform-wallet/src/spv/mod.rs: re-exportDevnetConfigalongsideClientConfigso the FFI doesn't reach intodash_spvdirectly.How Has This Been Tested?
cargo check --workspace --tests— clean.cargo clippy -p platform-wallet -p platform-wallet-ffi --all-targets— clean.cargo fmt --all -- --check— clean.Breaking Changes
None for consensus or external API. The
platform_wallet_manager_spv_startFFI signature is unchanged; the existingdevnet_name+llmq_devnet_size/thresholdarguments still drive the same behavior, just routed throughDevnetConfiginstead ofClientConfig.llmq_devnet_params.Checklist:
🤖 Generated with Claude Code
Summary by CodeRabbit
Refactor
Chores