Stratehm / stratum-proxy

Java implementation of a stratum->stratum/HTTPGetwork proxy with a Web GUI and some pool switching strategies (PriorityFailover, WeightedRoundRobin). Simple to install and configure.
GNU General Public License v3.0
199 stars 118 forks source link

Scrypt proxy causing strange speed reporting and disconnecting #66

Closed bladwig closed 8 years ago

bladwig commented 8 years ago

I am using your proxy on a RPi. On SHA256 it is solid as a rock. I can't believe how long it runs and how resource efficient it is. Now when I run it in script mode I start to have problems. I rent my hashing power out on miningrigrentals.com. When I connect cgminer directly to the service my gpu puts out about 530kh/s according to the service. When I run it through your proxy script with isScrypt true, the service reports speeds over 2,000kh/s. It will run that way for about 15 minutes or so, then it will drop to 1,000 then it will drop to zero for a while and I see the hashing unit reconnect directly to the service which means the proxy on the RPi has died. After a few minutes, the proxy comes back up and the miner reconnects and I get those crazy speeds again.

The contents of my conf are below just to be sure it is not an issue I am causing: *note - worker passwords are not required by the service

{ "disableGetwork" : true, "isScrypt" : true, "suggestedPoolDifficulty" : 60.0, "databaseDirectory" : "/opt/stratum-proxy/scryptdb", "stratumListenPort" : 4444,

"pools" : [ { "host" : "us-central01.miningrigrentals.com:3333", "user" : "username" }, { "host" : "us-east01.miningrigrentals.com:3333", "user" : "username" }] }

bladwig commented 8 years ago

After further inspection, it appears that for some reason it is not setting the variable difficulty properly. It is setting 4096 for the diff but when I connect to the pool directly I get 16 which is about right for this speed.

Stratehm commented 8 years ago

I think you should try without the "suggestedPoolDifficulty" : 60.0 parameter. 60 as a difficulty looks a bit odd and maybe the server does not support this value and fallback to 4096.

bladwig commented 8 years ago

Good point, thank you, that appears to have solved it.