Repository navigation
Conversation
…ed claims Share normalized Core metadata and UTXO restoration between SQLite and FFI. Append an authoritative spent-claim input to the FFI restore entry; hosts and native bindings must rebuild together. Preserve existing SQLite final-claim restoration and all history/proof replay. Swift/JNI claim producers stay empty pending engine deltas: legacy sweep stamps do not reliably identify the actual spending transaction. Validated with 238 targeted tests, formatting, and strict Clippy for wallet, storage, FFI and JNI. Apple builds were unavailable on Linux. <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>
Pin rust-dashcore PR #1113 at 6d5a7ba5 and persist engine claim batches atomically through SQLite, SwiftData and Room. Restore authoritative claims before history replay and preserve guarded inputs temporarily for pending-send record reconstruction. Require a fresh authoritative-claim store and rebuild native bindings together. Retain history/proof reconstruction and document the upstream late-InstantSend event gap. Validated with 253 targeted Rust tests, scoped formatting and strict CI Clippy. Swift and Android runtime tests require unavailable platform toolchains. <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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 |
Collaborator
|
🕓 Review not started yet because this PR is a draft.
Commit a4b1a88. Normal review starts when eligible; priority review starts as soon as a slot is available. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Basic explanation
TL;DR: Save the Core wallet engine's own reports of spent coins and restore them after restart.
Value: SQLite, iOS and Android persistence use the same source of truth for spent coins while preserving transaction history and accounting.
Risks: Existing development wallet stores require recreation and rescan, and native bindings must be rebuilt together. Mobile runtime validation remains outstanding. No consensus behavior changes.
User story
As a wallet user, I want restarting the wallet to preserve which coins are spent and the history of my pending payments.
Scenario
A wallet receives funds, sends a payment, saves its state and restarts.
Actual behavior: Storage reconstructs spending state from transaction history and sweep stamps, which can name a conflict winner rather than the actual spender.
Expected behavior: Storage saves the engine's spending decisions directly. Restoring them protects spent coins and retains pending-payment history, including sends with no change output.
Detailed discussion
Stacked on #5150: this PR targets
fix/pr-5126to isolate the follow-up. After #5150 lands, retarget tov5.1-dev. Uses dashpay/rust-dashcore#1113 at6d5a7ba5337aa2fab92f6ac3320e7cef456867f0; merge that dependency and move the pin to a merged revision before landing.Issue being fixed or feature implemented
Consume the engine's authoritative spent-outpoint changes instead of treating historical TXO/sweep stamps as claimant provenance. Related #5220 handles shared history replay; this change retains the history/proof reconstruction still needed for accounting.
What was done?
CoreChangeSet: upsert claims, then delete releases within each batch. Unknown claimants remain present claims.WalletRestoreEntryFFI.The upstream late-InstantSend sweep-event gap remains (dashpay/rust-dashcore#976; #1106 touches that path). Existing reservation-only abandonment is unchanged; a first-class removal API and retirement of remaining host history reconstruction are separate work.
How Has This Been Tested?
--all-targets --all-features --locked -- --no-deps -D warnings.Breaking Changes
In-place changes to shipped generations
None. This change does not modify versioned consensus behavior.
Checklist:
structure.rs, regeneratedgrovedb-structure.json, and checked the structure viewer link posted on this pull requestFor repository code-owners and collaborators only
🤖 Co-authored by Claudius the Magnificent AI Agent