-
Notifications
You must be signed in to change notification settings - Fork 58
fix(platform-wallet): fold per-account records into one wallet-level row, owned roles winning collisions #4438
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
Merged
QuantumExplorer
merged 5 commits into
dashpay:v4.2-dev
from
HashEngineering:fix/multi-account-record-fold
Aug 28, 2026
+1,243
−42
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
83264aa
fix(platform-wallet): fold per-account records into one wallet-level …
bfoss765 6eae914
fix(platform-wallet): owned output role wins index collisions in the …
HashEngineering 8b074a4
fix(platform-wallet): complete the wallet-level fold at every observa…
QuantumExplorer a141ee7
Merge remote-tracking branch 'origin/v4.2-dev' into pr-4438-merge
QuantumExplorer 2fbc7b6
fix(platform-wallet): emit the folded row into every involved account…
QuantumExplorer 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
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.
[P1] Preserve provider-account transaction involvement
Only
cs.recordspopulates transaction rows, so after folding, the transaction callback is emitted solely for the funding account; siblingaccount_recordsbuckets contain UTXOs but no transaction. Both Swift and Kotlin create provider-special account involvement from the enclosing transaction callback, and restart restoration selects provider transactions through that involvement. A ProReg/ProUp transaction funded by a Standard account but also matching Provider Owner/Voting accounts is therefore recorded only as Standard and disappears from provider restoration/masternode aggregation after restart until a rescan. Preserve transaction involvement for every owned account slice—either emit the folded row into each involved account bucket or add an explicit involvement projection—while retaining the single wallet-level transaction values.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.
Fixed in 2fbc7b6. Verified the finding first: Swift's
upsertTransactionappends the enclosing bucket's account toinvolvedAccountsand Kotlin writesTransactionAccountInvolvementEntity(txid, account.id)— both only from the per-bucket transaction callback, so funding-bucket-only emission did drop payload-only provider involvement.from_changesetnow emits each folded row into the bucket of every account that owns a slice of its txid (funder included, deduped). The row's values are identical in every bucket — the persisted row is txid-keyed and account-agnostic, so duplicate upserts converge — and only the enclosing bucket differs, which is exactly what the involvement join records. TXO deltas stay slice-bucketed.Pinned by two tests:
txos_route_to_their_owning_accounts_bucketnow asserts both buckets carry the row with identical wallet-level values, and the newpayload_only_provider_account_still_receives_the_transaction_rowmodels the reported shape — aProviderOwnerKeysslice with no input/output details still receives the row. Side benefit: a bucket carrying a TXO now always carries its parent transaction row.