Repository navigation
chore(platform)!: update rust-dashcore to dev 280b3f2c - #5493
Conversation
Move every rust-dashcore crate from dev at 626c91d1 to dev at 280b3f2c. Only the rust-dashcore revision changes in Cargo.lock. The range brings rust-dashcore #1179 (list diffs decode operatorPayoutAddress and keep PoSeRevivedHeight), which update_state_masternode_list v0 and v1 neutralise since #5455, #1187 (LLMQ params of the test and devnet quorum types match Dash Core), and three dash-spv API changes that platform-wallet adapts to: - #1176: the storage module is private and DashSpvClient opens its own storage. SpvRuntime no longer opens storage before the client, reads the tip and headers through tip_header/header_at, and clears storage through a client that never runs, without filters or masternodes, so it does not replay the stored masternode state only to delete it. - #1177: DashSpvClient::is_running is synchronous, so SpvRuntime calls it instead of polling the old future with a no-op waker. - #1183: the storage writer runs only between start and stop or drop, which removes the need to stop the writer of a client that never ran. The test of a failed construction is removed: config validation now fails before dash-spv opens storage, so it could no longer fail. A new test clears a client that ran and checks that a restart anchors at genesis instead of resuming from the persisted checkpoint; it fails when clearing is a no-op. is_running is pinned to report a client whose startup is in progress as running. BREAKING CHANGE: dash_spv::storage, re-exported through dpp (core_spv) and dash-sdk, is private; DashSpvClient takes no storage parameter. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Waiting for bot review — coderabbitai not yet · thepastaclaw ✓. Wait for the missing reviews, or a writer can post |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Final review complete — no blockers (commit 1456fbb) |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
The dependency pin and SpvRuntime API migration are consistent, with no consensus or correctness blockers identified. One non-blocking ownership issue remains: clearing storage constructs a complete DashSpvClient and PeerNetworkManager solely to invoke clear_storage, because the pinned dash-spv API lacks a standalone storage-clear operation. The supplied Rust workspace test check is still in progress.
🟡 1 suggestion(s)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a contained dependency upgrade with associated Rust SPV runtime adaptations, including storage lifecycle and concurrency behavior changes, but the diff does not itself alter consensus rules, funds movement, cryptography, or a storage migration. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer,muse-spark-1.3-contributor— rust-quality (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(lane failed),glm-5.3-flash(not used above high effort; tier asks max) - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `packages/rs-platform-wallet/src/spv/runtime.rs`:
- [SUGGESTION] packages/rs-platform-wallet/src/spv/runtime.rs:723-741: Avoid constructing a full SPV client solely to clear storage
Storage lifecycle and clearing belong to dash-spv, but this adapter works around the missing standalone operation by constructing a complete `DashSpvClient` and `PeerNetworkManager` solely to call `clear_storage`. In the pinned dash-spv revision, construction validates the configuration, opens persistent peer storage, resolves wallet-dependent startup state, and may initialize a genesis or checkpoint immediately before the storage is deleted. The disabled filters and masternodes avoid unnecessary replay, so the localized workaround is behaviorally safe, but it makes platform-wallet choose an inert configuration for an invariant owned by the upstream storage layer. Add a dash-spv API that clears a configured storage path without constructing a sync client, then delegate to it here. The PR body mentions this follow-up but does not link a tracking issue or PR; add tracking if it remains deferred.
|
@coderabbitai review No review for |
|
/skip-bots |
|
Bots are done — your move: post |
|
/self-reviewed |
Issue being fixed or feature implemented
Moves Platform v5.1-dev from rust-dashcore
devat626c91d1todevat280b3f2c, the currentdevtip. The range carries the rpc-json fix that #5455 prepared drive-abci for, the LLMQ parameter fix, and three dash-spv API changes that platform-wallet has to adapt to.What was done?
rust-dashcore commits in range and their Platform impact
protx listdiffdecoding readsoperatorPayoutAddress;DMNState::apply_diffkeepsPoSeRevivedHeightwhen a diff omits itupdate_state_masternode_listv0 and v1 by #5455, whose two helpers are now live (see the audit below).DashSpvClient::is_runningis synchronousManagedWalletInfo::transaction_is_settledis publicllmq_test_platformDKG interval 288 → 24dash_spv::storageis private;DashSpvClient<W, N>opens its own storage;storage()is replaced bytip_header/header_at/header_heightdash_spv::storagethrough thedpp/dash-sdkre-export.startandstopor dropDependency changes
Cargo.tomlmove to280b3f2c.Cargo.lock: only the 13 rust-dashcoresourcelines change. No crates.io package, version or checksum moves, so BLS, secp256k1, bincode and serde are unchanged. No upstreamCargo.tomlchanged in the range.platform-wallet adaptation (
SpvRuntime)These changes are meant to keep behaviour the same:
start: no longer opens aDiskStorageManagerand stops its writer before building the client.DashSpvClient::newopens the storage itself, and since rust-dashcore#1183 no writer runs beforerun.is_running: is nowstarting || client.is_running(). It used to poll upstream's asyncis_runningwith a no-op waker, which answeredfalsewhile upstream held its sync-loop lock. Upstream's flag is cleared beforeon_errorruns and during fork recovery, as the old lock was. It still never waits, so event handlers can call it.tip_block_time,header_hash_at: go throughclient.tip_header()andclient.header_at(height). These return the same data through the same header storage.clear_storage: stops the client first, as before. Storage is now private andDashSpvClient::clear_storageis the only public way to clear it. Soclear_storagebuilds a client on the last config and calls that method:CHANGELOG
The
[Unreleased]rust-dashcore entry now names280b3f2cand the new upstream changes.In-place changes to shipped generations
None. No version table, generation or drive-abci/dpp/drive code changes. #5455, already on v5.1-dev, made the in-place edits to
update_state_masternode_listv0 and v1 that this bump relies on.Consensus audit
Verdict: consensus is unchanged at every protocol version.
dash/src/sml/llmq_type/mod.rs(constants) andrpc-json/src/lib.rs(ci: cancel runs for already merged PRs #1179). Nothing indash/src/blockdatachanged: transaction and special-payload decoding, asset lock/unlock, quorum commitments and serde/bincode layouts are as before.DMNState(which Platform stores) and rpc-json'sQuorumTypeare unchanged.DMNStateDiffis deserialize-only and never stored.get_protx_diff_with_masternodes, called from v0 and v1. Both strip the updated masternodes' operator payouts immediately (without_operator_payout_changes). Every production apply of a Core diff goes throughapply_diff_replacing_revived_height: v0's early-return check, both lists inapply_masternode_state_diff, and v1's stored-form apply. All otherapply_diffcalls are in tests. With626c91d1both helpers were no-ops. With280b3f2c, removing either one fails fix(drive-abci): apply masternode list diffs as v0 and v1 always have #5455's tests (results below), so they are what keeps v0/v1 results identical. One residual input change: a malformed non-emptyoperatorPayoutAddressnow fails the whole diff. Core cannot print one, as fix(drive-abci): apply masternode list diffs as v0 and v1 always have #5455 explains.LLMQTypeparams or the dashcore helpers built on them. That covers DKG windows,QuorumEntry::validate_structure, quorum member selection andMasternodeListEngine.DkgMiningScheduletable, which already has Core's values.Release lines:
v5.0-devandmastercontain neither rust-dashcore#1179 nor #5455. A pin that includes #1179 must not reach them without #5455.How Has This Been Tested?
Local runs on macOS (pasta) at the pushed commit, with the new pin:
cargo clippy --workspace --all-targets --all-features --locked -- --no-deps -D warnings: clean.cargo check --workspace --all-targets --locked: clean.cargo fmt --check --all: clean.wasm32 (
--target wasm32-unknown-unknown):cargo checkpasses forwasm-dpp,wasm-dpp2,wasm-drive-verifyandwasm-sdk.check-wallet-closure.pyand CI's transport-free feature cuts (dapi-grpc,drive-proof-verifier,dash-platform-queries): pass.fix(drive-abci): apply masternode list diffs as v0 and v1 always have #5455 with the new pin:
cargo test -p drive-abci --lib -- core_based_updates platform_types::masternode platform_types::platform_stategives 125 passed. This includesoperator_key_encoding_testsand fix(drive-abci): apply masternode list diffs as v0 and v1 always have #5455's tests.without_operator_payout_changesmade a pass-through, 4 tests fail:should_keep_operator_payouts_and_keys_when_a_diff_carries_an_operator_payoutshould_leave_the_state_clean_when_a_diff_only_re_encodes_a_key_and_sets_an_operator_payoutshould_normalize_a_diff_the_same_whichever_normalization_runs_firstshould_ignore_the_operator_payout_of_a_diff_that_re_encodes_the_operator_keyapply_diff_replacing_revived_heightreduced toapply_diff, 2 tests fail:should_clear_a_revived_height_a_diff_does_not_printand its unit-test twin.platform-wallet
spv::runtime: 35 passed.should_drop_the_persisted_chain_when_clearing_a_running_client: clears a client that ran, then checks that a restart anchors at genesis instead of resuming from the persisted checkpoint. It also checksheader_hash_atandtip_block_timeagainst a real client. It fails when clearing is a no-op.should_wait_for_startup_before_stopping_its_client: pinsis_runningtotruewhile startup is in progress. It fails without thestartinghalf.should_leave_no_storage_writer_after_client_construction_fails. Config validation now fails before dash-spv opens the storage, so the test could no longer fail.CI's non-shielded native package set:
RUST_MIN_STACK=4194304 CARGO_PROFILE_DEV_DEBUG=0 cargo test --all-features --locked --lib --bins --tests -- --skip shield. It covers drive, dpp, drive-abci, dash-sdk, dash-async, platform-value, platform-encryption, rs-dapi, platform-wallet, platform-wallet-storage, rs-sdk-ffi, platform-wallet-ffi, rs-dapi-client, platform-serialization and dapi-grpc. Result: 19,935 passed, 0 failed, 61 ignored across 62 test binaries. Highlights:strategy_testsbinary (115 passed, 4 ignored), not only the PR subset CI runs.cargo test -p platform-wallet-storage --all-features -- shield --skip wallet::shielded::: 7 passed (the SQLite tests CI keeps in the non-shielded phase).cargo test -p platform-wallet-storage --all-features --test integration persisted_core_transactions: 1 passed. Stored Core transactions still decode.cargo test -p wasm-sdk --lib: 189 passed.cargo test -p platform-wallet --all-features --doc: 4 passed.Not run locally: the shielded (Orchard proving) phase, which this change does not touch, and wasm32
wasm_bindgen_tests.Breaking Changes
dash_spv::storageis private upstream, which breaks code using it throughdpp::dash_spv(core_spv) ordash_sdk::dash_spv.DashSpvClienttakes no storage type parameter or argument, andDashSpvClient::is_runningis synchronous.SpvRuntime::start/clear_storagenow come throughSpvError, so their text starts with "Storage error: ". Config validation errors are reported before storage errors. No FFI, Swift or Kotlin code matches on that text.SpvRuntime, FFI, JNI) is unchanged. Consensus is unchanged.Follow-ups (not in this PR)
clear_storageskip opening the managers.tip_header/header_athold the storage mutex while waiting for the header lock (the old Platform code released it first). This adds latency but cannot deadlock.Checklist:
structure.rs, regeneratedgrovedb-structure.json, and checked the structure viewer link posted on this pull requestFor repository code-owners and collaborators only
🤖 Generated with Claude Code
PR Hygiene ·
1456fbb/self-reviewedrs-platform-wallet(packages/rs-platform-wallet/src/spv/runtime.rs) — HashEngineering or ZocoLini or llbartekll or romchornyiWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.