chore: backport v3.1-dev into feat/platform-wallet + DPNS suffix fix + UTXO double-spend prevention#3465
chore: backport v3.1-dev into feat/platform-wallet + DPNS suffix fix + UTXO double-spend prevention#3465lklimek wants to merge 41 commits into
Conversation
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ement (part 1) (#3393) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…#3427) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…n encode + exclusions (#3431) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… converters, and replacement (#3428) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…r FFI (#3433) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Borja Castellano <borja.castellano@dash.org>
…3434) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… API (#3423) Co-authored-by: PastaClaw <thepastaclaw@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Quantum Explorer <quantum@dash.org> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… validation (#3438) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ncoding (#3439) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
#3441) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…zation, and address witness (#3440) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…erations, and diff (#3437) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…3442) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…erage (#3443) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…d vote resolution (#3449) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…scripts, and asset lock proofs (#3450) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…and identity nonces (#3453) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…s, and asset lock proofs (#3452) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ments, and methods (#3454) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… keys in creation (#3456) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ncy action, and destroy frozen funds (#3459) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…height (#3464) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…-into-platform-wallet # Conflicts: # Cargo.lock # Cargo.toml # packages/rs-platform-wallet/src/platform_wallet_info/wallet_info_interface.rs
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
📖 Book Preview built successfully. Download the preview from the workflow artifacts. Updated at 2026-04-09T10:50:02.635Z |
- SDK: resolve_dpns_name() now handles ".DASH", ".Dash" etc. via eq_ignore_ascii_case (backport of dash-evo-tool PR #810 fix) - platform-wallet: send_transaction() now calls check_core_transaction() after signing to mark spent UTXOs before broadcast, preventing concurrent callers from selecting the same inputs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Merges 39 upstream
v3.1-devcommits intofeat/platform-walletand adds two targeted fixes backported from dash-evo-tool. Thefeat/platform-walletbranch hosts the newrs-platform-walletcrate — wallet logic extracted from dash-evo-tool into platform so both DET and the Swift SDK can share it.What moved from dash-evo-tool to this repo
The
feat/platform-walletrefactor createdpackages/rs-platform-wallet/with code previously in dash-evo-tool:src/spv/manager.rs— SPV lifecycle, event handling, broadcastrs-platform-wallet/src/spv/{mod,runtime,event_forwarder}.rs— rewritten aroundWalletManagersrc/backend_task/dashpay/dip14_derivation.rs— DIP-14 key derivationrs-platform-wallet/src/wallet/dashpay/dip14.rssrc/model/wallet/asset_lock_transaction.rs— asset lock trackingrs-platform-wallet/src/wallet/asset_lock/rs-platform-wallet/src/wallet/core/wallet.rs— unifiedCoreWalletThe old
MempoolManageris eliminated.WalletManager<PlatformWalletInfo>handles transaction processing directly, with IS locks arriving as events viaSpvEventForwarder→ broadcast channel.Meaningful changes
Backported from v3.1-dev (39 commits)
drive-abci,dpp,drive,platform-value(token operations, identity state transitions, vote resolution, document serialization)88e8a9aaFix: Case-insensitive
.dashsuffix (SDK)File:
packages/rs-sdk/src/platform/dpns_usernames/mod.rsresolve_dpns_name()stripped the.dashsuffix usingsuffix == ".dash"— case-sensitive. Inputs like"Alice.DASH"or"alice.Dash"would fail to match, causing the full string (including.dash) to be normalized and used as the label → DPNS lookup miss.Fix:
suffix.eq_ignore_ascii_case(".dash")— matches any casing of the.dashsuffix.Backported from dash-evo-tool PR #810 which fixed the same bug in DET's local DPNS helpers.
Fix: UTXO double-spend prevention (platform-wallet)
File:
packages/rs-platform-wallet/src/wallet/core/wallet.rsCoreWallet::send_transaction()had a race window:self.state, drops it)Between steps 1 and 3, concurrent callers could select the same UTXOs. The network rejects the conflicting transaction (no IS lock issued), but the user sees a failed payment with no clear error.
Fix: After signing (step 5), acquire write lock and call
check_core_transaction(&tx, TransactionContext::Mempool, true, true)to immediately mark spent UTXOs in the wallet state. The lock is dropped before the async broadcast. This mirrors the fix in dash-evo-tool v1.0-dev commitf4d3b3b3which calledprocess_mempool_transaction()for the same reason.Conflict resolutions
Minimal — only 2 overlapping files:
Cargo.lockCargo.tomlrs-platform-walletworkspace member + theirs dependency bumps (rust-dashcore)Companion PR
🤖 Co-authored by Claudius the Magnificent AI Agent