Author

Topic: Little endian values in Block-header (Read 179 times)

brand new
Activity: 0
Merit: 0
November 20, 2018, 04:57:37 AM
#3
I have gone through your post and seen the information that you have shared here. But I got only minimal information from your article. Since I am interested to know more, share additional data ta the earliest. who provides cable service in my area
administrator
Activity: 5222
Merit: 13032
November 18, 2018, 06:11:59 PM
#2
The Merkle root is also little-endian...

As to why, it's because the fields are read/written directly between memory and the socket, and that's how the data is ordered in memory. Integers are little-endian in memory because that's how the supported architectures do things. It's a little weird that hashes are stored little-endian, but Satoshi put most hashes in a uint256 type which behaved how you'd expect a 256-bit integer to behave on eg. x86, including little-endianness.
member
Activity: 99
Merit: 91
November 18, 2018, 04:39:56 PM
#1
Does anyone have any idea why Satoshi made all values in the block-header stored as little endian in byte code except for the Merkle root?  It is a frustrating thing when working with code and I can't figure out why it would have been done this way?  Any guesses or thoughts or reasonings for this?
Jump to: