<p>This is how you change the difficulty in Stratum:</p>

<p>go to mining/subscription.py</p>

<p>change</p>

<pre><code>self.connection_ref().rpc('mining.set_difficulty', [16,], is_notification=True)
</code></pre>

<p>to</p>

<pre><code>self.connection_ref().rpc('mining.set_difficulty', [32,], is_notification=True)
</code></pre>

<p>That will set the difficulty to 32 - or change to whatever value you want.</p>

CC BY-SA 3.0
2013-05-27T22:31:50.963Z
Will the 32 in: `self.connection_ref().rpc('mining.set_difficulty', [32,], is_notification=True)`
actually correspond to the SAME difficulty stated in the config of pushpool? So 20 in pushpool = 20 in that line you posted?
Robin Jonsson
CC BY-SA 3.0
2013-11-24T06:11:55.603Z
Note that this stratum server does not use the same definition of difficulty as the rest of mining. So if you want difficulty 32 shares, you need to use:

self.connection_ref().rpc('mining.set_difficulty', [31.99951171875,], is_notification=True)
Luke Dashjr
CC BY-SA 3.0
2013-05-27T14:58:25.123Z
2013-05-27T14:58:25.123Z
ethought
<p>I have a new question for you.</p>

<p>I have setup the stratum mining proxy, and all is working fine. (Actually found our first block recently!)
However, I have pushpool running as well, and some of my users still use it based on preference.</p>

<p>How can I be assured that people that use stratum isn't getting more shares than those who's using pushpool? Is there a way to set the difficulty on stratum? 
As of now i set the difficulty manually in pushpool's config file, with <code>rpc.target.bits</code></p>

<p>Help is appriciated!</p>

<mining-pools><difficulty><stratum><pushpool>
Matching pushpool difficulty with stratum's
Robin Jonsson
# Matching pushpool difficulty with stratum's

(Asked by: username_0 on 2013-05-19)

I have a new question for you.

I have setup the stratum mining proxy, and all is working fine. (Actually found our first block recently!)
However, I have pushpool running as well, and some of my users still use it based on preference.

How can I be assured that people that use stratum isn't getting more shares than those who's using pushpool? Is there a way to set the difficulty on stratum?
As of now i set the difficulty manually in pushpool's config file, with `rpc.target.bits`

Help is appriciated!

**Tags:** mining-pools, difficulty, stratum, pushpool


---

## 1 answers

### Answer by username_1 on 2013-05-27. Score: -1

This is how you change the difficulty in Stratum:
go to mining/subscription.py
change
self.connection_ref().rpc('mining.set_difficulty', [16,], is_notification=True)

to
self.connection_ref().rpc('mining.set_difficulty', [32,], is_notification=True)

That will set the difficulty to 32 - or change to whatever value you want.

> **Comments:**
> **username_0**: Will the 32 in: `self.connection_ref().rpc('mining.set_difficulty', [32,], is_notification=True)` actually correspond to the SAME difficulty stated in the config of pushpool? So 20 in pushpool = 20 in that line you posted?  
> **username_2**: Note that this stratum server does not use the same definition of difficulty as the rest of mining. So if you want difficulty 32 shares, you need to use:  self.connection_ref().rpc('mining.set_difficulty', [31.99951171875,], is_notification=True)  

---

