Litecoin getwork specification, endianness


Please help me with getwork protocol for litecoin miner.There is mixed info online about endiannes of data provided by getwork and data that should be submitted to mining pools.

According to the data recieved has to be split into parts and each part has to be be byteswapped to little endian(even the 32byte merkle root has to be byteswapped so 31'th byte is 1'st and so on).

According to pooler's implementation in java the header is byteswapped per 4 byte chunks.

And then after hashing this header with scrypt, I don't know if I am supposed to check first bytes or last bytes in hash because of endianness.

I am implementing getwork because I have code for stratum, but i am lost in all the endianness so I want to implement getwork to get all endian issues sorted and then use stratum to generate block headers according to rest of the "proper" spec.

I suppose Bitcoin and litecoin may have same specification, but i am not sure.


Posted 2014-01-02T18:00:04.857

Reputation: 11

No answers