bitcoin-dev

Transaction Input/Output Sorting

Transaction Input/Output Sorting

Original Postby rhavar at protonmail.com

Posted on: October 21, 2018 19:00 UTC

The boundaries between different wallets are too easily identifiable due to the way wallets sort transaction inputs and outputs, with some wallets having a strong preference for deterministic sorting.

However, other wallets object to this, citing privacy loss during the transition period and future incompatibility issues. The author suggests a solution to this impasse through deterministic sorting based on a semi-secret. This would involve computing or storing the "sortingSecret" and using a standardized sort order based on the sortingSecret such as sorting inputs/outputs by the hash(data || sortingSecret). This approach has the advantages of deterministic sorting while verifying correctness and appearing externally randomized.