4

On the Stratum protocol the server may issue the following notification:

{ "id": null, "method": "mining.set_difficulty", "params": [2]}

What is this difficulty used for? from my understanding the the difficulty is sent with the mining job as an encoded difficulty.

Source: https://slushpool.com/help/manual/stratum-protocol

1 Answer 1

2

The command is telling the miner not to send shares below the requested difficulty. If they were to send every difficulty 1 share for example, many pieces of hardware would be attempting to send hundreds of thousands of results a second. It’s simply flood control, and the only reason to send block shares at all (that are too low of a difficulty to be a block) is to prove to the remote stratum server that you’re doing work worth paying.

Many pools clamp at a lower bound of many tens of thousands of difficulty as of 2017, and many pieces of hardware aren’t even able to produce blocks with a lower difficulty than that. The miner really only needs to send share proofs every few minutes at most for the remote pool to have a reasonable confidence that they are mining at a particular speed for payout purposes.

6
  • thank you! so just to clarify the command is used to submit share to the pool and the difficulty sent with the job command is the actual target to successfully mine the block?
    – MSD
    Commented Nov 1, 2017 at 9:20
  • 1
    It’s a control message sent by the server at any time to control what the client is allowed to send in the future.
    – Claris
    Commented Nov 1, 2017 at 9:22
  • sorry i meant control the submission of shares.
    – MSD
    Commented Nov 1, 2017 at 9:23
  • Maybe not a good place to ask a "subquestion", but really for newbies there is no a lot of documentation around the place. @eponymous Do you know how to calculate target from difficulty you get form the pool for litecoin (is there difference related with calculating target comparing with bitcoin)?
    – cool
    Commented Nov 21, 2017 at 0:12
  • There's not much documentation on this sort of stuff other than going and reading the code, the number of people with experience using Stratum could fit on a bus. The Litecoin difficulty calculation is entirely different, they hash with SHA2 before doing the scrypt rounds. Best reading their source code to find out in detail how that works.
    – Claris
    Commented Nov 21, 2017 at 0:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.