0

As mentioned on this Hardfork Wishlist, many developers want Bitcoin to be entirely Big Endian for consistency and performance reasons.

I'm looking for a concise list of all the areas that Bitcoin uses data in Little (or Big) Endian format so I can create an "endian coin" just for the purposes of testing capacity and performance.

2

All numeric values on the wire are little-endian with the exception of network addresses and ports, which are big-endian. This includes Sha-256 digests which are treated as 32-byte numbers. It does not include data pushed on to the script stack, however, which is copied as-is from the script element.

The regular numbers aren't really a problem since you end up shifting the bytes to form the internal numeric value in either case. But the 32-byte values are expensive since you end up allocating a new byte array to reverse the bytes as you go to/from the wire protocol byte stream.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.