Skip to content

chore: update dashcore deps to 08ade6e8#3405

Closed
shumkov wants to merge 2 commits intov3.1-devfrom
chore/update-dashcore-08ade6e8
Closed

chore: update dashcore deps to 08ade6e8#3405
shumkov wants to merge 2 commits intov3.1-devfrom
chore/update-dashcore-08ade6e8

Conversation

@shumkov
Copy link
Copy Markdown
Collaborator

@shumkov shumkov commented Mar 26, 2026

Issue being fixed or feature implemented

Update rust-dashcore dependency from 42eb1d69 to 08ade6e8 (v0.42-dev HEAD). This brings in several breaking changes that affect the platform workspace.

What was done?

Dashcore dependency update

  • Updated all 5 rust-dashcore workspace deps to rev 08ade6e8
  • Removed key-wallet-manager from workspace deps — merged into key-wallet::manager in dashcore
  • Removed "std" feature from dashcore dep in rs-dpp (feature removed upstream)

key-wallet-manager → key-wallet migration

  • Removed key-wallet-manager dep from rs-dpp and rs-platform-wallet Cargo.toml
  • Updated core_key_wallet_manager feature handling
  • Removed stale pub use key_wallet_manager re-exports from rs-dpp and rs-platform-wallet

DMNState.service: SocketAddr → Option<SocketAddr>

WalletInterface changes

  • process_mempool_transaction gains is_instant_send: bool param, returns MempoolTransactionResult
  • Added watched_outpoints() required method to SpvWalletAdapter
  • Added mark_instant_send_utxos() to PlatformWalletInfo WalletInfoInterface impl
  • Updated check_core_transaction caller to pass new update_balance parameter

Swift SDK — unified EventHandler API

  • Replaced 6 individual callback set/clear methods on SPVClient with unified FFIEventCallbacks struct passed at construction
  • Updated SPVEventHandler for new callback signatures (block processed with confirmed txids, transaction received with status)
  • Updated WalletService to pass all handlers at SPVClient construction
  • Fixed build_ios.sh fallback: use forward declarations instead of full typedefs for FFIDashSpvClient and FFIClientConfig
  • Added FFIEventCallbacks forward declaration in build.rs cbindgen config
  • Made dash_sdk_ffi.h self-contained with forward declarations

rs-sdk-ffi

  • Updated dash_spv_ffi_client_new call to pass FFIEventCallbacks::default()
  • Removed key-wallet-manager from build_ios.sh hash computation

How Has This Been Tested?

  • cargo check --workspace passes (Rust compilation)
  • cargo check -p rs-sdk-ffi passes (FFI layer)
  • cargo clippy -p drive-abci -- -D warnings passes
  • Swift build depends on CI (no local Xcode)

Breaking Changes

  • key-wallet-manager crate no longer exists — use key_wallet::manager instead
  • DMNState.service is now Option<SocketAddr>
  • WalletInterface::process_mempool_transaction signature changed
  • Swift SPVClient API changed: handlers passed at construction, not via setters

@shumkov shumkov added this to the v3.1.0 milestone Mar 26, 2026
@shumkov shumkov self-assigned this Mar 26, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 26, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Workspace dependency revisions; key-wallet-manager removed from features/exports; masternode service became Option<SocketAddr> with fallible conversions and guarded assignments; platform wallet APIs updated; FFI headers/build and unified client init changed; tests and docs updated.

Changes

Cohort / File(s) Summary
Workspace manifest
Cargo.toml
Bumped git rev for dashcore, dash-spv, dash-spv-ffi, key-wallet, dashcore-rpc; removed key-wallet-manager from [workspace.dependencies].
rs-dpp
packages/rs-dpp/Cargo.toml, packages/rs-dpp/src/lib.rs
Removed std feature/default-features tweak on dashcore; dropped optional key-wallet-manager dependency and removed conditional pub use key_wallet_manager.
rs-platform-wallet: features, exports, docs, examples
packages/rs-platform-wallet/Cargo.toml, packages/rs-platform-wallet/src/lib.rs, packages/rs-platform-wallet/examples/basic_usage.rs, packages/rs-platform-wallet/README.md
Removed key-wallet-manager dependency; manager feature no longer enables it (now empty but kept in default); updated imports/docs to key_wallet::manager::WalletManager; removed conditional re-export.
Platform wallet interfaces
packages/rs-platform-wallet/src/platform_wallet_info/wallet_info_interface.rs, packages/rs-platform-wallet/src/platform_wallet_info/wallet_transaction_checker.rs
Added mark_instant_send_utxos(&mut self, txid: &dashcore::Txid) -> bool; changed check_core_transaction to take &mut Wallet and an update_balance: bool parameter and forwarded it.
Drive ABci: masternode optional service & conversions
packages/rs-drive-abci/src/platform_types/masternode/v0/mod.rs, packages/rs-drive-abci/src/platform_types/masternode/mod.rs, packages/rs-drive-abci/src/platform_types/validator/v0/mod.rs, packages/rs-drive-abci/src/execution/.../update_masternode_list/.../v0/mod.rs
Converted several From impls to fallible TryFrom (propagating errors); require/validate DMNState.service presence; treat service as Option<SocketAddr> and only assign node_ip when nested Some.
Tests updated for optional service
packages/rs-drive-abci/tests/..., packages/rs-drive-abci/tests/strategy_tests/masternodes.rs, packages/rs-drive-abci/tests/strategy_tests/masternode_list_item_helpers.rs, packages/rs-drive-abci/src/execution/.../update_operator_identity/.../v0/mod.rs, packages/rs-drive-abci/src/execution/validation/.../state_transitions/mod.rs
Updated test fixtures/helpers to initialize DMNState.service as Some(SocketAddr); adjusted IP-change/test logic to handle optional service and extract ports safely.
SDK FFI and iOS build tweaks
packages/rs-sdk-ffi/src/unified.rs, packages/rs-sdk-ffi/build_ios.sh, packages/rs-sdk-ffi/build.rs, packages/rs-sdk-ffi/include/dash_sdk_ffi.h
Unified client creation now passes FFIEventCallbacks::default() to SPV client; iOS build hash/clean exclude key-wallet-manager; build script may auto-build missing FFI headers and patch headers with forward declarations; cbindgen prelude expanded and dash_spv_ffi.h include removed in favor of guarded forward-declare.
rs-sdk feature wiring
packages/rs-sdk/Cargo.toml
Removed core_key_wallet_manager feature and references; spv-client and wallet features no longer enable core_key_wallet_manager (wallet now depends only on core_key_wallet).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hopped through Cargo with nimble paws,

Key-wallet-manager vanished from the cause,
Services wrapped in Option, conversions polite,
FFI hums with callbacks in the twilight,
A little rabbit claps — the tree's in bloom tonight!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: update dashcore deps to 08ade6e8' accurately summarizes the main change: updating Dashcore dependencies to a specific commit. The title is clear, specific, and directly reflects the primary focus of the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/update-dashcore-08ade6e8

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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs (1)

67-71: Consider handling Some(None) case for service removal.

The double-Option handling correctly distinguishes between "field not updated" (None) and "field updated to a value" (Some(Some(address))). However, when dmn_state_diff.service is Some(None) (service explicitly removed), the code doesn't update node_ip, leaving potentially stale data.

If a masternode's service address being removed should clear or invalidate the validator's IP, this case needs handling. If stale data is acceptable in this scenario, this is fine as-is.

💡 Optional: Handle service removal explicitly
                     if let Some(maybe_address) = dmn_state_diff.service {
                         if let Some(address) = maybe_address {
                             validator.node_ip = address.ip().to_string();
+                        } else {
+                            // Service was explicitly removed - consider clearing or marking as unavailable
+                            validator.node_ip = String::new(); // or keep as-is if stale is acceptable
                         }
                     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs`
around lines 67 - 71, The code currently only updates validator.node_ip when
dmn_state_diff.service is Some(Some(address)); add explicit handling for
Some(None) to clear or invalidate the stored IP to avoid stale data: match on
dmn_state_diff.service and on Some(None) set validator.node_ip to an appropriate
"cleared" value (e.g., empty string or None if the field is Option<String>),
keep the existing behavior for Some(Some(address)) to set validator.node_ip =
address.ip().to_string(), and leave None as "no change". Use the symbols
dmn_state_diff.service and validator.node_ip to locate and modify the logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs`:
- Around line 67-71: The code currently only updates validator.node_ip when
dmn_state_diff.service is Some(Some(address)); add explicit handling for
Some(None) to clear or invalidate the stored IP to avoid stale data: match on
dmn_state_diff.service and on Some(None) set validator.node_ip to an appropriate
"cleared" value (e.g., empty string or None if the field is Option<String>),
keep the existing behavior for Some(Some(address)) to set validator.node_ip =
address.ip().to_string(), and leave None as "no change". Use the symbols
dmn_state_diff.service and validator.node_ip to locate and modify the logic.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 75fdf756-931b-4656-87e3-107cc97f3f73

📥 Commits

Reviewing files that changed from the base of the PR and between 89a1036 and 448b14e.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (15)
  • Cargo.toml
  • packages/rs-dpp/Cargo.toml
  • packages/rs-dpp/src/lib.rs
  • packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs
  • packages/rs-drive-abci/src/platform_types/masternode/v0/mod.rs
  • packages/rs-drive-abci/src/platform_types/validator/v0/mod.rs
  • packages/rs-drive-abci/tests/strategy_tests/masternodes.rs
  • packages/rs-platform-wallet/Cargo.toml
  • packages/rs-platform-wallet/README.md
  • packages/rs-platform-wallet/examples/basic_usage.rs
  • packages/rs-platform-wallet/src/lib.rs
  • packages/rs-platform-wallet/src/platform_wallet_info/wallet_info_interface.rs
  • packages/rs-platform-wallet/src/platform_wallet_info/wallet_transaction_checker.rs
  • packages/rs-sdk-ffi/build_ios.sh
  • packages/rs-sdk-ffi/src/unified.rs

…sactionContext)

- Update all rust-dashcore deps from 42eb1d69 to 08ade6e8
- Remove key-wallet-manager from workspace deps (merged into key-wallet::manager)
- Remove "std" feature from dashcore dep (no longer exists)
- Fix key-wallet-manager imports → key-wallet::manager in dpp, platform-wallet
- Fix DMNState.service: SocketAddr → Option<SocketAddr> in drive-abci
- Fix double-Option in dmn_state_diff.service handling
- Fix dash_spv_ffi_client_new: add FFIEventCallbacks parameter in rs-sdk-ffi
- Add mark_instant_send_utxos to PlatformWalletInfo WalletInfoInterface impl
- Update test code for new API signatures

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shumkov shumkov force-pushed the chore/update-dashcore-08ade6e8 branch from 448b14e to ba359d2 Compare March 26, 2026 07:42
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/rs-sdk-ffi/src/unified.rs`:
- Around line 75-76: The build uses the wrong feature flag so conditional blocks
(e.g., the cleanup guarded by #[cfg(feature = "core")]) never run; update every
occurrence of #[cfg(feature = "core")] in unified.rs to #[cfg(feature =
"dash_spv")] so the dash_spv-dependent code (including resource cleanup around
dash_spv_ffi_client_new and FFIEventCallbacks usage) is compiled and the
resources are released correctly.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6b6efafd-9772-4452-8a25-a962154029a9

📥 Commits

Reviewing files that changed from the base of the PR and between 448b14e and ba359d2.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (20)
  • Cargo.toml
  • packages/rs-dpp/Cargo.toml
  • packages/rs-dpp/src/lib.rs
  • packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs
  • packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/mod.rs
  • packages/rs-drive-abci/src/platform_types/masternode/mod.rs
  • packages/rs-drive-abci/src/platform_types/masternode/v0/mod.rs
  • packages/rs-drive-abci/src/platform_types/validator/v0/mod.rs
  • packages/rs-drive-abci/tests/strategy_tests/masternode_list_item_helpers.rs
  • packages/rs-drive-abci/tests/strategy_tests/masternodes.rs
  • packages/rs-platform-wallet/Cargo.toml
  • packages/rs-platform-wallet/README.md
  • packages/rs-platform-wallet/examples/basic_usage.rs
  • packages/rs-platform-wallet/src/lib.rs
  • packages/rs-platform-wallet/src/platform_wallet_info/wallet_info_interface.rs
  • packages/rs-platform-wallet/src/platform_wallet_info/wallet_transaction_checker.rs
  • packages/rs-sdk-ffi/build_ios.sh
  • packages/rs-sdk-ffi/src/unified.rs
  • packages/rs-sdk/Cargo.toml
💤 Files with no reviewable changes (2)
  • packages/rs-platform-wallet/src/lib.rs
  • packages/rs-dpp/src/lib.rs
✅ Files skipped from review due to trivial changes (6)
  • packages/rs-platform-wallet/README.md
  • packages/rs-platform-wallet/examples/basic_usage.rs
  • packages/rs-drive-abci/tests/strategy_tests/masternodes.rs
  • packages/rs-drive-abci/src/platform_types/validator/v0/mod.rs
  • packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs
  • packages/rs-platform-wallet/Cargo.toml
🚧 Files skipped from review as they are similar to previous changes (4)
  • Cargo.toml
  • packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs
  • packages/rs-platform-wallet/src/platform_wallet_info/wallet_info_interface.rs
  • packages/rs-platform-wallet/src/platform_wallet_info/wallet_transaction_checker.rs

Comment on lines +75 to +76
let core_client =
dash_spv_ffi::dash_spv_ffi_client_new(config.core_config, FFIEventCallbacks::default());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify FFIEventCallbacks struct and its Default implementation in dash_spv_ffi

# Search for FFIEventCallbacks definition and Default impl
rg -n -C5 'struct FFIEventCallbacks' --type rust

# Search for Default implementation
rg -n -C5 'impl.*Default.*for.*FFIEventCallbacks' --type rust

# Search for dash_spv_ffi_client_new function signature
rg -n -C3 'fn dash_spv_ffi_client_new' --type rust

Repository: dashpay/platform

Length of output: 42


🏁 Script executed:

# First, let's examine the file being reviewed
cat -n packages/rs-sdk-ffi/src/unified.rs | head -100

# Check for imports related to FFIEventCallbacks and dash_spv_ffi
rg -n 'FFIEventCallbacks|dash_spv_ffi' packages/rs-sdk-ffi/src/unified.rs

# Look for the struct definition - it might be in a different file
fd -e rs | xargs rg -l 'FFIEventCallbacks' | head -10

# Search for dash_spv_ffi_client_new without type restriction
rg -n 'dash_spv_ffi_client_new' --type-list | head -5
rg -n 'dash_spv_ffi_client_new' 2>/dev/null | head -20

Repository: dashpay/platform

Length of output: 5058


🏁 Script executed:

# Search for FFIEventCallbacks definition in all file types
rg -n 'struct FFIEventCallbacks\|impl.*Default.*FFIEventCallbacks' -i

# Check Cargo.toml for dash_spv_ffi dependency configuration
cat packages/rs-sdk-ffi/Cargo.toml | grep -A5 -B5 'dash_spv_ffi'

# Check for any feature-conditional imports
rg -n '#\[cfg.*core' packages/rs-sdk-ffi/src/unified.rs

# Look for pub use or re-exports of FFIEventCallbacks
rg -n 'pub.*FFIEventCallbacks|use.*FFIEventCallbacks' packages/rs-sdk-ffi/src/

Repository: dashpay/platform

Length of output: 916


🏁 Script executed:

# Read Cargo.toml to see dash_spv_ffi dependency configuration
cat packages/rs-sdk-ffi/Cargo.toml

# Also check if there's a feature definition in Cargo.toml
grep -A20 '\[features\]' packages/rs-sdk-ffi/Cargo.toml

Repository: dashpay/platform

Length of output: 2979


🏁 Script executed:

# Search for "core" feature definition in Cargo.toml files
find . -name "Cargo.toml" -type f | xargs grep -l 'features.*core\|^\[features\]' | head -10

# Check workspace Cargo.toml
cat Cargo.toml 2>/dev/null | grep -A30 '\[features\]' | head -40

# Look for any comments explaining the feature mapping
rg -n 'feature.*core|feature.*dash_spv' packages/rs-sdk-ffi/src/ -B2 -A2

# Check if there are other Cargo.toml files in parent directories
ls -la Cargo.toml

Repository: dashpay/platform

Length of output: 10540


🏁 Script executed:

# Check workspace Cargo.toml for feature definitions
cat Cargo.toml | grep -A50 '\[features\]'

# Check if "core" feature is defined elsewhere
rg -n 'core.*=.*\[' --type toml | grep features

Repository: dashpay/platform

Length of output: 133


🏁 Script executed:

# Get the workspace Cargo.toml features section more carefully
head -150 Cargo.toml | tail -100

# Check if there's a [workspace] section with features
grep -A100 '\[workspace\]' Cargo.toml | head -80

# Search for any definition of "core" feature in workspace or packages
rg 'features.*=.*\[' Cargo.toml | grep core

Repository: dashpay/platform

Length of output: 5900


🏁 Script executed:

# Check if the conditional blocks are actually being compiled
# by looking at what happens when "dash_spv" is disabled
rg -n 'cfg.*dash_spv' packages/rs-sdk-ffi/src/

# Verify what feature gates actually exist in the code
rg -n 'cfg.*feature' packages/rs-sdk-ffi/src/ | grep -E '\bcore\b|\bdash_spv\b'

Repository: dashpay/platform

Length of output: 3427


🏁 Script executed:

# Check if there are any aliases or mappings for "core" feature
rg -n 'core.*=' Cargo.toml

# Try to understand if there's a build script that creates the feature
cat packages/rs-sdk-ffi/build.rs 2>/dev/null || echo "No build.rs found"

# Check the actual compilation to see if it would fail
cd packages/rs-sdk-ffi && cargo metadata 2>&1 | grep -A10 '"features"' | head -20

Repository: dashpay/platform

Length of output: 146


Critical: Feature name mismatch prevents proper resource cleanup.

The code uses #[cfg(feature = "core")] throughout (lines 82-85 and many others), but this feature is never defined in Cargo.toml. The actual feature is dash_spv (enabled by default).

Since the non-existent "core" feature evaluates to false, the cleanup code at lines 82-85 and throughout the file will never execute, causing resource leaks. The unconditional call at lines 75-76 will run, but cleanup won't.

Change #[cfg(feature = "core")] to #[cfg(feature = "dash_spv")] throughout the unified.rs file.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/rs-sdk-ffi/src/unified.rs` around lines 75 - 76, The build uses the
wrong feature flag so conditional blocks (e.g., the cleanup guarded by
#[cfg(feature = "core")]) never run; update every occurrence of #[cfg(feature =
"core")] in unified.rs to #[cfg(feature = "dash_spv")] so the dash_spv-dependent
code (including resource cleanup around dash_spv_ffi_client_new and
FFIEventCallbacks usage) is compiled and the resources are released correctly.

@shumkov shumkov force-pushed the chore/update-dashcore-08ade6e8 branch from babff9a to 1c7490f Compare March 26, 2026 08:19
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 86.20690% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.93%. Comparing base (e398cd7) to head (923a16a).
⚠️ Report is 4 commits behind head on v3.1-dev.

Files with missing lines Patch % Lines
.../src/platform_wallet_info/wallet_info_interface.rs 0.00% 3 Missing ⚠️
...ernode_list/update_state_masternode_list/v0/mod.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           v3.1-dev    #3405      +/-   ##
============================================
- Coverage     79.93%   79.93%   -0.01%     
============================================
  Files          2861     2861              
  Lines        280230   280235       +5     
============================================
+ Hits         223993   223994       +1     
- Misses        56237    56241       +4     
Components Coverage Δ
dpp 71.82% <ø> (ø)
drive 82.30% <ø> (ø)
drive-abci 86.66% <96.15%> (-0.01%) ⬇️
sdk 36.55% <ø> (ø)
dapi-client 79.06% <ø> (ø)
platform-version ∅ <ø> (∅)
platform-value 83.36% <ø> (ø)
platform-wallet 76.32% <0.00%> (-0.23%) ⬇️
drive-proof-verifier 55.26% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shumkov shumkov force-pushed the chore/update-dashcore-08ade6e8 branch from 1c7490f to e96f8be Compare March 26, 2026 09:56
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/rs-sdk-ffi/include/dash_sdk_ffi.h`:
- Around line 14-15: Remove the duplicated system includes in dash_sdk_ffi.h:
the second occurrence of `#include` <stdint.h> and `#include` <stdbool.h> (lines
matching the ones in the diff) should be deleted so each header is included only
once; keep the original includes already present (the first occurrence) and
ensure there are no other accidental duplicate includes in the file.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5c31c502-76ef-46dd-b890-0dab8c25729b

📥 Commits

Reviewing files that changed from the base of the PR and between 1c7490f and e96f8be.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (22)
  • Cargo.toml
  • packages/rs-dpp/Cargo.toml
  • packages/rs-dpp/src/lib.rs
  • packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs
  • packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/mod.rs
  • packages/rs-drive-abci/src/platform_types/masternode/mod.rs
  • packages/rs-drive-abci/src/platform_types/masternode/v0/mod.rs
  • packages/rs-drive-abci/src/platform_types/validator/v0/mod.rs
  • packages/rs-drive-abci/tests/strategy_tests/masternode_list_item_helpers.rs
  • packages/rs-drive-abci/tests/strategy_tests/masternodes.rs
  • packages/rs-platform-wallet/Cargo.toml
  • packages/rs-platform-wallet/README.md
  • packages/rs-platform-wallet/examples/basic_usage.rs
  • packages/rs-platform-wallet/src/lib.rs
  • packages/rs-platform-wallet/src/platform_wallet_info/wallet_info_interface.rs
  • packages/rs-platform-wallet/src/platform_wallet_info/wallet_transaction_checker.rs
  • packages/rs-sdk-ffi/build.rs
  • packages/rs-sdk-ffi/build_ios.sh
  • packages/rs-sdk-ffi/include/dash_sdk_ffi.h
  • packages/rs-sdk-ffi/src/unified.rs
  • packages/rs-sdk/Cargo.toml
💤 Files with no reviewable changes (2)
  • packages/rs-platform-wallet/src/lib.rs
  • packages/rs-dpp/src/lib.rs
✅ Files skipped from review due to trivial changes (5)
  • packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs
  • packages/rs-platform-wallet/README.md
  • packages/rs-platform-wallet/examples/basic_usage.rs
  • packages/rs-platform-wallet/Cargo.toml
  • packages/rs-drive-abci/tests/strategy_tests/masternodes.rs
🚧 Files skipped from review as they are similar to previous changes (9)
  • packages/rs-drive-abci/src/platform_types/validator/v0/mod.rs
  • packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs
  • packages/rs-drive-abci/src/platform_types/masternode/mod.rs
  • packages/rs-drive-abci/tests/strategy_tests/masternode_list_item_helpers.rs
  • packages/rs-platform-wallet/src/platform_wallet_info/wallet_info_interface.rs
  • packages/rs-sdk-ffi/src/unified.rs
  • packages/rs-sdk/Cargo.toml
  • packages/rs-drive-abci/src/platform_types/masternode/v0/mod.rs
  • Cargo.toml

@shumkov shumkov force-pushed the chore/update-dashcore-08ade6e8 branch from e96f8be to 7edd22d Compare March 26, 2026 10:43
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
packages/rs-drive-abci/src/platform_types/masternode/v0/mod.rs (1)

164-166: Consider a more actionable error message.

The current message correctly identifies the problem, but could help operators diagnose the issue faster by mentioning the required Core RPC flag. Per the prior discussion, this occurs when -deprecatedrpc=service is not passed.

💡 Suggested improvement
-        let service = service.ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution(
-            "masternode service address is required but was empty in core RPC response",
-        )))?;
+        let service = service.ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution(
+            "masternode service address is required but was empty in core RPC response; ensure -deprecatedrpc=service is passed to dashd",
+        )))?;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/rs-drive-abci/src/platform_types/masternode/v0/mod.rs` around lines
164 - 166, The error raised when `service` is missing (where code constructs
Error::Execution(ExecutionError::CorruptedCodeExecution(...))) should be made
actionable: update the error string to mention that the Core RPC flag
`-deprecatedrpc=service` may be missing and must be enabled, so operators know
what to pass to Core RPC; locate the `service` unwrapping in mod.rs (the
`service = service.ok_or(...)` line) and replace the current message with one
that includes guidance to set `-deprecatedrpc=service` along with the original
context.
packages/rs-sdk-ffi/build_ios.sh (1)

189-219: Consider logging a warning when header generation fails.

The header generation code continues silently after failure (lines 203-206, 213-215), relying on later fallback patching. While this is likely intentional for resilience, a warning message noting that fallback patching will be attempted would help developers understand the build flow:

💡 Suggested improvement
         if $DASHCORE_CARGO_CMD build --release -p key-wallet-ffi > /tmp/cargo_build_kwffi_host.log 2>&1; then
             echo -e " ${GREEN}done${NC}"
         else
             echo -e " ${RED}failed${NC}"
             cat /tmp/cargo_build_kwffi_host.log
+            echo -e "${YELLOW}  Will use fallback patching if needed${NC}"
         fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/rs-sdk-ffi/build_ios.sh` around lines 189 - 219, When generation of
FFI headers fails in the host build (the branches that build key-wallet-ffi and
dash-spv-ffi using DASHCORE_CARGO_CMD), add an explicit warning log immediately
after the existing failure handling (where it currently echoes failed and cats
the log) that clearly states header generation for KEY_WALLET_HEADER_PATH or
SPV_HEADER_PATH failed and that the script will attempt fallback patching;
update both failure blocks to include this warning message referencing the
failed header variable and the log file (/tmp/cargo_build_kwffi_host.log or
/tmp/cargo_build_spvffi_host.log) so developers see that fallback behavior will
be used.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/rs-sdk-ffi/build_ios.sh`:
- Around line 383-400: The injected fallback in build_ios.sh can produce a
redefinition for FFIDashSpvClient and mismatches the original opaque field;
change the injected block that currently prints "typedef struct FFIDashSpvClient
{ unsigned char _private[0]; } FFIDashSpvClient;" to emit a pure forward
declaration (e.g., "typedef struct FFIDashSpvClient FFIDashSpvClient;" or
"struct FFIDashSpvClient; typedef struct FFIDashSpvClient FFIDashSpvClient;")
instead, so locate the awk rule in the script that matches '#include
"dash_spv_ffi.h"' and replace the full typedef lines with the
forward-declaration lines for FFIDashSpvClient (and remove or avoid introducing
any differing opaque field names like _private) to prevent redefinition and
type-name mismatches in dash_sdk_ffi.h.

---

Nitpick comments:
In `@packages/rs-drive-abci/src/platform_types/masternode/v0/mod.rs`:
- Around line 164-166: The error raised when `service` is missing (where code
constructs Error::Execution(ExecutionError::CorruptedCodeExecution(...))) should
be made actionable: update the error string to mention that the Core RPC flag
`-deprecatedrpc=service` may be missing and must be enabled, so operators know
what to pass to Core RPC; locate the `service` unwrapping in mod.rs (the
`service = service.ok_or(...)` line) and replace the current message with one
that includes guidance to set `-deprecatedrpc=service` along with the original
context.

In `@packages/rs-sdk-ffi/build_ios.sh`:
- Around line 189-219: When generation of FFI headers fails in the host build
(the branches that build key-wallet-ffi and dash-spv-ffi using
DASHCORE_CARGO_CMD), add an explicit warning log immediately after the existing
failure handling (where it currently echoes failed and cats the log) that
clearly states header generation for KEY_WALLET_HEADER_PATH or SPV_HEADER_PATH
failed and that the script will attempt fallback patching; update both failure
blocks to include this warning message referencing the failed header variable
and the log file (/tmp/cargo_build_kwffi_host.log or
/tmp/cargo_build_spvffi_host.log) so developers see that fallback behavior will
be used.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 832371a3-ca2b-4368-bcf0-01c43c4fe2de

📥 Commits

Reviewing files that changed from the base of the PR and between e96f8be and 7edd22d.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (22)
  • Cargo.toml
  • packages/rs-dpp/Cargo.toml
  • packages/rs-dpp/src/lib.rs
  • packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs
  • packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/mod.rs
  • packages/rs-drive-abci/src/platform_types/masternode/mod.rs
  • packages/rs-drive-abci/src/platform_types/masternode/v0/mod.rs
  • packages/rs-drive-abci/src/platform_types/validator/v0/mod.rs
  • packages/rs-drive-abci/tests/strategy_tests/masternode_list_item_helpers.rs
  • packages/rs-drive-abci/tests/strategy_tests/masternodes.rs
  • packages/rs-platform-wallet/Cargo.toml
  • packages/rs-platform-wallet/README.md
  • packages/rs-platform-wallet/examples/basic_usage.rs
  • packages/rs-platform-wallet/src/lib.rs
  • packages/rs-platform-wallet/src/platform_wallet_info/wallet_info_interface.rs
  • packages/rs-platform-wallet/src/platform_wallet_info/wallet_transaction_checker.rs
  • packages/rs-sdk-ffi/build.rs
  • packages/rs-sdk-ffi/build_ios.sh
  • packages/rs-sdk-ffi/include/dash_sdk_ffi.h
  • packages/rs-sdk-ffi/src/unified.rs
  • packages/rs-sdk/Cargo.toml
💤 Files with no reviewable changes (2)
  • packages/rs-dpp/src/lib.rs
  • packages/rs-platform-wallet/src/lib.rs
✅ Files skipped from review due to trivial changes (4)
  • packages/rs-platform-wallet/README.md
  • packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/mod.rs
  • packages/rs-sdk-ffi/src/unified.rs
  • packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs
🚧 Files skipped from review as they are similar to previous changes (10)
  • packages/rs-drive-abci/src/platform_types/masternode/mod.rs
  • packages/rs-platform-wallet/examples/basic_usage.rs
  • packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs
  • packages/rs-platform-wallet/src/platform_wallet_info/wallet_info_interface.rs
  • packages/rs-drive-abci/tests/strategy_tests/masternodes.rs
  • packages/rs-drive-abci/tests/strategy_tests/masternode_list_item_helpers.rs
  • packages/rs-sdk/Cargo.toml
  • Cargo.toml
  • packages/rs-drive-abci/src/platform_types/validator/v0/mod.rs
  • packages/rs-sdk-ffi/build.rs

@shumkov shumkov force-pushed the chore/update-dashcore-08ade6e8 branch from 7edd22d to 923a16a Compare March 26, 2026 11:13
@shumkov shumkov changed the title chore: update dashcore deps chore: update dashcore deps to 08ade6e8 (crate merge + mempool + EventHandler) Mar 26, 2026
@shumkov shumkov changed the title chore: update dashcore deps to 08ade6e8 (crate merge + mempool + EventHandler) chore: update dashcore deps to 08ade6e8 Mar 26, 2026
@shumkov
Copy link
Copy Markdown
Collaborator Author

shumkov commented Mar 26, 2026

Superseded by #3408 which is based on the latest v3.1-dev.

@shumkov shumkov closed this Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant