-
Notifications
You must be signed in to change notification settings - Fork 44
feat(sdk): epic: rs-sdk-ffi and ios support #2756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…OS SDK FFI - Add ios_sdk_data_contract_put_to_platform for broadcasting data contract state transitions - Add ios_sdk_data_contract_put_to_platform_and_wait for confirmed data contract operations - Update document put methods to use consistent return types with identity methods - Broadcast methods now return serialized state transition data as binary - Wait methods now return proper handle types with IOSSDKResultDataType 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Split identity.rs into mod.rs with organized submodules - Created queries/ submodule with individual files for each query operation - Organized functions into logical modules: - helpers.rs: utility functions and converters - create.rs: identity creation - topup.rs: top-up operations - put.rs: put-to-platform operations - transfer.rs: credit transfer operations - withdraw.rs: withdrawal operations - info.rs: identity info and lifecycle - names.rs: name registration - queries/: all query operations split into separate files 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/rs-platform-version/Cargo.toml (1)
14-14
: Centralize Grovedb rev in workspace.dependencies
All grovedb pins across crates match (435f4d1805cbc01f9e38dde65975404a05d153db
); root Cargo.toml lacks[workspace.dependencies]
. To avoid duplication, add:[workspace.dependencies] grovedb-version = { git = "https://github.com/dashpay/grovedb", rev = "435f4d1805cbc01f9e38dde65975404a05d153db" }and update each crate’s grovedb-version to
workspace = true
.packages/rs-drive/Cargo.toml (1)
55-60
: Centralize grovedb git pins via workspace dependencies
Move the repeatedgit/rev
definitions for allgrovedb*
crates into a[workspace.dependencies]
section in the rootCargo.toml
and reference them in each package’sCargo.toml
withworkspace = true
to maintain a single source of truth.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/rs-drive/Cargo.toml
(2 hunks)packages/rs-platform-version/Cargo.toml
(1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: lklimek
PR: dashpay/platform#2254
File: packages/rs-sdk/src/sdk.rs:585-585
Timestamp: 2024-10-18T15:39:51.172Z
Learning: The 'platform' project uses Rust version 1.80, so code in 'packages/rs-sdk' can use features available in Rust 1.80, such as the `abs_diff()` method.
Learnt from: QuantumExplorer
PR: dashpay/platform#2756
File: packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs:11-11
Timestamp: 2025-09-03T16:37:11.605Z
Learning: In packages/rs-dpp/Cargo.toml, the abci feature already includes core_rpc_client, and core_rpc_client is defined as ["dep:dashcore-rpc"]. This means rs-drive-abci can access dashcore-rpc types through dpp when using the abci feature.
Learnt from: CR
PR: dashpay/platform#0
File: packages/wasm-sdk/CLAUDE.md:0-0
Timestamp: 2025-07-23T08:31:42.268Z
Learning: Applies to packages/wasm-sdk/src/**/*.rs : For WASM builds, fix 'time not implemented on this platform' errors by using js_sys::Date::now().
Learnt from: QuantumExplorer
PR: dashpay/platform#2257
File: packages/rs-drive-abci/src/mimic/test_quorum.rs:159-164
Timestamp: 2024-11-20T16:16:01.830Z
Learning: QuantumExplorer prefers not to receive auto-generated messages asking to post on social media.
📚 Learning: 2025-01-19T07:36:46.042Z
Learnt from: QuantumExplorer
PR: dashpay/platform#2431
File: packages/rs-drive/Cargo.toml:55-60
Timestamp: 2025-01-19T07:36:46.042Z
Learning: The grovedb dependencies in packages/rs-drive/Cargo.toml and related files are intentionally kept at specific revisions rather than using the latest stable version, with plans to update them at a later time.
Applied to files:
packages/rs-platform-version/Cargo.toml
packages/rs-drive/Cargo.toml
📚 Learning: 2025-03-11T09:39:23.071Z
Learnt from: shumkov
PR: dashpay/platform#2489
File: packages/rs-dpp/Cargo.toml:32-32
Timestamp: 2025-03-11T09:39:23.071Z
Learning: In the Dash Platform project, dependencies are currently managed using Git repository references with tags (repo+tag format in Cargo.toml) rather than published crates, as the team is not currently publishing crates to crates.io.
Applied to files:
packages/rs-platform-version/Cargo.toml
📚 Learning: 2024-10-18T15:39:51.172Z
Learnt from: lklimek
PR: dashpay/platform#2254
File: packages/rs-sdk/src/sdk.rs:585-585
Timestamp: 2024-10-18T15:39:51.172Z
Learning: The 'platform' project uses Rust version 1.80, so code in 'packages/rs-sdk' can use features available in Rust 1.80, such as the `abs_diff()` method.
Applied to files:
packages/rs-platform-version/Cargo.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (167)
- GitHub Check: Rust packages (rs-sdk-ffi) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (drive-abci) / Formatting
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Formatting
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (drive) / Unused dependencies
- GitHub Check: Rust packages (drive) / Formatting
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Rust packages (rs-sdk-ffi) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (drive-abci) / Formatting
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Formatting
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (drive) / Unused dependencies
- GitHub Check: Rust packages (drive) / Formatting
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Rust packages (rs-sdk-ffi) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (drive-abci) / Formatting
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (drive) / Unused dependencies
- GitHub Check: Rust packages (drive) / Formatting
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Rust packages (rs-sdk-ffi) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Detect immutable structure changes
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (drive-abci) / Formatting
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (drive) / Unused dependencies
- GitHub Check: Rust packages (drive) / Formatting
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Rust packages (rs-sdk-ffi) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Detect immutable structure changes
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (drive-abci) / Formatting
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (drive) / Unused dependencies
- GitHub Check: Rust packages (drive) / Formatting
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Rust packages (rs-sdk-ffi) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Detect immutable structure changes
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (drive-abci) / Formatting
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (drive) / Unused dependencies
- GitHub Check: Rust packages (drive) / Formatting
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Rust packages (rs-sdk-ffi) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Detect immutable structure changes
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (drive-abci) / Formatting
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (drive) / Unused dependencies
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Rust packages (rs-sdk-ffi) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Detect immutable structure changes
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (drive-abci) / Formatting
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (drive) / Unused dependencies
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Rust packages (rs-sdk-ffi) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Detect immutable structure changes
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (drive-abci) / Formatting
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (drive) / Unused dependencies
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Rust packages (rs-sdk-ffi) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Detect immutable structure changes
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (drive-abci) / Formatting
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (drive) / Unused dependencies
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Build JS packages / Build JS
🔇 Additional comments (1)
packages/rs-drive/Cargo.toml (1)
33-33
: Tracing bump LGTM.Semver-compatible within 0.1; keeping default-features = false preserves prior behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
packages/rs-drive-proof-verifier/Cargo.toml (3)
37-39
: Pin to git rev looks OK; ensure workspace-wide consistency and feature compatibility.
- Confirm all crates use the same
tenderdash-abci
source/rev and that thecrypto
feature still exists at this commit.- Consider adding a short comment with the reason/date for the rev pin to aid future bumps.
#!/bin/bash # Show all tenderdash-abci dependency declarations across the workspace with context rg -nC2 'tenderdash-abci\s*=\s*{[^}]*}' --glob '**/Cargo.toml'
40-40
: tracing 0.1.41: beware of feature unification across the workspace.
drive
setsdefault-features = false
fortracing
, but here defaults are on. Cargo features are unified; defaults enabled here will effectively enable defaults for all dependents. If the intent is to keep defaults off globally, align this todefault-features = false
.Apply if you want consistent no-defaults:
-tracing = { version = "0.1.41" } +tracing = { version = "0.1.41", default-features = false }#!/bin/bash # Audit all tracing deps to see which enable default features rg -nC2 'tracing\s*=\s*{[^}]*}' --glob '**/Cargo.toml'
44-45
: Indexmap version drift across crates can cause duplicate builds.This crate uses
indexmap = 2.6.0
whiledrive
uses2.0.2
. Not wrong, but it can produce two versions in the build graph. Consider aligning to a single2.x
version (e.g., bumpdrive
to2.6.x
) when convenient.#!/bin/bash # Show all indexmap versions declared across the workspace rg -n 'indexmap\s*=\s*{?\s*version\s*=\s*"[^"]+"' --glob '**/Cargo.toml' -n -C1packages/rs-drive/Cargo.toml (1)
33-33
: tracing bump aligns versions; confirm desired features remain off.You’ve kept
default-features = false
here while another crate enables defaults. If you want a consistent configuration, consider centralizingtracing
in[workspace.dependencies]
with explicit features, or align all crates todefault-features = false
.#!/bin/bash # Inspect all tracing dependency declarations to ensure consistency rg -nC2 '^\s*tracing\s*=\s*{[^}]*}' --glob '**/Cargo.toml'
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lock
is excluded by!**/*.lock
📒 Files selected for processing (8)
packages/dapi-grpc/Cargo.toml
(2 hunks)packages/dapi-grpc/build.rs
(2 hunks)packages/rs-dapi-client/Cargo.toml
(2 hunks)packages/rs-drive-abci/Cargo.toml
(2 hunks)packages/rs-drive-proof-verifier/Cargo.toml
(1 hunks)packages/rs-drive/Cargo.toml
(2 hunks)packages/rs-platform-version/Cargo.toml
(1 hunks)packages/rs-sdk-ffi/Cargo.toml
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
- packages/rs-dapi-client/Cargo.toml
- packages/rs-platform-version/Cargo.toml
- packages/rs-sdk-ffi/Cargo.toml
- packages/rs-drive-abci/Cargo.toml
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: lklimek
PR: dashpay/platform#2254
File: packages/rs-sdk/src/sdk.rs:585-585
Timestamp: 2024-10-18T15:39:51.172Z
Learning: The 'platform' project uses Rust version 1.80, so code in 'packages/rs-sdk' can use features available in Rust 1.80, such as the `abs_diff()` method.
Learnt from: CR
PR: dashpay/platform#0
File: packages/wasm-sdk/CLAUDE.md:0-0
Timestamp: 2025-07-23T08:31:42.268Z
Learning: Applies to packages/wasm-sdk/src/**/*.rs : For WASM builds, fix 'time not implemented on this platform' errors by using js_sys::Date::now().
Learnt from: QuantumExplorer
PR: dashpay/platform#2257
File: packages/rs-drive-abci/src/mimic/test_quorum.rs:159-164
Timestamp: 2024-11-20T16:16:01.830Z
Learning: QuantumExplorer prefers not to receive auto-generated messages asking to post on social media.
📚 Learning: 2025-01-19T07:36:46.042Z
Learnt from: QuantumExplorer
PR: dashpay/platform#2431
File: packages/rs-drive/Cargo.toml:55-60
Timestamp: 2025-01-19T07:36:46.042Z
Learning: The grovedb dependencies in packages/rs-drive/Cargo.toml and related files are intentionally kept at specific revisions rather than using the latest stable version, with plans to update them at a later time.
Applied to files:
packages/dapi-grpc/Cargo.toml
packages/rs-drive-proof-verifier/Cargo.toml
packages/rs-drive/Cargo.toml
📚 Learning: 2025-09-03T16:37:11.605Z
Learnt from: QuantumExplorer
PR: dashpay/platform#2756
File: packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs:11-11
Timestamp: 2025-09-03T16:37:11.605Z
Learning: In packages/rs-dpp/Cargo.toml, the abci feature already includes core_rpc_client, and core_rpc_client is defined as ["dep:dashcore-rpc"]. This means rs-drive-abci can access dashcore-rpc types through dpp when using the abci feature.
Applied to files:
packages/dapi-grpc/Cargo.toml
packages/rs-drive-proof-verifier/Cargo.toml
📚 Learning: 2024-10-09T00:22:57.778Z
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-drive-abci/tests/strategy_tests/main.rs:1162-1162
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In the Rust test file `packages/rs-drive-abci/tests/strategy_tests/main.rs`, specific protocol versions like `PROTOCOL_VERSION_1` are intentionally used in tests instead of `PROTOCOL_VERSION_LATEST`.
Applied to files:
packages/dapi-grpc/Cargo.toml
📚 Learning: 2024-12-05T09:29:38.918Z
Learnt from: shumkov
PR: dashpay/platform#2375
File: packages/rs-drive-abci/Cargo.toml:61-63
Timestamp: 2024-12-05T09:29:38.918Z
Learning: In the `drive-abci` package, avoid adding unused dependencies like `hashbrown` to `Cargo.toml`. The team relies on CI to detect dependency version issues.
Applied to files:
packages/rs-drive-proof-verifier/Cargo.toml
📚 Learning: 2024-10-18T15:39:51.172Z
Learnt from: lklimek
PR: dashpay/platform#2254
File: packages/rs-sdk/src/sdk.rs:585-585
Timestamp: 2024-10-18T15:39:51.172Z
Learning: The 'platform' project uses Rust version 1.80, so code in 'packages/rs-sdk' can use features available in Rust 1.80, such as the `abs_diff()` method.
Applied to files:
packages/rs-drive-proof-verifier/Cargo.toml
📚 Learning: 2025-03-11T09:39:23.071Z
Learnt from: shumkov
PR: dashpay/platform#2489
File: packages/rs-dpp/Cargo.toml:32-32
Timestamp: 2025-03-11T09:39:23.071Z
Learning: In the Dash Platform project, dependencies are currently managed using Git repository references with tags (repo+tag format in Cargo.toml) rather than published crates, as the team is not currently publishing crates to crates.io.
Applied to files:
packages/rs-drive-proof-verifier/Cargo.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (179)
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Linting
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Rust packages (dpns-contract) / Tests
- GitHub Check: Rust packages (dpns-contract) / Unused dependencies
- GitHub Check: Rust packages (dpns-contract) / Linting
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Linting
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Rust packages (dpns-contract) / Tests
- GitHub Check: Rust packages (dpns-contract) / Unused dependencies
- GitHub Check: Rust packages (dpns-contract) / Linting
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Linting
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Rust packages (dpns-contract) / Tests
- GitHub Check: Rust packages (dpns-contract) / Unused dependencies
- GitHub Check: Rust packages (dpns-contract) / Linting
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Linting
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Rust packages (dpns-contract) / Tests
- GitHub Check: Rust packages (dpns-contract) / Unused dependencies
- GitHub Check: Rust packages (dpns-contract) / Linting
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Linting
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Rust packages (dpns-contract) / Tests
- GitHub Check: Rust packages (dpns-contract) / Unused dependencies
- GitHub Check: Rust packages (dpns-contract) / Linting
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Linting
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Rust packages (dpns-contract) / Tests
- GitHub Check: Rust packages (dpns-contract) / Unused dependencies
- GitHub Check: Rust packages (dpns-contract) / Linting
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Linting
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Rust packages (dpns-contract) / Tests
- GitHub Check: Rust packages (dpns-contract) / Unused dependencies
- GitHub Check: Rust packages (dpns-contract) / Linting
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Linting
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Rust packages (dpns-contract) / Unused dependencies
- GitHub Check: Rust packages (dpns-contract) / Linting
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Formatting
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Linting
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Rust packages (dpns-contract) / Unused dependencies
- GitHub Check: Rust packages (dpns-contract) / Linting
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Formatting
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Linting
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Rust packages (dpns-contract) / Unused dependencies
- GitHub Check: Rust packages (dpns-contract) / Linting
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
🔇 Additional comments (5)
packages/rs-drive/Cargo.toml (1)
55-60
: Grovedb crates pinned to a single commit rev — good; verify workspace-wide consistency.This matches the team practice of pinning Grovedb to specific revisions. Ensure all workspace members that depend on any
grovedb*
crate use the samegit
URL andrev
to avoid duplicate versions.#!/bin/bash # Enumerate all grovedb-related deps and revs across the workspace rg -nC1 'grovedb([-a-z]*)?\s*=\s*{[^}]*git\s*=\s*"https://github.com/dashpay/grovedb"[^}]*}' --glob '**/Cargo.toml'packages/dapi-grpc/Cargo.toml (2)
44-44
: LGTM! Coordinated upgrade to tonic/prost 0.14 ecosystem.The dependency updates are well-coordinated:
prost
updated from 0.13 to 0.14tonic
updated from 0.13.0 to 0.14.2 for both wasm32 and non-wasm32 targetstonic-prost
introduced as a new dependency (0.14.2)tonic-prost-build
replacestonic-build
in build dependencies- The "prost" feature is correctly removed from tonic since it's now provided by the separate
tonic-prost
crateThis aligns with the tonic 0.14 ecosystem changes where prost integration was separated into its own crate.
Also applies to: 51-51, 54-55, 60-61, 70-70
42-42
: Verify the commit hash for tenderdash-proto dependency.The dependency has been updated from a tag-based reference to a specific commit hash. Please ensure this commit exists and is accessible in the repository.
#!/bin/bash # Description: Verify the commit hash exists in the tenderdash-proto repository. # Test: Check if the commit hash is valid and accessible git ls-remote https://github.com/dashpay/rs-tenderdash-abci | grep "9e3bcdc457ff5cbbd93be2fce510403d033c712b"packages/dapi-grpc/build.rs (2)
7-7
: LGTM! Updated import aligns with Cargo.toml changes.The import change from
tonic_build::Builder
totonic_prost_build::Builder
correctly reflects the build dependency update in Cargo.toml.
340-340
: LGTM! Updated configuration call matches new builder.The change from
tonic_build::configure()
totonic_prost_build::configure()
is consistent with the import update and the new build tooling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/dapi-grpc/build.rs (1)
384-395
: Return type may be too narrow for compile_protos errors.
compile_protos
typically returns a non-io error (e.g., prost/tonic build errors). Widen the return type to avoid lossy conversions and keep this future-proof.- fn generate(self) -> Result<(), std::io::Error> { + fn generate(self) -> Result<(), Box<dyn std::error::Error>> { @@ - self.builder - .compile_protos(&[self.protobuf_file], &self.proto_includes) + self.builder + .compile_protos(&[self.protobuf_file], &self.proto_includes)?; + Ok(()) }
♻️ Duplicate comments (3)
packages/rs-sdk-ffi/Cargo.toml (3)
55-61
: Move [profile.release] to workspace root; current settings are ignored.Cargo ignores profiles in member crates. The iOS-critical
panic = "abort"
isn’t applied. CI already warned about this.Apply this diff here:
-[profile.release] -lto = "fat" # Enable cross-crate optimization -codegen-units = 1 # Single codegen unit for better optimization -strip = "symbols" # Strip debug symbols for smaller size -opt-level = "z" # Optimize for size -panic = "abort" # Required for iOSThen, in the workspace root Cargo.toml add:
[profile.release.package.rs-sdk-ffi] lto = "fat" codegen-units = 1 strip = "symbols" opt-level = "z" panic = "abort"
49-51
: Make reqwest optional and avoid native roots for iOS.Don’t pull TLS stack by default and avoid
rustls-tls-native-roots
on iOS. Gate diagnostics HTTP behind a feature.-reqwest = { version = "0.12", features = ["json", "rustls-tls-native-roots"] } +reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"], optional = true }
72-75
: Add feature gate for HTTP diagnostics (opt-in).Expose an off-by-default feature to compile reqwest-backed code only when needed.
[features] -default = ["dash_spv"] +default = ["dash_spv"] +diagnostics-http = ["reqwest"]Note: Wrap any reqwest usages with
#[cfg(feature = "diagnostics-http")]
and provide no-op stubs for the inverse cfg.
🧹 Nitpick comments (5)
packages/rs-sdk-ffi/Cargo.toml (2)
18-21
: Ensure dash-spv and ffi_core_stubs are mutually exclusive at compile time.Prevent accidental co-enabling with a guard (build.rs or a tiny cfg module) that emits
compile_error!
if both are set.Example (lib.rs):
#[cfg(all(feature = "dash_spv", feature = "ffi_core_stubs"))] compile_error!("Features `dash_spv` and `ffi_core_stubs` are mutually exclusive");
25-25
: RC dependency in FFI surface.
bincode = "=2.0.0-rc.3"
is a pre-release. Consider pinning a stable once available to avoid wire-format churn.Would you like a follow-up PR to evaluate 2.0.0 final (if released) against existing test vectors?
packages/dapi-grpc/build.rs (1)
386-391
: Comment contradicts behavior.The comment says “ignore errors” but errors are propagated with
?
. Tweak the comment for clarity.- // Remove old compiled files; ignore errors + // Remove old compiled files; errors are propagatedpackages/dapi-grpc/Cargo.toml (2)
54-57
: WASM target uses only “codegen”: confirm runtime story.If you plan to actually call DAPI from WASM, you’ll likely need a transport such as gRPC-web (e.g., via
tonic-web
) bridged on the client side. If the intent is stubs-only, this is fine—otherwise consider documenting/adding the appropriate transport.
60-67
: Both tls-native-roots and tls-webpki-roots enabled; consider gating to one.Carrying both increases binary size and may surprise downstreams. Consider feature-gating root selection (native vs webpki) and enabling one by default.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lock
is excluded by!**/*.lock
📒 Files selected for processing (8)
packages/dapi-grpc/Cargo.toml
(2 hunks)packages/dapi-grpc/build.rs
(2 hunks)packages/rs-dapi-client/Cargo.toml
(2 hunks)packages/rs-drive-abci/Cargo.toml
(2 hunks)packages/rs-drive-proof-verifier/Cargo.toml
(1 hunks)packages/rs-drive/Cargo.toml
(2 hunks)packages/rs-platform-version/Cargo.toml
(1 hunks)packages/rs-sdk-ffi/Cargo.toml
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
- packages/rs-platform-version/Cargo.toml
- packages/rs-drive-proof-verifier/Cargo.toml
- packages/rs-dapi-client/Cargo.toml
- packages/rs-drive-abci/Cargo.toml
- packages/rs-drive/Cargo.toml
🧰 Additional context used
🧠 Learnings (9)
📓 Common learnings
Learnt from: QuantumExplorer
PR: dashpay/platform#2756
File: packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs:11-11
Timestamp: 2025-09-03T16:37:11.605Z
Learning: In packages/rs-dpp/Cargo.toml, the abci feature already includes core_rpc_client, and core_rpc_client is defined as ["dep:dashcore-rpc"]. This means rs-drive-abci can access dashcore-rpc types through dpp when using the abci feature.
Learnt from: lklimek
PR: dashpay/platform#2254
File: packages/rs-sdk/src/sdk.rs:585-585
Timestamp: 2024-10-18T15:39:51.172Z
Learning: The 'platform' project uses Rust version 1.80, so code in 'packages/rs-sdk' can use features available in Rust 1.80, such as the `abs_diff()` method.
Learnt from: QuantumExplorer
PR: dashpay/platform#2257
File: packages/rs-drive-abci/src/mimic/test_quorum.rs:159-164
Timestamp: 2024-11-20T16:16:01.830Z
Learning: QuantumExplorer prefers not to receive auto-generated messages asking to post on social media.
📚 Learning: 2024-10-10T10:30:19.883Z
Learnt from: lklimek
PR: dashpay/platform#2232
File: packages/rs-sdk/src/mock/sdk.rs:90-95
Timestamp: 2024-10-10T10:30:19.883Z
Learning: In `packages/rs-sdk/src/mock/sdk.rs`, the `load_expectations` method in `MockDashPlatformSdk` remains asynchronous (`async`) for backward compatibility, even though it now delegates to the synchronous `load_expectations_sync` method.
Applied to files:
packages/rs-sdk-ffi/Cargo.toml
📚 Learning: 2024-10-29T14:44:01.184Z
Learnt from: lklimek
PR: dashpay/platform#2277
File: packages/rs-dapi-client/src/executor.rs:38-38
Timestamp: 2024-10-29T14:44:01.184Z
Learning: In `packages/rs-dapi-client/src/executor.rs`, for the structs `ExecutionError<E>` and `ExecutionResponse<R>`, only the serde derives (`Serialize`, `Deserialize`) should be conditional based on the "mocks" feature; the other derives (`Debug`, `Clone`, `Eq`, `PartialEq`) should always be present.
Applied to files:
packages/rs-sdk-ffi/Cargo.toml
📚 Learning: 2024-10-18T15:37:21.329Z
Learnt from: shumkov
PR: dashpay/platform#2249
File: packages/dashmate/test/unit/status/scopes/platform.spec.js:466-467
Timestamp: 2024-10-18T15:37:21.329Z
Learning: In test files for the dashmate project, such as `packages/dashmate/test/unit/status/scopes/platform.spec.js`, prefer to keep mocks explicitly in tests rather than consolidating them, to increase readability.
Applied to files:
packages/rs-sdk-ffi/Cargo.toml
📚 Learning: 2025-09-03T16:37:11.605Z
Learnt from: QuantumExplorer
PR: dashpay/platform#2756
File: packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs:11-11
Timestamp: 2025-09-03T16:37:11.605Z
Learning: In packages/rs-dpp/Cargo.toml, the abci feature already includes core_rpc_client, and core_rpc_client is defined as ["dep:dashcore-rpc"]. This means rs-drive-abci can access dashcore-rpc types through dpp when using the abci feature.
Applied to files:
packages/rs-sdk-ffi/Cargo.toml
packages/dapi-grpc/Cargo.toml
📚 Learning: 2025-07-23T08:31:42.268Z
Learnt from: CR
PR: dashpay/platform#0
File: packages/wasm-sdk/CLAUDE.md:0-0
Timestamp: 2025-07-23T08:31:42.268Z
Learning: Applies to packages/wasm-sdk/src/**/*.rs : When implementing WASM SDK functionality, always refer to AI_REFERENCE.md first for accurate method signatures and examples.
Applied to files:
packages/rs-sdk-ffi/Cargo.toml
📚 Learning: 2024-10-18T15:39:51.172Z
Learnt from: lklimek
PR: dashpay/platform#2254
File: packages/rs-sdk/src/sdk.rs:585-585
Timestamp: 2024-10-18T15:39:51.172Z
Learning: The 'platform' project uses Rust version 1.80, so code in 'packages/rs-sdk' can use features available in Rust 1.80, such as the `abs_diff()` method.
Applied to files:
packages/rs-sdk-ffi/Cargo.toml
📚 Learning: 2025-01-19T07:36:46.042Z
Learnt from: QuantumExplorer
PR: dashpay/platform#2431
File: packages/rs-drive/Cargo.toml:55-60
Timestamp: 2025-01-19T07:36:46.042Z
Learning: The grovedb dependencies in packages/rs-drive/Cargo.toml and related files are intentionally kept at specific revisions rather than using the latest stable version, with plans to update them at a later time.
Applied to files:
packages/dapi-grpc/Cargo.toml
📚 Learning: 2024-10-09T00:22:57.778Z
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-drive-abci/tests/strategy_tests/main.rs:1162-1162
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In the Rust test file `packages/rs-drive-abci/tests/strategy_tests/main.rs`, specific protocol versions like `PROTOCOL_VERSION_1` are intentionally used in tests instead of `PROTOCOL_VERSION_LATEST`.
Applied to files:
packages/dapi-grpc/Cargo.toml
🪛 GitHub Actions: Test rs-sdk-ffi build
packages/rs-sdk-ffi/Cargo.toml
[warning] 1-1: Profiles for the non-root package will be ignored. Specify profiles at the workspace root.
🔇 Additional comments (5)
packages/rs-sdk-ffi/Cargo.toml (1)
78-80
: Mocks gating looks good.Mocks are no longer enabled unconditionally and can be opted-in via features. ✔
packages/dapi-grpc/build.rs (1)
7-7
: Switch to tonic-prost-build: confirm API parity across builder methods.Looks good, but please ensure
tonic_prost_build::Builder
supports all used calls (type_attribute
,field_attribute
,enum_attribute
,message_attribute
,build_client/server/transport
) exactly as before. A quick feature-matrix check across targets will catch any drift.#!/bin/bash set -euo pipefail # Server build (native) cargo check -p dapi-grpc --features server # Client-only (native) cargo check -p dapi-grpc --features client # Client stubs for WASM (no transport) cargo check -p dapi-grpc --target wasm32-unknown-unknown --features clientpackages/dapi-grpc/Cargo.toml (3)
42-42
: Pinning tenderdash-proto to a commit for reproducibility is fine.LGTM as-is.
70-70
: Build tooling alignment looks good.
tonic-prost-build = 0.14.2
matches the runtime stack; no issues.
44-51
: Prost/tonic-prost upgrade: ensure single prost across the workspace.Mixed prost (e.g., 0.13 and 0.14) will cause trait bound mismatches on
prost::Message
. Verify there’s only one prost version pulled in.#!/bin/bash # Expect a single line/version for prost cargo tree -e normal -i prost # If multiple, inspect who pulls older prost: cargo tree -i prost -p dapi-grpc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/rs-drive-proof-verifier/Cargo.toml (1)
40-40
: Align tracing-subscriber versions across the workspaceAll crates already pin
tracing = "0.1.41"
. However,
packages/rs-sdk/Cargo.toml
usestracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
(line 57)packages/rs-drive-abci/Cargo.toml
usestracing-subscriber = { version = "0.3.16", default-features = false, … }
(line 45)Recommend upgrading
rs-drive-abci
to0.3.18
(or aligning both to a single version) and consider hoisting to[workspace.dependencies]
for uniformity.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (4)
.yarn/cache/cipher-base-npm-1.0.6-0330d4a7a3-faf232deff.zip
is excluded by!**/.yarn/**
,!**/*.zip
.yarn/cache/sha.js-npm-2.4.12-bc0424125d-39c0993592.zip
is excluded by!**/.yarn/**
,!**/*.zip
.yarn/cache/tmp-npm-0.2.5-e146296d91-dd4b78b323.zip
is excluded by!**/.yarn/**
,!**/*.zip
Cargo.lock
is excluded by!**/*.lock
📒 Files selected for processing (3)
packages/dapi-grpc/Cargo.toml
(2 hunks)packages/rs-drive-abci/Cargo.toml
(4 hunks)packages/rs-drive-proof-verifier/Cargo.toml
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- packages/rs-drive-abci/Cargo.toml
- packages/dapi-grpc/Cargo.toml
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: QuantumExplorer
PR: dashpay/platform#2756
File: packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs:11-11
Timestamp: 2025-09-03T16:37:11.605Z
Learning: In packages/rs-dpp/Cargo.toml, the abci feature already includes core_rpc_client, and core_rpc_client is defined as ["dep:dashcore-rpc"]. This means rs-drive-abci can access dashcore-rpc types through dpp when using the abci feature.
Learnt from: lklimek
PR: dashpay/platform#2254
File: packages/rs-sdk/src/sdk.rs:585-585
Timestamp: 2024-10-18T15:39:51.172Z
Learning: The 'platform' project uses Rust version 1.80, so code in 'packages/rs-sdk' can use features available in Rust 1.80, such as the `abs_diff()` method.
Learnt from: QuantumExplorer
PR: dashpay/platform#2257
File: packages/rs-drive-abci/src/mimic/test_quorum.rs:159-164
Timestamp: 2024-11-20T16:16:01.830Z
Learning: QuantumExplorer prefers not to receive auto-generated messages asking to post on social media.
📚 Learning: 2024-12-05T09:29:38.918Z
Learnt from: shumkov
PR: dashpay/platform#2375
File: packages/rs-drive-abci/Cargo.toml:61-63
Timestamp: 2024-12-05T09:29:38.918Z
Learning: In the `drive-abci` package, avoid adding unused dependencies like `hashbrown` to `Cargo.toml`. The team relies on CI to detect dependency version issues.
Applied to files:
packages/rs-drive-proof-verifier/Cargo.toml
📚 Learning: 2025-01-19T07:36:46.042Z
Learnt from: QuantumExplorer
PR: dashpay/platform#2431
File: packages/rs-drive/Cargo.toml:55-60
Timestamp: 2025-01-19T07:36:46.042Z
Learning: The grovedb dependencies in packages/rs-drive/Cargo.toml and related files are intentionally kept at specific revisions rather than using the latest stable version, with plans to update them at a later time.
Applied to files:
packages/rs-drive-proof-verifier/Cargo.toml
📚 Learning: 2025-09-03T16:37:11.605Z
Learnt from: QuantumExplorer
PR: dashpay/platform#2756
File: packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs:11-11
Timestamp: 2025-09-03T16:37:11.605Z
Learning: In packages/rs-dpp/Cargo.toml, the abci feature already includes core_rpc_client, and core_rpc_client is defined as ["dep:dashcore-rpc"]. This means rs-drive-abci can access dashcore-rpc types through dpp when using the abci feature.
Applied to files:
packages/rs-drive-proof-verifier/Cargo.toml
📚 Learning: 2024-10-18T15:39:51.172Z
Learnt from: lklimek
PR: dashpay/platform#2254
File: packages/rs-sdk/src/sdk.rs:585-585
Timestamp: 2024-10-18T15:39:51.172Z
Learning: The 'platform' project uses Rust version 1.80, so code in 'packages/rs-sdk' can use features available in Rust 1.80, such as the `abs_diff()` method.
Applied to files:
packages/rs-drive-proof-verifier/Cargo.toml
📚 Learning: 2025-03-11T09:39:23.071Z
Learnt from: shumkov
PR: dashpay/platform#2489
File: packages/rs-dpp/Cargo.toml:32-32
Timestamp: 2025-03-11T09:39:23.071Z
Learning: In the Dash Platform project, dependencies are currently managed using Git repository references with tags (repo+tag format in Cargo.toml) rather than published crates, as the team is not currently publishing crates to crates.io.
Applied to files:
packages/rs-drive-proof-verifier/Cargo.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (189)
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Formatting
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (withdrawals-contract) / Formatting
- GitHub Check: Rust packages (withdrawals-contract) / Unused dependencies
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wasm-dpp) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Linting
- GitHub Check: Rust packages (wasm-dpp) / Formatting
- GitHub Check: Rust packages (wasm-dpp) / Linting
- GitHub Check: Rust packages (wasm-dpp) / Unused dependencies
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Formatting
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (withdrawals-contract) / Formatting
- GitHub Check: Rust packages (withdrawals-contract) / Unused dependencies
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wasm-dpp) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Linting
- GitHub Check: Rust packages (wasm-dpp) / Formatting
- GitHub Check: Rust packages (wasm-dpp) / Linting
- GitHub Check: Rust packages (wasm-dpp) / Unused dependencies
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Formatting
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (withdrawals-contract) / Formatting
- GitHub Check: Rust packages (withdrawals-contract) / Unused dependencies
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wasm-dpp) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Linting
- GitHub Check: Rust packages (wasm-dpp) / Formatting
- GitHub Check: Rust packages (wasm-dpp) / Linting
- GitHub Check: Rust packages (wasm-dpp) / Unused dependencies
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Formatting
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (withdrawals-contract) / Formatting
- GitHub Check: Rust packages (withdrawals-contract) / Unused dependencies
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wasm-dpp) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Linting
- GitHub Check: Rust packages (wasm-dpp) / Formatting
- GitHub Check: Rust packages (wasm-dpp) / Linting
- GitHub Check: Rust packages (wasm-dpp) / Unused dependencies
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Formatting
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (withdrawals-contract) / Formatting
- GitHub Check: Rust packages (withdrawals-contract) / Unused dependencies
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wasm-dpp) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Linting
- GitHub Check: Rust packages (wasm-dpp) / Formatting
- GitHub Check: Rust packages (wasm-dpp) / Linting
- GitHub Check: Rust packages (wasm-dpp) / Unused dependencies
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Formatting
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (withdrawals-contract) / Formatting
- GitHub Check: Rust packages (withdrawals-contract) / Unused dependencies
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wasm-dpp) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Linting
- GitHub Check: Rust packages (wasm-dpp) / Formatting
- GitHub Check: Rust packages (wasm-dpp) / Linting
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Formatting
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (withdrawals-contract) / Formatting
- GitHub Check: Rust packages (withdrawals-contract) / Unused dependencies
- GitHub Check: Rust packages (withdrawals-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wasm-dpp) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Linting
- GitHub Check: Rust packages (wasm-dpp) / Formatting
- GitHub Check: Rust packages (wasm-dpp) / Linting
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Formatting
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (withdrawals-contract) / Formatting
- GitHub Check: Rust packages (withdrawals-contract) / Unused dependencies
- GitHub Check: Rust packages (withdrawals-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wasm-dpp) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Linting
- GitHub Check: Rust packages (wasm-dpp) / Formatting
- GitHub Check: Rust packages (wasm-dpp) / Linting
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Formatting
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (withdrawals-contract) / Formatting
- GitHub Check: Rust packages (withdrawals-contract) / Unused dependencies
- GitHub Check: Rust packages (withdrawals-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wasm-dpp) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Linting
- GitHub Check: Rust packages (wasm-dpp) / Formatting
- GitHub Check: Rust packages (wasm-dpp) / Linting
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Rust packages (dpp) / Unused dependencies
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Formatting
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (withdrawals-contract) / Formatting
- GitHub Check: Rust packages (withdrawals-contract) / Unused dependencies
- GitHub Check: Rust packages (withdrawals-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wasm-dpp) / Tests
- GitHub Check: Rust packages (wallet-utils-contract) / Linting
- GitHub Check: Rust packages (wasm-dpp) / Formatting
- GitHub Check: Rust packages (wasm-dpp) / Linting
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
🔇 Additional comments (1)
packages/rs-drive-proof-verifier/Cargo.toml (1)
37-39
: No action needed—pinning by commit is acceptable.Commit 2956695a93a0fc33e3eb3ceb7922d511a86c5cd9 in dashpay/rs-tenderdash-abci has no associated release tag, and this dependency only appears in packages/rs-drive-proof-verifier/Cargo.toml, so workspace consistency is already satisfied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
.github/actions/rust/action.yaml (1)
79-94
: Verify downloaded protoc with a checksum before unzipAdd SHA256 verification to harden supply-chain safety. This was noted earlier as well.
set -euxo pipefail PROTOC_DIR="${HOME}/.local/protoc-32.0" if [ ! -x "${PROTOC_DIR}/bin/protoc" ]; then mkdir -p "${PROTOC_DIR}" curl -fsSL -o /tmp/protoc.zip \ "https://github.com/protocolbuffers/protobuf/releases/download/v32.0/protoc-32.0-linux-${{ steps.protoc_arch.outputs.arch }}.zip" + curl -fsSL -o /tmp/protoc.zip.sha256 \ + "https://github.com/protocolbuffers/protobuf/releases/download/v32.0/protoc-32.0-linux-${{ steps.protoc_arch.outputs.arch }}.zip.sha256" + (cd /tmp && sha256sum -c protoc.zip.sha256) unzip -o /tmp/protoc.zip -d "${PROTOC_DIR}" fi
🧹 Nitpick comments (3)
packages/rs-drive/src/query/mod.rs (1)
2659-2662
: Prefer round-trip decode in the PathQuery test instead of pinning a full hex snapshot, and addPathQuery
to imports..github/actions/rust/action.yaml (2)
79-94
: Use the resolved HOME output for PROTOC_DIR for full path parity with cacheMinor consistency tweak to prevent edge-case mismatches if HOME differs.
- PROTOC_DIR="${HOME}/.local/protoc-32.0" + PROTOC_DIR="${{ steps.resolved_home.outputs.home }}/.local/protoc-32.0"
104-107
: Redundant HOME export stepSince you already resolved HOME via step output and use it for caches, this export is unnecessary. Consider removing.
- - name: Set HOME variable to github context - shell: bash - run: echo "HOME=$HOME" >> $GITHUB_ENV
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lock
is excluded by!**/*.lock
📒 Files selected for processing (3)
.github/actions/rust/action.yaml
(4 hunks)packages/dapi-grpc/src/lib.rs
(1 hunks)packages/rs-drive/src/query/mod.rs
(1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: QuantumExplorer
PR: dashpay/platform#2756
File: packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs:11-11
Timestamp: 2025-09-03T16:37:11.605Z
Learning: In packages/rs-dpp/Cargo.toml, the abci feature already includes core_rpc_client, and core_rpc_client is defined as ["dep:dashcore-rpc"]. This means rs-drive-abci can access dashcore-rpc types through dpp when using the abci feature.
Learnt from: lklimek
PR: dashpay/platform#2254
File: packages/rs-sdk/src/sdk.rs:585-585
Timestamp: 2024-10-18T15:39:51.172Z
Learning: The 'platform' project uses Rust version 1.80, so code in 'packages/rs-sdk' can use features available in Rust 1.80, such as the `abs_diff()` method.
Learnt from: QuantumExplorer
PR: dashpay/platform#2257
File: packages/rs-drive-abci/src/mimic/test_quorum.rs:159-164
Timestamp: 2024-11-20T16:16:01.830Z
Learning: QuantumExplorer prefers not to receive auto-generated messages asking to post on social media.
📚 Learning: 2025-01-19T07:36:46.042Z
Learnt from: QuantumExplorer
PR: dashpay/platform#2431
File: packages/rs-drive/Cargo.toml:55-60
Timestamp: 2025-01-19T07:36:46.042Z
Learning: The grovedb dependencies in packages/rs-drive/Cargo.toml and related files are intentionally kept at specific revisions rather than using the latest stable version, with plans to update them at a later time.
Applied to files:
packages/rs-drive/src/query/mod.rs
📚 Learning: 2024-11-25T01:17:02.001Z
Learnt from: QuantumExplorer
PR: dashpay/platform#2347
File: packages/rs-drive/tests/query_tests.rs:438-460
Timestamp: 2024-11-25T01:17:02.001Z
Learning: In Rust test files (`packages/rs-drive/tests/query_tests.rs`), when code is used only in tests, defining explicit enums for fields (like the `status` field in the `Withdrawal` struct) may not be necessary; using primitive types is acceptable.
Applied to files:
packages/rs-drive/src/query/mod.rs
📚 Learning: 2024-11-08T09:27:23.601Z
Learnt from: lklimek
PR: dashpay/platform#2316
File: .github/actions/librocksdb/action.yaml:22-28
Timestamp: 2024-11-08T09:27:23.601Z
Learning: Prefer to use `librocksdb/${{ inputs.version }}/${{ runner.os }}/${{ runner.arch }}` as the cache key for caching librocksdb in workflows; it's sufficient.
Applied to files:
.github/actions/rust/action.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (186)
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Tests
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Detect immutable structure changes
- GitHub Check: Rust packages (dash-sdk) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (dash-sdk) / Tests
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: build-wasm-sdk
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Tests
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Detect immutable structure changes
- GitHub Check: Rust packages (dash-sdk) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (dash-sdk) / Tests
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: build-wasm-sdk
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Tests
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Detect immutable structure changes
- GitHub Check: Rust packages (dash-sdk) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (dash-sdk) / Tests
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: build-wasm-sdk
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Tests
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (dash-sdk) / Tests
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: build-wasm-sdk
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Tests
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (dash-sdk) / Tests
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: build-wasm-sdk
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Tests
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (dash-sdk) / Tests
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: build-wasm-sdk
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Tests
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (dash-sdk) / Tests
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: build-wasm-sdk
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Rust packages (token-history-contract) / Unused dependencies
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Tests
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (dash-sdk) / Tests
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: build-wasm-sdk
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Rust packages (token-history-contract) / Unused dependencies
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Tests
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (dash-sdk) / Tests
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: build-wasm-sdk
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Rust packages (token-history-contract) / Unused dependencies
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Check each feature
- GitHub Check: Rust packages (rs-dapi-client) / Linting
- GitHub Check: Rust packages (rs-dapi-client) / Tests
- GitHub Check: Rust packages (rs-dapi-client) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Unused dependencies
- GitHub Check: Rust packages (dash-sdk) / Check each feature
- GitHub Check: Rust packages (dash-sdk) / Tests
- GitHub Check: Rust packages (dash-sdk) / Linting
- GitHub Check: Rust packages (drive-abci) / Linting
- GitHub Check: Rust packages (drive-abci) / Check each feature
- GitHub Check: Rust packages (drive-abci) / Tests
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: build-wasm-sdk
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
🔇 Additional comments (5)
packages/dapi-grpc/src/lib.rs (1)
81-82
: Hidetonic_prost
re-export from public docs// Ensure the prost codec crate is linked and available to generated code - pub use tonic_prost; + #[doc(hidden)] + pub use tonic_prost;
- Verify generated code references
crate::tonic_prost
(ortonic_prost::…
); if not, remove the re-export.- Confirm the
tonic-prost
dependency and its feature flags won’t pull non-WASM-friendly features underwasm32
..github/actions/rust/action.yaml (4)
69-77
: Protoc cache flow looks good; HOME resolution is consistent with pathsRestore step and key are symmetric and use the resolved HOME output. Looks solid.
95-103
: Cache save step matches restore; correct conditional on cache missSymmetric key/paths and save-on-miss only. Good.
113-115
: Cargo caches now use resolved HOME; good improvementThis should eliminate prior restore misses.
50-50
: Confirm macOS/iOS workflows don’t need protocThe
build-ffi-ios
job in .github/workflows/tests-rs-sdk-ffi-build.yml (runs-on: macos-latest, Setup Rust step uses this composite action) will skip protoc installation—verify this job truly doesn’t require protoc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
♻️ Duplicate comments (4)
packages/rs-sdk-ffi/src/document/replace.rs (4)
25-25
: Docs/name mismatch: function does not broadcast.This entry point only builds/signs and returns bytes; it doesn’t broadcast. Align the doc to avoid misuse.
-/// Replace document on platform (broadcast state transition) +/// Build and sign a Document Replace state transition (no broadcast). Returns serialized bytes.
100-106
: Duplicate user_fee_increase handling (use PutSettings only).
PutSettings
already carriesuser_fee_increase
and is applied viawith_settings
. Remove manual extraction and re-application to avoid divergence.- // Extract user fee increase from put_settings or use default - let user_fee_increase: UserFeeIncrease = if put_settings.is_null() { - 0 - } else { - (*put_settings).user_fee_increase - }; ... - if user_fee_increase > 0 { - builder = builder.with_user_fee_increase(user_fee_increase); - } + // user_fee_increase is taken from PutSettings (if any) via with_settings(...)Also applies to: 122-124
151-153
: Remove serialized ST hex dump; keep size only.Hex can leak sensitive material. Size is sufficient for diagnostics.
- debug!(size = serialized.len(), "[DOCUMENT REPLACE] serialized transition size (bytes)"); - debug!(hex = %hex::encode(&serialized), "[DOCUMENT REPLACE] state transition hex"); + debug!(size = serialized.len(), "[DOCUMENT REPLACE] serialized transition size (bytes)");
262-267
: Duplicate user_fee_increase handling in “and_wait”.Same issue as above—remove manual extraction and
with_user_fee_increase
.- // Extract user fee increase from put_settings or use default - let user_fee_increase: UserFeeIncrease = if put_settings.is_null() { - 0 - } else { - (*put_settings).user_fee_increase - }; ... - if user_fee_increase > 0 { - eprintln!( - "📝 [DOCUMENT REPLACE] Setting user fee increase: {}", - user_fee_increase - ); - builder = builder.with_user_fee_increase(user_fee_increase); - } + // user_fee_increase is taken from PutSettings (if any) via with_settings(...)Also applies to: 302-308
🧹 Nitpick comments (12)
packages/rs-sdk-ffi/src/document/replace.rs (4)
70-73
: Classify parse errors as InvalidParameter (not InternalError).These are caller inputs. Consider mapping to an invalid-parameter error to aid clients.
If
FFIError
has a parameter/validation variant, prefer it here. Otherwise, convert at the boundary toDashSDKErrorCode::InvalidParameter
.Also applies to: 227-229
107-114
: Should the build-only path bump revision?“And_wait” increments revision; the build-only path doesn’t. If the builder doesn’t auto-bump, this may produce an invalid replace ST.
- // Use the new DocumentReplaceTransitionBuilder - let mut builder = DocumentReplaceTransitionBuilder::new( - data_contract.clone(), - document_type_name_str.to_string(), - document.clone(), - ); + // Clone and bump revision to produce a valid replace + let mut document_to_transfer = document.clone(); + document_to_transfer + .increment_revision() + .map_err(|e| FFIError::InternalError(format!("Failed to increment document revision: {}", e)))?; + let mut builder = DocumentReplaceTransitionBuilder::new( + data_contract.clone(), + document_type_name_str.to_string(), + document_to_transfer, + );If the builder already bumps internally, skip this change and please confirm.
Also applies to: 130-141
114-129
: Consider using settings as the single source of truth for creation options.You pass both PutSettings.state_transition_creation_options and explicit options. Prefer one source to reduce confusion.
Also applies to: 292-313
371-776
: Tests: good null-path coverage; add a positive path with a mocked provider.Where feasible, add an integration-style test wiring a fake trusted provider to cover the happy path.
I can scaffold a minimal provider stub and test harness if helpful.
packages/rs-sdk-ffi/src/document/delete.rs (8)
37-50
: Fix grammar in user-facing error.Change "is null" → "are null" in both guards.
- "One or more required parameters is null".to_string(), + "One or more required parameters are null".to_string(),Also applies to: 193-206
111-116
: Wrap unsafe helper calls in explicit unsafe blocks (lint-friendly).If
#![deny(unsafe_op_in_unsafe_fn)]
is enabled, these will otherwise fail.- let token_payment_info_converted = convert_token_payment_info(token_payment_info)?; - let settings = crate::identity::convert_put_settings(put_settings); - let creation_options = - convert_state_transition_creation_options(state_transition_creation_options); + let token_payment_info_converted = unsafe { convert_token_payment_info(token_payment_info) }?; + let settings = unsafe { crate::identity::convert_put_settings(put_settings) }; + let creation_options = unsafe { + convert_state_transition_creation_options(state_transition_creation_options) + };Apply in both functions.
Also applies to: 291-296
117-123
: Avoid double-specifying options already present in PutSettings.
convert_put_settings
appears to carryuser_fee_increase
and signing options. Layeringwith_user_fee_increase
and separate creation options may override or diverge fromwith_settings
.Would you prefer to exclusively rely on
with_settings(settings)
for these knobs and drop the separate setters, or confirm builder precedence is well-defined?Also applies to: 136-146, 319-333
160-171
: Verify bincode as the wire format for FFI.Bincode is Rust-specific and version-fragile across crates/languages. If these bytes cross the ABI boundary for consumption on iOS/Swift, prefer the canonical DPP serialization (e.g., CBOR/CBORLD or SDK-provided buffer encoding) rather than bincode.
If the intent is “opaque blob for immediate submission back to the Rust SDK,” document that contract; otherwise I can switch this to the canonical serialization used elsewhere.
355-359
: Consider returning the deleted document ID.For parity with the non-waiting variant (which returns bytes), returning the 32-byte deleted ID can help callers confirm the operation without extra context.
382-407
: Remove unused test helper and related imports.
create_mock_document
and its imports are unused.- use dash_sdk::dpp::document::{Document, DocumentV0}; - use dash_sdk::dpp::platform_value::Value; - use std::collections::BTreeMap; + // (imports trimmed) - // Helper function to create a mock document - fn create_mock_document() -> Box<Document> { - let id = Identifier::from_bytes(&[2u8; 32]).unwrap(); - let owner_id = Identifier::from_bytes(&[1u8; 32]).unwrap(); - - let mut properties = BTreeMap::new(); - properties.insert("name".to_string(), Value::Text("Test Document".to_string())); - - let document = Document::V0(DocumentV0 { - id, - owner_id, - properties: properties, - revision: Some(1), - created_at: None, - updated_at: None, - transferred_at: None, - created_at_block_height: None, - updated_at_block_height: None, - transferred_at_block_height: None, - created_at_core_block_height: None, - updated_at_core_block_height: None, - transferred_at_core_block_height: None, - }); - - Box::new(document) - }Also applies to: 373-377, 378-379
409-455
: Tests cover null-parameter guards; add input-parse and context-provider cases.
- Add cases where IDs are invalid Base58 to assert
InvalidParameter
.- Add a case where the contract is missing to assert
NotFound
.I can add targeted tests using the mock SDK/context to validate the new error mappings once you adopt them.
Also applies to: 457-675, 677-723
23-176
: DRY: factor shared parsing/building into a helper.Both functions duplicate pointer checks, parsing, context fetch, and builder configuration. A private helper returning either the serialized bytes or the built builder would reduce risk of divergence.
Happy to draft a small internal helper (e.g.,
prepare_delete_builder(...) -> Result<DocumentDeleteTransitionBuilder, FFIError>
).Also applies to: 179-365
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/rs-sdk-ffi/src/document/delete.rs
(1 hunks)packages/rs-sdk-ffi/src/document/replace.rs
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: lklimek
PR: dashpay/platform#2254
File: packages/rs-sdk/src/sdk.rs:585-585
Timestamp: 2024-10-18T15:39:51.172Z
Learning: The 'platform' project uses Rust version 1.80, so code in 'packages/rs-sdk' can use features available in Rust 1.80, such as the `abs_diff()` method.
Learnt from: QuantumExplorer
PR: dashpay/platform#2756
File: packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs:11-11
Timestamp: 2025-09-03T16:37:11.605Z
Learning: In packages/rs-dpp/Cargo.toml, the abci feature already includes core_rpc_client, and core_rpc_client is defined as ["dep:dashcore-rpc"]. This means rs-drive-abci can access dashcore-rpc types through dpp when using the abci feature.
Learnt from: QuantumExplorer
PR: dashpay/platform#2257
File: packages/rs-drive-abci/src/mimic/test_quorum.rs:159-164
Timestamp: 2024-11-20T16:16:01.830Z
Learning: QuantumExplorer prefers not to receive auto-generated messages asking to post on social media.
🧬 Code graph analysis (2)
packages/rs-sdk-ffi/src/document/delete.rs (6)
packages/rs-sdk-ffi/src/types.rs (3)
error
(187-193)success_binary
(151-166)success
(133-139)packages/rs-sdk-ffi/src/document/helpers.rs (2)
convert_state_transition_creation_options
(63-95)convert_token_payment_info
(25-60)packages/rs-sdk-ffi/src/sdk.rs (1)
new
(37-43)packages/rs-sdk-ffi/src/error.rs (3)
new
(81-89)from
(101-161)success
(92-97)packages/rs-sdk-ffi/src/test_utils.rs (6)
convert_put_settings
(145-165)create_mock_identity_public_key
(29-31)create_mock_signer
(73-85)create_put_settings
(130-142)create_mock_sdk_handle
(16-19)destroy_mock_sdk_handle
(22-26)packages/rs-sdk-ffi/src/identity/helpers.rs (1)
convert_put_settings
(15-75)
packages/rs-sdk-ffi/src/document/replace.rs (4)
packages/rs-sdk-ffi/src/document/helpers.rs (2)
convert_state_transition_creation_options
(63-95)convert_token_payment_info
(25-60)packages/rs-sdk-ffi/src/types.rs (3)
error
(187-193)success_binary
(151-166)success_handle
(169-175)packages/rs-sdk/src/platform/documents/transitions/replace.rs (2)
new
(43-57)state_transition
(221-222)packages/rs-sdk-ffi/src/identity/helpers.rs (1)
convert_put_settings
(15-75)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (174)
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wallet-utils-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Detect immutable structure changes
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Formatting
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Rust packages (token-history-contract) / Detect immutable structure changes
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wallet-utils-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Formatting
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Rust packages (token-history-contract) / Detect immutable structure changes
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wallet-utils-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Formatting
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Rust packages (token-history-contract) / Detect immutable structure changes
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wallet-utils-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Formatting
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Rust packages (dashpay-contract) / Tests
- GitHub Check: Rust packages (token-history-contract) / Detect immutable structure changes
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wallet-utils-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Formatting
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Rust packages (dashpay-contract) / Tests
- GitHub Check: Rust packages (token-history-contract) / Detect immutable structure changes
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wallet-utils-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Formatting
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Rust packages (dashpay-contract) / Tests
- GitHub Check: Rust packages (token-history-contract) / Detect immutable structure changes
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wallet-utils-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Formatting
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Rust packages (dashpay-contract) / Tests
- GitHub Check: Rust packages (token-history-contract) / Detect immutable structure changes
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wallet-utils-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Formatting
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Rust packages (dashpay-contract) / Tests
- GitHub Check: Rust packages (token-history-contract) / Detect immutable structure changes
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wallet-utils-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Formatting
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
- GitHub Check: Rust packages (dashpay-contract) / Tests
- GitHub Check: Rust packages (token-history-contract) / Linting
- GitHub Check: Rust packages (wallet-utils-contract) / Unused dependencies
- GitHub Check: Rust packages (wallet-utils-contract) / Tests
- GitHub Check: Rust packages (json-schema-compatibility-validator) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (dapi-grpc) / Linting
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Formatting
- GitHub Check: Rust packages (dpp) / Tests
- GitHub Check: Rust packages (dpp) / Check each feature
- GitHub Check: Rust packages (dpp) / Linting
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build JS packages / Build JS
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios-sim)
- GitHub Check: Build rs-sdk-ffi for iOS targets (aarch64-apple-ios)
🔇 Additional comments (3)
packages/rs-sdk-ffi/src/document/replace.rs (2)
38-50
: Good null-parameter validation.Clear guardrail for FFI boundary.
156-161
: Result handling is solid.Success/err wrapping into DashSDKResult is consistent with types.rs helpers.
Also applies to: 355-368
packages/rs-sdk-ffi/src/document/delete.rs (1)
208-259
: Logging looks good; keep hex dump only on debug.The structured logs and key metadata are helpful. Hex dump is gated by debug, which is fine.
Also applies to: 334-347, 165-171
let doc_id = Identifier::from_string(document_id_str, Encoding::Base58) | ||
.map_err(|e| FFIError::InternalError(format!("Invalid document ID: {}", e)))?; | ||
|
||
let owner_identifier = Identifier::from_string(owner_id_str, Encoding::Base58) | ||
.map_err(|e| FFIError::InternalError(format!("Invalid owner ID: {}", e)))?; | ||
|
||
let contract_id = Identifier::from_string(contract_id_str, Encoding::Base58) | ||
.map_err(|e| FFIError::InternalError(format!("Invalid contract ID: {}", e)))?; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Classify invalid ID parsing as InvalidParameter, not InternalError.
These are caller input errors, not internal failures.
- .map_err(|e| FFIError::InternalError(format!("Invalid document ID: {}", e)))?;
+ .map_err(|e| FFIError::InvalidParameter(format!("Invalid document ID: {}", e)))?;
- .map_err(|e| FFIError::InternalError(format!("Invalid owner ID: {}", e)))?;
+ .map_err(|e| FFIError::InvalidParameter(format!("Invalid owner ID: {}", e)))?;
- .map_err(|e| FFIError::InternalError(format!("Invalid contract ID: {}", e)))?;
+ .map_err(|e| FFIError::InvalidParameter(format!("Invalid contract ID: {}", e)))?;
And similarly in the ..._and_wait
variant.
Also applies to: 262-270
🤖 Prompt for AI Agents
In packages/rs-sdk-ffi/src/document/delete.rs around lines 82 to 90 (and
similarly for the ..._and_wait variant and lines 262 to 270), the map_err
conversions classify malformed Base58 identifier parsing as
FFIError::InternalError; treat these as caller input errors by changing the
error variant to FFIError::InvalidParameter for the Identifier::from_string
calls for document_id_str, owner_id_str, and contract_id_str (and the
corresponding calls in the other variant/lines), ensuring the error message
remains descriptive (e.g., "Invalid document ID: {}", etc.).
// Get contract from trusted context provider | ||
let data_contract = if let Some(ref provider) = wrapper.trusted_provider { | ||
let platform_version = wrapper.sdk.version(); | ||
provider | ||
.get_data_contract(&contract_id, platform_version) | ||
.map_err(|e| { | ||
FFIError::InternalError(format!("Failed to get contract from context: {}", e)) | ||
})? | ||
.ok_or_else(|| { | ||
FFIError::InternalError(format!( | ||
"Contract {} not found in trusted context", | ||
contract_id_str | ||
)) | ||
})? | ||
} else { | ||
return Err(FFIError::InternalError( | ||
"No trusted context provider configured".to_string(), | ||
)); | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Use NotFound/InvalidState for context-provider errors.
- Missing contract → NotFound
- No provider configured → InvalidState
- .ok_or_else(|| {
- FFIError::InternalError(format!(
- "Contract {} not found in trusted context",
- contract_id_str
- ))
- })?
+ .ok_or_else(|| {
+ FFIError::NotFound(format!(
+ "Contract {} not found in trusted context",
+ contract_id_str
+ ))
+ })?
} else {
- return Err(FFIError::InternalError(
- "No trusted context provider configured".to_string(),
- ));
+ return Err(FFIError::InvalidState(
+ "No trusted context provider configured".to_string(),
+ ));
};
Apply in both functions.
Also applies to: 271-290
🤖 Prompt for AI Agents
In packages/rs-sdk-ffi/src/document/delete.rs around lines 91-110 (and similarly
apply the same changes at lines 271-290), the code returns
FFIError::InternalError for two context-provider situations; change the branch
that triggers when the contract is not found (the ok_or_else) to return
FFIError::NotFound with the same message, and change the branch when there is no
trusted provider configured (the else returning an InternalError) to return
FFIError::InvalidState with the same message; apply these exact replacements in
both functions mentioned.
let result = wrapper | ||
.sdk | ||
.document_delete(builder, &identity_public_key, signer) | ||
.await | ||
.map_err(|e| { | ||
error!(error = %e, key_id = identity_public_key.id(), "[DOCUMENT DELETE] SDK call failed"); | ||
FFIError::InternalError(format!("Failed to delete document and wait: {}", e)) | ||
})?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Propagate SDK errors as SDKError, not InternalError.
Mapping the SDK call failure to InternalError
loses classification (Timeout, NetworkError, NotFound, etc.) that your error.rs
already supports via FFIError::SDKError
.
Prefer FFIError::SDKError(e.into())
(or equivalent) here to preserve rich error codes surfaced to callers.
🤖 Prompt for AI Agents
In packages/rs-sdk-ffi/src/document/delete.rs around lines 337 to 344, the SDK
call error is currently mapped to FFIError::InternalError which strips
SDK-specific error classifications; change the mapping to propagate the original
SDK error as FFIError::SDKError(e.into()) (or equivalent conversion) so
timeout/network/not-found variants are preserved, while keeping the existing
error! logging of the error and key_id intact.
eprintln!("📝 [DOCUMENT REPLACE] Building document replace transition..."); | ||
|
||
// Use the new DocumentReplaceTransitionBuilder with SDK method | ||
let mut builder = DocumentReplaceTransitionBuilder::new( | ||
data_contract.clone(), | ||
document_type_name_str.to_string(), | ||
document_to_transfer, | ||
); | ||
|
||
eprintln!("📝 [DOCUMENT REPLACE] Document ID: {}", document.id()); | ||
eprintln!( | ||
"📝 [DOCUMENT REPLACE] Document properties: {:?}", | ||
document.properties() | ||
); | ||
eprintln!( | ||
"📝 [DOCUMENT REPLACE] Document owner ID: {}", | ||
document.owner_id() | ||
); | ||
eprintln!( | ||
"📝 [DOCUMENT REPLACE] Current revision: {:?}", | ||
document.revision() | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Replace eprintln! spam and sensitive dumps with tracing; avoid PII.
Use tracing macros, remove document property dumps, and reduce key metadata verbosity.
- eprintln!("📝 [DOCUMENT REPLACE] Building document replace transition...");
+ debug!("[DOCUMENT REPLACE] building document replace transition");
- eprintln!("📝 [DOCUMENT REPLACE] Document ID: {}", document.id());
- eprintln!(
- "📝 [DOCUMENT REPLACE] Document properties: {:?}",
- document.properties()
- );
- eprintln!(
- "📝 [DOCUMENT REPLACE] Document owner ID: {}",
- document.owner_id()
- );
- eprintln!(
- "📝 [DOCUMENT REPLACE] Current revision: {:?}",
- document.revision()
- );
+ debug!(document_id = %document.id(), "[DOCUMENT REPLACE] document id");
+ debug!(owner_id = %document.owner_id(), "[DOCUMENT REPLACE] owner id");
+ debug!(revision = ?document.revision(), "[DOCUMENT REPLACE] current revision");
+ // Avoid logging full properties/bytes; potential PII.
- eprintln!("📝 [DOCUMENT REPLACE] Adding token payment info");
+ debug!("[DOCUMENT REPLACE] adding token payment info");
- eprintln!("📝 [DOCUMENT REPLACE] Adding put settings");
+ debug!("[DOCUMENT REPLACE] adding put settings");
- eprintln!("📝 [DOCUMENT REPLACE] Adding state transition creation options");
+ debug!("[DOCUMENT REPLACE] adding state transition creation options");
- eprintln!("📝 [DOCUMENT REPLACE] Calling SDK document_replace method...");
- eprintln!(
- "📝 [DOCUMENT REPLACE] Identity public key ID: {}",
- identity_public_key.id()
- );
- eprintln!(
- "📝 [DOCUMENT REPLACE] Identity public key purpose: {:?}",
- identity_public_key.purpose()
- );
- eprintln!(
- "📝 [DOCUMENT REPLACE] Identity public key security level: {:?}",
- identity_public_key.security_level()
- );
- eprintln!(
- "📝 [DOCUMENT REPLACE] Identity public key type: {:?}",
- identity_public_key.key_type()
- );
+ debug!("[DOCUMENT REPLACE] calling SDK document_replace");
+ debug!(key_id = identity_public_key.id(), "[DOCUMENT REPLACE] identity key");
- eprintln!("❌ [DOCUMENT REPLACE] SDK call failed: {}", e);
- eprintln!(
- "❌ [DOCUMENT REPLACE] Failed with key ID: {}",
- identity_public_key.id()
- );
+ error!(error = %e, key_id = identity_public_key.id(), "[DOCUMENT REPLACE] SDK call failed");
- eprintln!("✅ [DOCUMENT REPLACE] SDK call completed successfully");
+ info!("[DOCUMENT REPLACE] SDK call completed");
- eprintln!("✅ [DOCUMENT REPLACE] Document replace completed successfully");
+ info!("[DOCUMENT REPLACE] document replace completed successfully");
- eprintln!("❌ [DOCUMENT REPLACE] Document replace failed: {:?}", e);
+ error!(error = ?e, "[DOCUMENT REPLACE] document replace failed");
Also applies to: 297-332, 338-347, 357-357, 365-365
🤖 Prompt for AI Agents
In packages/rs-sdk-ffi/src/document/replace.rs around lines 269-291 (and
similarly for 297-332, 338-347, 357, 365), replace the eprintln! debug prints
with tracing macros (e.g., tracing::info or tracing::debug), stop printing full
document.properties() and other sensitive PII (owner_id, full property dumps),
and only emit minimal non-sensitive metadata such as a hex/base58-safe document
id and revision or a redacted metadata flag; ensure logs use structured fields
(e.g., tracing::info!(document_id = %doc_id, revision = ?rev, "document replace
start")) and remove any raw property dumps to avoid leaking PII.
Merging this without linting, as it will be easier to review linting fixes one by one. |
The redundant actions/cache/save@v4 steps for protoc and wasm-opt were causing "Path Validation Error" warnings when cache hits occurred. The actions/cache@v4 action automatically handles both restore and save operations, making the separate save steps unnecessary. Issue was introduced in dashpay#2756
Reverts the downgrade to version 121 that was introduced in dashpay#2756. The newer version 124 should have better optimization algorithms and support more flags, reducing compatibility testing overhead and improving build performance. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Summary by CodeRabbit
New Features
FFI Endpoints
Improvements
Documentation
Removed
Checklist:
For repository code-owners and collaborators only