You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Big-endian is used for network communication (called network byte order).
Little-endian is used for internal storage in Bitcoin.
In Bitcoin all integers are encoded little-endian. This applies to bytes on the wire as well as how data is stored serialized on disk. I'm not sure what the Big-endian statement here applies to?
The text was updated successfully, but these errors were encountered:
Also worth noting, block hashes are interpreted as little endian integers during proof of work verification, but the term "endian" only applies to integers, not hashes. Somewhere in Bitcoin's history when the first human readable API was added, block hashes were reversed so they would look like big endian integers to humans. In my opinion this was an early mistake that just lead to decades of confusion ;-) Transaction hashes are also reversed for human consumption, but for no reason except that block hashes were being reversed already and at least there's some consistency!
https://bitcoindevs.xyz/decoding/endianness
In this section:
In Bitcoin all integers are encoded little-endian. This applies to bytes on the wire as well as how data is stored serialized on disk. I'm not sure what the Big-endian statement here applies to?
The text was updated successfully, but these errors were encountered: