fireice-uk / xmr-stak-cpu

Monero CPU miner
GNU General Public License v3.0
1.11k stars 478 forks source link

Difficulty changed. Now: xxxx. #399

Open fogoat opened 7 years ago

fogoat commented 7 years ago

Can someone explain to me how xmr-stak-cpu knows what the share difficulty has changed to?

Is the share difficulty a number that is explicitly sent from the pool to miner? Perhaps it is a hex value, or otherwise encoded? Or is this a calculation based off what the pool sends to the miner?

Would something like this be a valid message from the pool to miner?

Can someone explain what each field (id, job, blob, job_id, target, etc) means?

{"id":1,"jsonrpc":"2.0","error":null,"result":{"id":"961416681902483","job":{"blob":"0202d7d6e5cf05c206d943dfebf8db836932217bb5c78c65832822f55f9e0f4628f541f3dfa24700000000f25a63c5d8dfff80732ba4ba299ac3cdaf045eb1eafa424bbfafe22b559bed3201","job_id":"209956375905312","target":"9bc42000"},"status":"OK"}}

This gets me closer to the answer, but I still don't understand what each field means: https://monero.stackexchange.com/questions/6122/answer-to-pool-request

vibhas77 commented 7 years ago

Difficulty for the miners is decided by the pool.

fogoat commented 7 years ago

Difficulty for the miners is decided by the pool.

You can submit fixed difficulty request to some pools. So, difficulty in those cases is decided by the miner. You are correct though when a pool uses vardiff (variable difficulty), the difficulty is adjusted by the pool.

Your answer doesn't help answer my question though. Thanks for trying.