slush0 / stratum-mining-proxy

Application providing bridge between old HTTP/getwork protocol and Stratum mining protocol.
400 stars 280 forks source link

Setting New Difficulty Every Share! (Same One) #30

Closed markudevelop closed 11 years ago

markudevelop commented 11 years ago

The stratum proxy protocol sets new difficulty every share (Same)

It looks like this

Setting New Difficulty: 32 Share Accepted Setting New Difficulty: 32 Share Accepted

I know it can be a pool problem but adding some small check to stratum_listener.py inside class DifficultySubscription(Subscription): to compare the difficulty if the same don't have to set the difficulty should fix this. I don't know programming I just was able to analyze the issue, Can anyone code this?

slush0 commented 11 years ago

Hi, what pool are you using? It can be clearly a pool problem. Thankfully sending difficulty often does not have any performance impact, so this is just a cosmetic issue.

I'll prefer to have a cleaner and predictable code than adding fixes for some corner cases, especially when it has no performance impact.

markudevelop commented 11 years ago

It's on hypernova.pw (scrypt), Well if it has no performance impact it's good. I thought it sends every accepted share request for difficulty change which can cause performance impact? Do you mind sending me a fix for myself if it's easy as 1 line anyway?

slush0 commented 11 years ago

I cannot give you any short patch without testing it, sorry. Please write to hypernova.pw about such topic, maybe they aren't aware of this issue. Or maybe it is because of their internal architecture and they simply decided that it doesn't matter, because it is just a cosmetic thing. I'm pretty sure miner won't touch the difficulty if it is the same (at least cgminer).