Subject: Re: [Bitcoin-development] Lexicographical Indexing of Transaction Inputs and Outputs

From: Kristov Atlas <[email-masked]>
Date: Sat, 6 Jun 2015 02:24:47 -0400

Hey Stephen,

Thanks for your feedback

On Fri, Jun 5, 2015 at 11:20 PM, Stephen <[email-masked]>
wrote:

>  - I think your explanation of sorting could be significantly shortened
> and clarified by simply saying that the TXIDs of inputs should be compared
> as uint256 integers.
>

I considered defining the comparison of txids in terms of integers;
however, I am concerned that this definition may be ambiguous when applied
to a variety of languages and platforms without a similar amount of
explanation as currently exists. For example, if a web wallet uses an API
to receive transaction information, this is traditionally expressed in
terms tx id strings rather than 256-bit integers. My intent is that wallets
can implement the algorithm however they wish, but should ensure that their
output is compliant with the BIP definition. IMHO the algorithm stated in
the BIP should target test cases rather than implementation, and should
leave as little room for ambiguity as possible.