Is the bit encoding format for the graphic in BIP 68 implicitly little-endian?

4

CLTV (OP_CHECKLOCKTIMEVERIFY - absolute locktime) and CSV (OP_CHECKSEQUENCEVERIFY - relative locktime) utilize BIP 68. Is the locktime for those two operations implicitly encoded in little-endian format?

Byte swapping associated with endianess has a very serious impact on the semantics for lock types (i.e., absolute, relative) and locktime value units (i.e., block number, seconds). Would it be prudent/responsible for the BIP 68 Standard to make it clear whether the bit-encoding is natively little-endian or big-endian?

skaht

Posted 2019-01-08T18:30:19.977

Reputation: 2 588

Answers

2

All fields in a Bitcoin transaction are little-endian encoded except for the signature fields and the public key fields which are both DER and big-endian encoded since they were originally produced by an external library that uses these encodings.

Would it be prudent/responsible for the BIP 68 Standard to make it clear whether the bit-encoding is natively little-endian or big-endian?

I think this information belongs in the protocol documentation, not necessarily in the BIP.

Thorkil Værge

Posted 2019-01-08T18:30:19.977

Reputation: 637