[RFC] Canonical input and output ordering in transactions



Summary:

In an email thread, Danny Thorpe discussed how the Open Assets colored coin protocol (CoinPrism) places special significance on the zeroth input and the position of the OP_RETURN colored coin marker output. He noted that reordering the inputs or outputs would break the colored coin representation, and while recommending sorting of the inputs and outputs as a best practice is fine, it should not be part of IsStandard() or consensus rules due to certain cases where the order of the inputs and outputs is significant. Peter Todd chimed in to mention that timestamping is another case where order matters, as putting the digest in the last vout can reduce the size of the timestamp proof using SHA256 midstate's. Overall, they concluded that there was no need to rush any changes to IsStandard().


Updated on: 2023-06-09T22:18:35.431053+00:00