dcrd/dcrutil/txsort/testdata/tx150626-24.hex
Dave Collins 8922295ae5
txsort: Implement stable tx sorting package.
This adds a new package under dcrutil named txsort which implements a
standard lexicographical sort order of transaction inputs and outputs.
This is useful to standardize transactions for faster multi-party
agreement as well as preventing information leaks in a single-party use
case.  It is a modified form of BIP69 which has been updated to account
for differences with Decred-specific transactions.

The sort order for transaction inputs is defined as follows:
- Previous transaction tree in ascending order
- Previous transaction hash (treated as a big-endian uint256)
  lexicographically in ascending order
- Previous output index in ascending order

The sort order for transaction outputs is defined as follows:
- Amount in ascending order
- Public key script version in ascending order
- Raw public key script bytes lexicographically in ascending order
2017-12-08 11:22:21 -06:00

1 line
720 B
Plaintext

01000000017a57ac44c7ccfa52ddbf32fda4496d80bd7c6d393d1383bfbd19ac5e1a7a9bce0000000000ffffffff050065cd1d0000000000001976a914b79fab0aab795fbfb31e0b9a3fd3ec9c1b0ed46188ac0065cd1d0000000000001976a91481a367146247420f34463550e9b3189b13a9490c88acfc34eb0b0000000000001976a914f8f44bc7e0599e22aa3042bcf05c420793a45da088ac0065cd1d0000000000001976a9141792ffe5e62b61ecd42cabb9c857860483cbc63388ac0065cd1d0000000000001976a914064b39a4e7d58fae62c91bf5a9170597df77081f88ac0000000000000000010056218300000000614c0200010000006b483045022100ea303b2850d5fef3aa698897436fbb2cbe74b965ba647ac87e61d7a2a44cc7a202203cb92a575c87044360ee15deb9598608bd2d42fc8571fa44a43f1bcc94ae8e4d01210394f574c4176f770e77ab85b717caa16dc0f3d3dd0a7f64b1bb34aaac12a9880e