I am doing some tests to understand the stratum protocol. If I connect to a stratum pool (slush in this case), and check the data I receive after mining.authorize, I get the following previous hash:

stratum -> "178e01e62b03317addd01f9bc6b8243b76f90bd6000677d70000000000000000"

The last block at the time was height 613448 with previous hash:

from the blockchain -> "0000000000000000000677d776f90bd6c6b8243bddd01f9b2b03317a178e01e6"

It certainly looks as the discussion in this post mentions, that the previous hash could be considered as an array of 8 32-bit words that is byte swapped for each array element, and the array elements themselves are also reversed.

What is the reason behind this tricky byte order?

As some sha256 libraries work with uin32_t arrays I wonder if it might have something to do with it, maybe related to old mining ways, and how it became some kind of a standard. As the post attached mentions there is very few information about it.

Any comment is much appreciated.

  • The stratum protocol doesn’t make a lot of sense at the best of times. It’s almost impossible to optimize, and completely unsuitable for embedded environments. – Anonymous Jan 19 at 6:27

Your Answer

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

Browse other questions tagged or ask your own question.