<p>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. </p>

<p>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. </p>

CC BY-SA 3.0
2017-11-01T09:20:58.163Z
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
CC BY-SA 3.0
2017-11-01T09:22:14.657Z
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
CC BY-SA 3.0
2017-11-01T09:23:30.657Z
sorry i meant control the submission of shares.
MSD
CC BY-SA 3.0
2017-11-21T00:12:48.340Z
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
CC BY-SA 3.0
2017-11-21T00:14:06.253Z
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
CC BY-SA 4.0
2022-07-26T18:00:54.007Z
So what does the 2 mean? ie “params”: [2] .. I’ve seen 8192 used as well. That’s a big difference.
andrewz
CC BY-SA 3.0
2017-11-01T07:20:58.163Z
2017-11-01T07:20:58.163Z
Claris
<p>On the Stratum protocol the server may issue the following notification:</p>

<pre><code>{ "id": null, "method": "mining.set_difficulty", "params": [2]}
</code></pre>

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

<p>Source:
<a href="https://slushpool.com/help/manual/stratum-protocol" rel="nofollow noreferrer">https://slushpool.com/help/manual/stratum-protocol</a></p>

<difficulty><stratum>
What is a Stratum "mining.set_difficulty" command for?
MSD
# What is a Stratum "mining.set_difficulty" command for?

(Asked by: username_0 on 2017-11-01)

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>

**Tags:** difficulty, stratum


---

## 1 answers

### Answer by username_1 on 2017-11-01. Score: 2 | Accepted answer

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.

> **Comments:**
> **username_0**: 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?  
> **username_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.  
> **username_0**: sorry i meant control the submission of shares.  
> **username_2**: 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)?  
> **username_1**: 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.  
> **username_3**: So what does the 2 mean? ie “params”: [2] .. I’ve seen 8192 used as well. That’s a big difference.  

---

