Lexicographical Indexing of Transaction Inputs and Outputs



Summary:

In 2015, Kristov Atlas made a pull request to add an informational BIP 79 to the bips directory. Peter Todd suggested that the use-case of SIGHASH_SINGLE was highly specialized and that it would be better to stick to the use-cases where the need is clear and there exist running code. Todd advised presenting the BIP in terms of a generic statement with a focus on the fact that the spirit of what the BIP is about is applicable, and future standards should be developed. Todd also recommended removing the "handling input/output deps" section. As for the actual ordering algorithm, Todd suggested sorting txids as little-endian byte arrays and outputs by largest/smallest amount first. Additionally, he stated that amounts are 8 bytes, while P2PKH scriptPubKeys are 25 bytes. Finally, Todd said that it was unlikely to make this an IsStandard() rule anytime soon.


Updated on: 2023-06-09T22:13:34.270027+00:00