Skip to content

chore(platform)!: update rust-dashcore to dev 280b3f2c - #5493

Merged
shumkov merged 1 commit into
v5.1-devfrom
shumkov/v51-rust-dashcore-dev-bump
Oct 20, 2026
Merged

shumkov merged 1 commit into
v5.1-devfrom
shumkov/v51-rust-dashcore-dev-bump

Conversation

@shumkov

@shumkov shumkov commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

Moves Platform v5.1-dev from rust-dashcore dev at 626c91d1 to dev at 280b3f2c, the current dev tip. 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

Commit Change Platform impact
80298d0e (rust-dashcore#1179) protx listdiff decoding reads operatorPayoutAddress; DMNState::apply_diff keeps PoSeRevivedHeight when a diff omits it Consensus input. Neutralised for update_state_masternode_list v0 and v1 by #5455, whose two helpers are now live (see the audit below).
4307f247 (rust-dashcore#1177) DashSpvClient::is_running is synchronous platform-wallet adapted.
a52586f7 (rust-dashcore#1184) CI runners None.
c4535d40 (rust-dashcore#1186) ManagedWalletInfo::transaction_is_settled is public None (not used yet).
f35115b2 (rust-dashcore#1187) LLMQ params of the test/devnet types (100, 101, 105, 106, 107) match Dash Core, e.g. llmq_test_platform DKG interval 288 → 24 Client-side only: dash-spv on local networks and devnets now tracks Platform quorums at Core's cadence. No consensus path reads these constants.
d35a8d6c (rust-dashcore#1176) dash_spv::storage is private; DashSpvClient<W, N> opens its own storage; storage() is replaced by tip_header / header_at / header_height platform-wallet adapted. Breaking for code using dash_spv::storage through the dpp / dash-sdk re-export.
280b3f2c (rust-dashcore#1183) The storage writer runs only between start and stop or drop Removes platform-wallet's workaround for a writer left by a client that never ran.

Dependency changes

  • All eight rust-dashcore entries in Cargo.toml move to 280b3f2c.
  • Cargo.lock: only the 13 rust-dashcore source lines change. No crates.io package, version or checksum moves, so BLS, secp256k1, bincode and serde are unchanged. No upstream Cargo.toml changed in the range.

platform-wallet adaptation (SpvRuntime)

These changes are meant to keep behaviour the same:

  • start: no longer opens a DiskStorageManager and stops its writer before building the client. DashSpvClient::new opens the storage itself, and since rust-dashcore#1183 no writer runs before run.
  • is_running: is now starting || client.is_running(). It used to poll upstream's async is_running with a no-op waker, which answered false while upstream held its sync-loop lock. Upstream's flag is cleared before on_error runs 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 through client.tip_header() and client.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 and DashSpvClient::clear_storage is the only public way to clear it. So clear_storage builds a client on the last config and calls that method:
    • The client never runs and has no event handlers. Dropping it releases the storage lock.
    • It is built without filters or masternodes. Clearing removes the whole storage directory anyway, and this way the client does not first replay the stored masternode state.

CHANGELOG

The [Unreleased] rust-dashcore entry now names 280b3f2c and 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_list v0 and v1 that this bump relies on.

Consensus audit

Verdict: consensus is unchanged at every protocol version.

  • Only two upstream files that drive-abci, drive or dpp build against changed: dash/src/sml/llmq_type/mod.rs (constants) and rpc-json/src/lib.rs (ci: cancel runs for already merged PRs #1179). Nothing in dash/src/blockdata changed: transaction and special-payload decoding, asset lock/unlock, quorum commitments and serde/bincode layouts are as before. DMNState (which Platform stores) and rpc-json's QuorumType are unchanged. DMNStateDiff is deserialize-only and never stored.
  • rust-dashcore#1179 vs fix(drive-abci): apply masternode list diffs as v0 and v1 always have #5455: a Core diff enters Platform only through 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 through apply_diff_replacing_revived_height: v0's early-return check, both lists in apply_masternode_state_diff, and v1's stored-form apply. All other apply_diff calls are in tests. With 626c91d1 both helpers were no-ops. With 280b3f2c, 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-empty operatorPayoutAddress now fails the whole diff. Core cannot print one, as fix(drive-abci): apply masternode list diffs as v0 and v1 always have #5455 explains.
  • rust-dashcore#1187:
    • drive-abci, drive, dpp, drive-proof-verifier and rs-platform-version never read LLMQType params or the dashcore helpers built on them. That covers DKG windows, QuorumEntry::validate_structure, quorum member selection and MasternodeListEngine.
    • Local chain-lock verification uses Platform's own versioned DkgMiningSchedule table, which already has Core's values.
    • No threshold changed. Mainnet and testnet types are untouched.
    • The effect is in dash-spv on regtest and devnets. The Platform-quorum walk-back window and the number of masternode lists kept shrink to match Core's 24-block cadence. The bound on work-block requests per diff grows.
  • Other commits: dash-spv, key-wallet visibility and CI only. drive-abci depends on neither dash-spv nor key-wallet.

Release lines: v5.0-dev and master contain 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 check passes for wasm-dpp, wasm-dpp2, wasm-drive-verify and wasm-sdk.

  • check-wallet-closure.py and 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_state gives 125 passed. This includes operator_key_encoding_tests and fix(drive-abci): apply masternode list diffs as v0 and v1 always have #5455's tests.

    • With without_operator_payout_changes made a pass-through, 4 tests fail:
      • should_keep_operator_payouts_and_keys_when_a_diff_carries_an_operator_payout
      • should_leave_the_state_clean_when_a_diff_only_re_encodes_a_key_and_sets_an_operator_payout
      • should_normalize_a_diff_the_same_whichever_normalization_runs_first
      • should_ignore_the_operator_payout_of_a_diff_that_re_encodes_the_operator_key
    • With apply_diff_replacing_revived_height reduced to apply_diff, 2 tests fail: should_clear_a_revived_height_a_diff_does_not_print and its unit-test twin.
    • Both helpers were restored afterwards.
  • platform-wallet spv::runtime: 35 passed.

    • New test 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 checks header_hash_at and tip_block_time against a real client. It fails when clearing is a no-op.
    • New assertion in should_wait_for_startup_before_stopping_its_client: pins is_running to true while startup is in progress. It fails without the starting half.
    • Removed 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:

    • dpp 5,387; drive 4,052; platform-wallet 1,396; platform-wallet-ffi 423; platform-wallet-storage 435 + 545 integration; dash-sdk 331.
    • drive-abci lib, plus the full strategy_tests binary (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::storage is private upstream, which breaks code using it through dpp::dash_spv (core_spv) or dash_sdk::dash_spv. DashSpvClient takes no storage type parameter or argument, and DashSpvClient::is_running is synchronous.
  • Errors from opening the SPV storage in SpvRuntime::start / clear_storage now come through SpvError, 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.
  • Platform's own public API (SpvRuntime, FFI, JNI) is unchanged. Consensus is unchanged.

Follow-ups (not in this PR)

  • rust-dashcore: a way to clear storage without building a client would let clear_storage skip opening the managers.
  • rust-dashcore: tip_header / header_at hold the storage mutex while waiting for the header lock (the old Platform code released it first). This adds latency but cannot deadlock.

Checklist:

  • I have performed a self-review of my own code
  • My Rust, FFI, WASM, Swift or Kotlin changes follow the coding conventions
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed
  • If I added or changed GroveDB structure, I described it in the area's structure.rs, regenerated grovedb-structure.json, and checked the structure viewer link posted on this pull request

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

PR Hygiene · 1456fbb

  • Bots — coderabbitai skipped by shumkov · thepastaclaw ✓
  • Self-review — post /self-reviewed
  • Build green
  • Approvals
    • files with no dedicated owner — you own it
    • rs-platform-wallet (packages/rs-platform-wallet/src/spv/runtime.rs) — HashEngineering or ZocoLini or llbartekll or romchornyi

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

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]>
@github-actions github-actions Bot added this to the v5.1.0 milestone Oct 19, 2026
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai not yet · thepastaclaw ✓. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Oct 19, 2026
@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: dashpay/platform/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2f044fe1-c653-43d8-a16b-6afd3829b0b7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thepastaclaw

thepastaclaw commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit 1456fbb)

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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: normal by gpt-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); agent phase1-reviewer, muse-spark-1.3-contributor — rust-quality (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-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; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort high); agent phase2-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.

@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai review

No review for 1456fbbd yet, so PR Hygiene is asking once. If nothing arrives, the requirement is dropped for this commit and the pull request is labelled bot-review-skipped.

@shumkov

shumkov commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

/skip-bots

@github-actions

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Oct 20, 2026
@github-actions github-actions Bot added the bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. label Oct 20, 2026
@shumkov

shumkov commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

/self-reviewed

@shumkov
shumkov merged commit c91d29d into v5.1-dev Oct 20, 2026
28 of 29 checks passed
@shumkov
shumkov deleted the shumkov/v51-rust-dashcore-dev-bump branch October 20, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. waiting-self-review Waiting for the author to post /self-reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants