I just started looking into the Ethash algorithm and I saw this:
s = sha3_512(header + nonce[::-1])
The thing is that here, nonce is an integer, and they used
[::-1] to bitswap it from big endian to little endian? My question is what python version allows this? Every single one I tested gave me an
__getitem__ not defined. As I also want to see in which version of python we can manipulate bits like this, I'm not searching for an alternative big to little endian conversion, I just want to know how did they get this working?
Also, in the algorithm, they say they combine header and nonce into a 64bit seed through this
sha3_512 call. So how should header and nonce be? as hex string? integers? Should I convert nonce to an hex string so it can easily be added to header? This line lost me in their algorithm :/