Skip to content

Wallet: Randomize selected transaction inputs - #1323

Open
Tabakkui wants to merge 1 commit into
RavenProject:developfrom
Tabakkui:fix/issue-1086-wallet-input-order
Open

Tabakkui wants to merge 1 commit into
RavenProject:developfrom
Tabakkui:fix/issue-1086-wallet-input-order

Conversation

@Tabakkui

Copy link
Copy Markdown

Problem

Issue #1086 reports that wallet-created transactions serialize selected inputs in deterministic COutPoint order, which can expose a wallet-specific input-order fingerprint to observers. The current CreateTransactionAll path 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/FastRandomContext helper, rebuild txNew.vin, and sign from that same shuffled vector. Output construction and consensus validation are unchanged.

Test plan

  • git diff --check — PASS
  • python3 -m py_compile test/functional/wallet_create_tx.py — PASS
  • python3 test/functional/wallet_create_tx.py --help — PASS
  • Static ordering regression gate — PASS; the equivalent check against the pre-fix develop source fails as expected.
  • Full wallet_create_tx.py functional execution was attempted but is blocked in this checkout because no built ravend binary is available (FileNotFoundError).
  • C++ syntax-only compilation was attempted but is blocked by the checkout's missing Boost header boost/signals2/last_value.hpp.
  • Full Ravencoin build and Boost/functional tests require the authorized PC build environment.

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant