Repository navigation
chore(platform)!: update rust-dashcore to v0.45.0 - #5517
Conversation
Pin every rust-dashcore dependency to d631aaca (tag v0.45.0), which adds these backported fixes on top of a40daba7: #1147, #1187, #1059, #1140, #1014, #1015, #1009, #1035, #1037 and #1143. Cargo.lock moves only the rust-dashcore sources. key-wallet's WalletInfoInterface gained two methods, and PlatformWalletInfo now forwards both to its inner ManagedWalletInfo: - unrecorded_spend_heights (required, #1015): lets WalletManager::process_block_for_wallets report the block of a spend processed before its funding, so dash-spv re-applies it and the spend is recorded. - note_chain_lock_height (no-op default, #1014): carries the heights of the chainlocks dash-spv holds back during the initial sync, so observed spends are pruned as the sync goes instead of growing until it ends. The late-InstantSend workaround in mark_instant_send_utxos stays; with #1037 in the pin it is a no-op, and its comment now says so. Tests drive WalletManager<PlatformWalletInfo>, the type dash-spv calls. Without the delegations they fail: - note_chain_lock_height forward removed: the prune test fails ("a spend below the noted chainlock height is final"); forwarding the synced height instead also fails it. - unrecorded_spend_heights forward removed: E0046; with an empty-set body the re-apply test fails (left: {}, right: {wallet: {200}}). Both pass with the delegations. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…lied-chainlock only The sweep-tombstone collectors (SQLite collect_finalized_tombstones and its Swift and Kotlin mirrors) were documented as key-wallet's prune_finalized_observed_spends condition "verbatim". Since rust-dashcore v0.45.0 (#1014) key-wallet also prunes up to the heights of the chainlocks dash-spv holds back during the initial sync. Those are never persisted, so the stored chainlock_height counts applied chainlocks only and its half of the boundary can trail key-wallet's: a tombstone may be held longer than the in-memory entry, never dropped sooner. Comments and SCHEMA.md only; no behaviour change, so no test. The V007 migration edit is to its module docs; refinery checksums the rendered SQL, which is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
Waiting for bot review — coderabbitai ✓ · thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
|
✅ Final review complete — no blockers (commit 4ba7785) · triage: normal |
|
This PR has partial overlap with changes already present in v5.1-dev. Please verify compatibility. |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
Static verification of the complete PR range at 4ba7785 found no actionable in-scope defects: both new trait methods delegate to the upstream owner, and persistence changes are documentation-only. Current CI has no failed checks; Kotlin build/tests and Swift schema checks passed, while Rust workspace tests remain pending. No builds or tests were run locally.
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) — The dependency update and wallet-method forwarding warrant ordinary review, but the diff does not itself introduce large or intricate changes to critical logic, and the storage migration edits are explanatory comments. - 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
Out-of-scope follow-up suggestions (1)
These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.
- Follow up on the existing SPV block-body authentication gap — The pinned rust-dashcore revision accepts requested blocks in dash-spv/src/sync/blocks/sync_manager.rs without checking their transaction Merkle root. A malicious peer can preserve the requested header while substituting transactions, potentially corrupting wallet balances or spend state. This path is unchanged from the previous dependency pin, so it is not introduced or worsened by this PR. The default upstream branch includes the validation and duplicate-transaction rejection from dashpay/rust-dashcore#1169.
- Follow-up: Track adoption of rust-dashcore#1169 through a compatible release or upstream backport in a separate Platform issue or maintainer-requested dependency update.
|
Bots are done — your move: post |
Issue being fixed or feature implemented
Platform v5.0-dev pins rust-dashcore at
a40daba7(integration/v5.0-core-v24with #1204). rust-dashcore v0.45.0 has been released (tagv0.45.0= merge commitd631aaca, master, rust-dashcore#1208). It contains everythinga40daba7has, plus these backported fixes:rpc-client: request arguments and results are no longer written to thedashcore_rpcdebug/trace logs, since they can carry credentialsllmq_test,llmq_devnet,llmq_devnet_dip0024,llmq_test_platformandllmq_devnet_platformnow match Dash Core'sparams.h. Mainnet and testnet types are unchangedMasternodeListEngine::verify_chain_lockrejects a ChainLock signed above the newest masternode list. Before, if the list below the signing height refused it and no list above existed, the check fell through toOk(())headersmessages above Core's 2000-header batch limit (andheaders2above 8000) are rejected before allocatingnote_chain_lock_height)unrecorded_spend_heights), and dash-spv re-applies that stored blockWhat was done?
Cargo.tomlnow point tod631aaca3632cc713143476e363c9a9aca038d2e(v0.45.0). InCargo.lockonly the 12 rust-dashcoresourcelines change; nothing else is re-resolved.PlatformWalletInfonow forwards the two newWalletInfoInterfacemethods to its innerManagedWalletInfo:unrecorded_spend_heightsis a new required method; without itplatform-walletdoes not compile (E0046). Forwarding it letsWalletManager::process_block_for_walletsfillreapply_heightsfor Platform wallets. dash-spv then re-applies the spend's block and the spend is recorded. Before, Platform only worked around this case with itsObservedSpentverdict.note_chain_lock_heighthas a default no-op. Without the forward, chore(release): update changelog and bump version to 0.24.0-dev.31 #1014 would never run for Platform wallets: the noted height would never reach the inner wallet, andobserved_spent_outpointswould keep growing for the whole initial sync (on the order of a million entries on a mainnet restore).platform_wallet_traits.rsdriveWalletManager<PlatformWalletInfo>, the type dash-spv calls:min(noted, synced), keeps those above, and does not count as an applied chainlock;reapply_heights, and applying that block again records the spend.collect_finalized_tombstonesand its Swift/Kotlin mirrors) as key-wallet'sprune_finalized_observed_spendscondition "verbatim". That is no longer accurate. key-wallet now also prunes against the noted heights, which are in memory only. Platform persists only applied chainlocks (chainlock_height), so the collector's chainlock half can trail key-wallet's but never lead it: a tombstone may be held longer, never dropped early. The comments in the Rust storage,SCHEMA.md, the V007 migration doc, the changeset docs and the Swift/Kotlin persistence handlers now say so. Comment-only changes; refinery checksums only the rendered SQL, so the migration doc edit is safe.PlatformWalletInfo::mark_instant_send_utxosstays. With fix(dashmate): set permissions for dashcore log file #1037 it is redundant but harmless (it restores contexts the inner wallet no longer changes). It will be removed in a separate follow-up (platform-wallet: remove the mark_instant_send_utxos wrapper once the rust-dashcore pin carries #1037 #5430).Impact
Nodes (Drive / rs-dapi): The only change is that
dashcore-rpcno longer logs request arguments or results. There is no behaviour, consensus or protocol-version change. Drive, DPP and the SDK never readLLMQParams, and Drive does not useMasternodeListEngineor decode P2Pheaders.Clients (platform-wallet / SDK SPV):
Stored formats
Unchanged. The only new persisted-type field upstream is
ManagedWalletInfo::noted_chain_lock_height, which isserde(skip). There are no bincode derive changes. Platform rebuildsManagedWalletInfofrom typed rows. Thepersisted_core_transactionsgolden rows decode and re-encode unchanged.How Has This Been Tested?
Local runs on macOS (arm64), cargo 1.98.1:
cargo fmt --all -- --check: cleancargo check --workspace --all-targets --locked: passcargo clippy --workspace --all-targets --all-features --locked -- --no-deps -D warnings: passcargo test -p platform-wallet -p platform-wallet-ffi: 1734 passed, 0 failed, 6 ignored (doctests included; noshieldeddoctest collision)cargo test -p platform-wallet-storage: 978 passed, 0 failed, 3 ignoredcargo test -p platform-wallet-storage --test integration persisted_core_transactions: 1/1 (golden rows unchanged)cargo test -p drive-abci --lib core_chain_lock: 18/18cargo test -p dash-sdk --lib: 329/329cargo test -p dpp --lib: 5652 passed, 6 ignoredBoth new tests fail without their delegation:
note_chain_lock_heightforward removed (the trait default no-op applies):should_prune_observed_spends_up_to_a_noted_chain_lock_heightpanics with "a spend below the noted chainlock height is final". Forwarding the synced height instead of the noted one also fails it ("a spend above the noted chainlock height is not final yet").unrecorded_spend_heightsforward removed: E0046, so it cannot compile. With the body stubbed toBTreeSet::new():should_ask_to_reapply_the_block_of_a_spend_seen_before_its_fundingfails withleft: {},right: {<wallet_id>: {200}}.Not run locally: the full workspace / strategy test suites, wasm32 builds and the mobile builds. CI covers them.
Breaking Changes
This changes the public API of the rust-dashcore crates Platform re-exports and builds on. It affects Rust consumers that implement or construct these types themselves:
WalletInfoInterface::unrecorded_spend_heightsis a new required method.WalletInfoInterface::note_chain_lock_heightandWalletInterface::note_chain_lock_heightare new methods with no-op defaults. A wrapper that delegates by hand must forward them, or chore(release): update changelog and bump version to 0.24.0-dev.31 #1014 never runs.key_wallet_manager::BlockProcessingResulthas a new public field,reapply_heights.Wallet::key_source_for_account_type(&AccountTypeToCheck, Option<u32>)was replaced bykey_source_for_account(AccountType).There are no consensus, protocol-version or stored-format changes.
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 ·
4ba7785/self-reviewedkotlin-sdk(packages/kotlin-sdk/sdk/src/main/kotlin/org/dashfoundation/dashsdk/persistence/PlatformWalletPersistenceHandler.kt,packages/kotlin-sdk/sdk/src/main/kotlin/org/dashfoundation/dashsdk/persistence/dao/DocumentDao.kt,packages/kotlin-sdk/sdk/src/main/kotlin/org/dashfoundation/dashsdk/persistence/entities/PendingInputEntity.kt) — HashEngineeringwallet-storage(packages/rs-platform-wallet-storage/SCHEMA.md,packages/rs-platform-wallet-storage/migrations/V007__utxo_sweep_winner_height.rs,packages/rs-platform-wallet-storage/src/sqlite/schema/core_state.rsand 1 more) — lklimekrs-platform-wallet(packages/rs-platform-wallet/src/changeset/changeset.rs,packages/rs-platform-wallet/src/wallet/platform_wallet_traits.rs) — HashEngineering or ZocoLini or llbartekll or romchornyiswift-sdk(packages/swift-sdk/Sources/SwiftDashSDK/Persistence/Models/PersistentPendingInput.swift,packages/swift-sdk/Sources/SwiftDashSDK/PlatformWallet/PlatformWalletPersistenceHandler.swift,packages/swift-sdk/SwiftTests/SwiftDashSDKTests/SweptTransactionPersistTests.swift) — 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.Summary by CodeRabbit
Improvements
Documentation
Tests