Repository navigation
fix(platform-wallet): own per-wallet transaction accounting in Rust for SwiftData #5417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Claudius-Maginificent
wants to merge
29
commits into
fix/sqlite-asset-unlock-history-aliases
Choose a base branch
from
fix/swiftdata-transaction-accounting
base: fix/sqlite-asset-unlock-history-aliases
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
3e40057
fix(swift-sdk): reconcile SwiftData transaction accounting per wallet
lklimek 4413d32
fix(swift-sdk): report a received amount despite a contact's watch-on…
lklimek 7a282c9
fix(swift-sdk): scope linked outputs to the spending wallets in recon…
lklimek 70a1b30
fix(swift-sdk): reconcile accounting when a TXO heal completes a spend
lklimek bbb269c
chore: merge updated wallet base into Swift transaction accounting
lklimek 018f00f
fix(swift-sdk): preserve base V4 schema before accounting migration
lklimek a22e324
style(swift-sdk): align migration stage indentation
lklimek 94f9833
chore(platform-wallet): propagate reviewed SQLite capability fix
lklimek 9400fa3
Merge branch 'fix/pr-5126' into fix/swiftdata-transaction-accounting
lklimek accca0d
feat(platform-wallet): emit per-wallet transaction accounting to pers…
lklimek c081e87
feat(swift-sdk): persist Rust-emitted per-wallet transaction accounting
lklimek b59aa58
refactor(swift-sdk): drop the Swift-side transaction accounting deriv…
lklimek aa086b4
fix(swift-sdk): log the live schema version as the migration target
lklimek 98db33e
fix(platform-wallet): make the accounting backfill converge and match…
lklimek 651d1d5
fix(swift-sdk): mark per-wallet accounting backfills and stop scalar …
lklimek 01ceb6c
fix(platform-wallet): leave a wallet spend with an unresolved coin un…
lklimek 4b0879a
fix(platform-wallet-ffi): read accounting funding bodies strictly and…
lklimek 1144d8b
fix(swift-sdk): fail the accounting round on a transaction-row read e…
lklimek c1d068b
docs(platform-wallet): state the P2PKH premise of the owned-input check
lklimek 3a111c1
docs(swift-sdk): describe the open backfill in the V5 schema notes
lklimek f323849
fix(swift-sdk): report a failed tx-record fetch to Rust instead of a …
lklimek fa006bc
chore: merge fix/pr-5126 into PR 5417
lklimek be655b8
refactor(wallet): integrate accounting-only storage into Swift history
lklimek 7101253
fix(swift-sdk): expose accounting formatter and correct migration ass…
lklimek 1ea9eab
chore(swift-sdk): merge validated history prerequisites into accounting
lklimek 39a3319
chore: merge fix/sqlite-asset-unlock-history-aliases into PR 5417
lklimek 28a6650
fix(platform-wallet): follow the rust-dashcore hash API in transactio…
lklimek d8bbf50
test(swift-sdk): assert migrations land on the current schema version
lklimek f0e4ac3
Merge branch 'merge/5783-result' into fix/swiftdata-transaction-accou…
lklimek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 Blocking: Preserve persisted transaction identities through the SwiftData backfill
CoreHistoryTransactionFFI carries only transaction bytes, and the native history input similarly loses the stored transaction key. That key cannot always be reconstructed with today's Transaction::txid(): historical AssetUnlock v2 records can legitimately be keyed by instance_hash(), as the SQLite historical-identity implementation and fixtures in this range recognize. Swift originally stores TransactionRecordFFI.txid unchanged, but history_accounting emits the newly computed canonical id. upsertTransactionAccounting cannot find the historical row under that id, silently returns success, and allows the completion marker to commit. Carry the persisted identifier through the history contract, validate its canonical or historical identity in Rust, and emit accounting attached to the actual persisted row. Cover the historical AssetUnlock fixture through the SwiftData callback path.
source:
gpt-6.1-sol(phase2-reviewer: general, architecture-layering, ffi-engineer, platform-versioning, rust-quality, security-auditor)