Conversation
Keep deterministic input order for fee sizing, then shuffle the selected RVN and asset inputs before rebuilding and signing the transaction. This prevents the wallet from exposing its coin ordering while preserving asset transaction handling. Refs RavenProject#1086
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.
Problem
Issue #1086 reports that wallet-created transactions serialize selected inputs in deterministic
COutPointorder, which can expose a wallet-specific input-order fingerprint to observers. The currentCreateTransactionAllpath also has asset inputs, so the fix must preserve asset handling and sign every input at its final index.Approach
Keep the deterministic order through dummy signing and fee-size calculation. After sizing, combine the selected RVN and asset inputs, shuffle them with the existing
Shuffle/FastRandomContexthelper, rebuildtxNew.vin, and sign from that same shuffled vector. Output construction and consensus validation are unchanged.Test plan
git diff --check— PASSpython3 -m py_compile test/functional/wallet_create_tx.py— PASSpython3 test/functional/wallet_create_tx.py --help— PASSdevelopsource fails as expected.wallet_create_tx.pyfunctional execution was attempted but is blocked in this checkout because no builtravendbinary is available (FileNotFoundError).boost/signals2/last_value.hpp.Risk and exclusions
This is a wallet transaction-construction and privacy hardening change. It does not change consensus rules, transaction serialization formats, asset output ordering, or asset validation. The focused regression exercises ordinary multi-input wallet transactions; asset input signing remains covered by the shared shuffled-input signing path.
Fixes #1086