JayDDee / cpuminer-opt

Optimized multi algo CPU miner
Other
774 stars 545 forks source link

stratum_rec_line failed #148

Closed pool2mine closed 5 years ago

pool2mine commented 6 years ago

Hello, i am setting up a yiimp based pool for many CPU coins, many algorithms present problems when adjusting the stratum diff, for example for a Pentium processor that can hash at 300 H/S in lyra2z330 algo, when i set diff to 0.004 some workers can't find a share and keep giving me the stratum_rec_line failed, other workers run fine, then if i set diff to 0.003 i get rid of the stratum error but get all invalid shares for low difficulty, i tried to set difficulty to .00035 but yiimp stratum wont take the fourth decimal, so, for a workaround i was wondering if i can connect the miners to .003 diff port but specify the minimum difficulty in the command line (in the client side) to avoid low diff rejected, i googled a lot trying to find the syntax (if it exist) to set min share diff on miner startup. please let me know if this is possible, will solve a lot of problems to many pools. regards

JayDDee commented 6 years ago

Stratum difficulty adjustments should not cause rejects for low difficulty. It looks like the pool did not make the adjustment to accept the lower difficulty shares. The stratum and miner must use the same difficulty.

JayDDee commented 6 years ago

A little clarification of my understanding of stratum protocol. The miner can request a specific diff but the stratum sets the diff and informs the miner. The miner then uses the diff set by the stratum to determine when a share is good enough to submit. The pool SHOULD accept a share based on the diff it had set. It looks like an inconsistency in the pool configuration between the diff it tells the miner to use and the diff it accepts for shares.

pool2mine commented 6 years ago

Thanks for the help, I have set the stratum difficulty to .002, this way I get rid of the stratum_rec_line failed, then I used the command -m 2 on the miner assuming the miner will multiply the given diff (0.002 x 2) = 0.004, but still get the low difficulty error, if I send a 0.004 diff share to the pool that originally requested .002 it should be accepted, do you know if the -m command is working? I am compiling a new version of the stratum hoping it will solve the problem, again thank you for helping me out

JayDDee commented 6 years ago

-m and -f should not be used. Do you get valid shares with the higher stratum diff? Recv_line errors should not prevent finding shares.

pool2mine commented 6 years ago

i will fork your miner, change cpuminer-c file to increase "int opt_timeout = 300;" from 300 to 500, i think is a latency issue, the miners timeout and get the error, i will run for a few days and let you know the result

Quake4 commented 6 years ago

@JayDDee can i increase opt_timeout from command line args?

Quake4 commented 6 years ago

@JayDDee please extend to 500 or add cmd line option for opt_timeout image

JayDDee commented 5 years ago

opt_timeout can be changed with the -T option but I'm not going to change the default without a better understanding of the problem.