Post
Topic
Board Pools
Re: Miner-defined difficulty for stratum protocol
by
zephen
on 07/01/2014, 02:47:28 UTC
> What is it you're trying to do that isn't already possible through pools that allow you to set your difficulty through Web UI?

Not every pool supports a web UI; if it were part of the protocol then it wouldn't matter.

> At least when implemented like BTC Guild, changing the setting in the Web UI instantly applies your setting to any active connections to stratum servers that you already have with that worker, on top of future connections.

That's nice to know.  Does BTC guild treat this as a minimum difficulty, and never set the difficulty below it?

>  And don't say you want to force it to stay at a certain level, variable difficulty is there for a reason and it would still take over if you're trying to get a difficulty from the pool that is too low for your hash rate.

Obviously.  In fact, quite the opposite -- it would be nice for the miner to be able to specify a hash rate he does not want to mine below (so the miner's final hash rate would be the maximum of his suggestion and the pool's requirement).

In addition to the nicety of the miner being able to set a lower bound on his difficulty, there is also the issue of when the pool wants to dynamically change the difficulty.

Whenever the pool wants to increase the difficulty, you occasionally have the small issue of stale shares that were mined before the miner received the updated difficulty message.  With the proposed protocol enhancement, the pool could accept these older shares, secure in the knowledge that the miner wasn't scamming the pool by holding them back until it received a higher difficulty -- because the difficulty targeted by the miner is actually declared in the new portion of the extranonce.  So with this format enhancement, there is no reason for the pool to ever reject a share with the with the old difficulty after changing difficulties (unless, of course, the miner doesn't adjust its rate within a few seconds or a minute, or whatever time the pool deems reasonable).

Likewise if the pool, for some reason, wanted to decrease the difficulty.  With the current stratum protocol, the pool will accept a share that was mined at the higher previous difficulty, but will probably only credit it at the new lower difficulty, thus potentially cheating the miner (by the difference in the difficulties).  If the difficulty that the miner was targeting when mining is embedded in the share in a way that cannot be forged, then there is no reason for the pool not to credit the share at the rate it was mined at.

EDITED to respond to your edits:


> Obviously Variable Difficulty is always going to override your minimum settings if it isn't high enough.

Absolutely.  And here, as I am trying to explain, the enhancement still helps, because if a pool supports it and a miner is using it, then the pool will never cheat a miner out of any work that he did during the window between the time the pool server decides on a new difficulty and the time the miner has had a chance to propagate that new difficulty to all its mining hardware.