Closed jgillich closed 6 years ago
Yes, that part was challenging. I also did not find a proper documentation for the stratum protocol that is used for Monero mining pools.
The start is somehow the stratum protocol for Bitcoin pools: https://en.bitcoin.it/wiki/Stratum_mining_protocol
The Monero version is derived from that and you get the rough idea of how the protocol works.
For client side details much is based on the C implementation in https://github.com/fireice-uk/xmr-stak-cpu Another source was one of the pool server implementations: https://github.com/zone117x/node-cryptonote-pool From that parts I could make an implementation that works :)
I did only understand num_target after reading "Understanding Bitcoin" by Pedro Franco, where a same scheme for Bitcoin is described where a compacted target is used.
I did look at various C/C++ implementations, but they're doing lots of pointer magic that just isn't possible in type safe languages. But thanks to you, I managed to get my Go version working. :)
Now on to OpenCL and CUDA, ha.
while nonce <= 65535 {
Why are you trying 0 -> 0xFFFF nonce wise? In my experience, most nonces are larger than that?
Hi @Ragnaroek,
I'm trying to understand your work_job function and what all the values mean (primarily nonce & the loops, as well as num_target). What information did you use to implement it? It's really difficult to find anything at all about this, since documentation for Stratum is basically non-existent.
Thanks!