Bitcoin Forum
November 08, 2024, 04:22:24 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 [3] 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 »
  Print  
Author Topic: New stratum/getwork proxy with Web-based GUI and pools management  (Read 120881 times)
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
May 27, 2014, 12:19:51 PM
 #41

but ccminer with betarigs not working

CCMiner with betarigs through the proxy ? If so, could you please send me the log file (stratum-proxy.log) of the proxy ? Thanks

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
Delivereath
Full Member
***
Offline Offline

Activity: 148
Merit: 100


View Profile
May 27, 2014, 04:51:40 PM
 #42

I've noticed that some pools don't work well when --pool-append-worker-names is set to true. I only get rejected shares when enabling this on http://happy.pool.mn for example.

But it works just fine on almost all other pools.
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
May 27, 2014, 07:47:47 PM
 #43

I have tried the pool http://happy.pool.mn and indeed, with several workers configured, there is a lots of rejects with the --pool-append-worker-names option. Only one worker has accepted shares, and not always the same. Unfortunetly, after investigation, I cannot do anything since the mining jobs are assigned "by worker" and not "by connection". I have contacted the pool owner.

Thank you for testing, it is really helpful.

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
jamesbond700
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
May 28, 2014, 01:49:47 AM
 #44

I downloaded the proxy but am lost as to what I should do next. Running windows 7. What do I do with the .jar file?
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
May 28, 2014, 07:17:59 AM
 #45

I downloaded the proxy but am lost as to what I should do next. Running windows 7. What do I do with the .jar file?

Use the following line in cmd:
java -jar -h poolHost:port [poolHostFailover:port] -u username [usernameFailover] -p password [passwordFailover]

(You can specify several failover pools)
Then redirect your miners to proxyIp:3333

I will add a README file in the package.

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
Racer8
Full Member
***
Offline Offline

Activity: 150
Merit: 100


View Profile
May 28, 2014, 03:33:51 PM
 #46

I'm not good with java.  Get the following just trying to get help

java -jar stratum-proxy.jar --help
Exception in thread "main" java.lang.NoClassDefFoundError: org/kohsuke/args4j/Cm
dLineException
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
        at java.lang.Class.getMethod0(Unknown Source)
        at java.lang.Class.getMethod(Unknown Source)
        at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
        at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.kohsuke.args4j.CmdLineException

        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 6 more
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
May 28, 2014, 03:40:18 PM
 #47

I'm not good with java.  Get the following just trying to get help

java -jar stratum-proxy.jar --help
Exception in thread "main" java.lang.NoClassDefFoundError: org/kohsuke/args4j/Cm
dLineException
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
        at java.lang.Class.getMethod0(Unknown Source)
        at java.lang.Class.getMethod(Unknown Source)
        at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
        at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.kohsuke.args4j.CmdLineException

        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 6 more

In the directory where you have unzipped the package, check that you have the lib directory with some other jar inside.

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
Delivereath
Full Member
***
Offline Offline

Activity: 148
Merit: 100


View Profile
May 28, 2014, 05:51:26 PM
 #48

Is there any way to use the proxy with a local wallet ?
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
May 28, 2014, 06:24:23 PM
 #49

Is there any way to use the proxy with a local wallet ?

No, the proxy does not yet support getwork and getblocktemplate.

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
not.you
Legendary
*
Offline Offline

Activity: 1726
Merit: 1018


View Profile
May 28, 2014, 07:26:36 PM
 #50

I tried using chainminer with this, got some very strange output. Wondering if I'm just doing something really wrong, or this proxy isn't meant to work with getwork miners?

http://pastebin.com/V56qM3n8

Indeed, this proxy is a stratum proxy only, there is no getwork support (maybe later).

Please do.  I was looking for an X11 proxy for my cpu miners.  This looks to be working but I found out after I had it setup that the darkcoin miner I was using is apparently only getwork capable.
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
May 28, 2014, 09:38:51 PM
 #51

I tried using chainminer with this, got some very strange output. Wondering if I'm just doing something really wrong, or this proxy isn't meant to work with getwork miners?

http://pastebin.com/V56qM3n8

Indeed, this proxy is a stratum proxy only, there is no getwork support (maybe later).

Please do.  I was looking for an X11 proxy for my cpu miners.  This looks to be working but I found out after I had it setup that the darkcoin miner I was using is apparently only getwork capable.

As I said, it will be done later (maybe in a week or more, maybe never, I can't say). I have to learn how getwork works. It will take some time and unfortunately, I haven't so much spare time.

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
May 29, 2014, 09:24:12 PM
Last edit: May 30, 2014, 04:17:09 PM by Pfool
 #52

I tried using chainminer with this, got some very strange output. Wondering if I'm just doing something really wrong, or this proxy isn't meant to work with getwork miners?

http://pastebin.com/V56qM3n8

Indeed, this proxy is a stratum proxy only, there is no getwork support (maybe later).

Please do.  I was looking for an X11 proxy for my cpu miners.  This looks to be working but I found out after I had it setup that the darkcoin miner I was using is apparently only getwork capable.

Which cpu miner do you use ? I will need one to implement the getwork miners protocol. Thanks

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
plambe
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
May 31, 2014, 09:39:51 PM
 #53

Hi,

Here's the command I use to start the stratum-proxy:

Code:
e:\Users\user\Downloads\stratum-proxy-0.2.0\stratum-proxy-0.2.0>"c:\Program Files (x86)\Java\jre7\bin\java.exe" -jar stratum-proxy.jar -h drk.kopame.com:7903 -u Xi3bEBfhgogwobNELiq5wiE8X8Eef5maFh -p 123

When I try to use it to connect to my darkcoin p2pool node, I get the following errors:

Code:
2014-06-01 00:33:39,041 ERROR    [Pool-drk.kopame.com:7903-Thread]:strat.mining.stratum.proxy.pool.PoolConnection - Pool-drk.kopame.com:7903. JSON-RPC parsing e
rror with line: {"error": null, "jsonrpc": "2.0", "id": 2, "result": null}.
java.lang.NullPointerException
        at strat.mining.stratum.proxy.pool.Pool.processAuthorizeResponse(Pool.java:406)
        at strat.mining.stratum.proxy.pool.PoolConnection.onAuthorizeResponse(PoolConnection.java:120)
        at strat.mining.stratum.proxy.network.StratumConnection.onResponseReceived(StratumConnection.java:281)
        at strat.mining.stratum.proxy.network.StratumConnection.onLineRead(StratumConnection.java:222)
        at strat.mining.stratum.proxy.network.StratumConnection.access$200(StratumConnection.java:54)
        at strat.mining.stratum.proxy.network.StratumConnection$1.run(StratumConnection.java:151)
2014-06-01 00:33:39,043 INFO     [Pool-drk.kopame.com:7903-Thread]:strat.mining.stratum.proxy.manager.StratumProxyManager - Set difficulty 0.039327938706819054
on pool drk.kopame.com:7903.
2014-06-01 00:33:39,047 INFO     [Pool-drk.kopame.com:7903-Thread]:strat.mining.stratum.proxy.manager.StratumProxyManager - New block detected on pool drk.kopam
e.com:7903.
Jun 01, 2014 12:33:39 AM org.glassfish.jersey.server.ApplicationHandler initialize
INFO: Initiating Jersey application, version Jersey: 2.7 2014-03-12 18:11:31...
Jun 01, 2014 12:33:39 AM org.glassfish.grizzly.http.server.NetworkListener start
INFO: Started listener bound to [0.0.0.0:8888]
Jun 01, 2014 12:33:39 AM org.glassfish.grizzly.http.server.HttpServer start
INFO: [HttpServer] Started.
2014-06-01 00:34:01,684 INFO     [Pool-drk.kopame.com:7903-Thread]:strat.mining.stratum.proxy.manager.StratumProxyManager - Set difficulty 0.041979390149169404
on pool drk.kopame.com:7903.
2014-06-01 00:34:01,698 INFO     [Pool-drk.kopame.com:7903-Thread]:strat.mining.stratum.proxy.manager.StratumProxyManager - New block detected on pool drk.kopam
e.com:7903.

And here's the error I get when I connect a miner to it:

Code:
2014-06-01 00:36:26,553 INFO     [Thread-3]:strat.mining.stratum.proxy.manager.StratumProxyManager$1 - New connection on 0.0.0.0/0.0.0.0:3333 from /94.26.84.107
:41060.
2014-06-01 00:36:26,559 ERROR    [/94.26.84.107:41060-Thread]:strat.mining.stratum.proxy.worker.WorkerConnection - No pool available for the connection /94.26.8
4.107:41060. Sending error and close the connection.
2014-06-01 00:36:26,563 INFO     [/94.26.84.107:41060-Thread]:strat.mining.stratum.proxy.manager.StratumProxyManager - Worker connection /94.26.84.107:41060 clo
sed. 0 connections active on pool None. Cause: EOF on inputStream.
2014-06-01 00:36:26,602 INFO     [Thread-3]:strat.mining.stratum.proxy.manager.StratumProxyManager$1 - New connection on 0.0.0.0/0.0.0.0:3333 from /94.26.84.107
:41061.
2014-06-01 00:36:26,613 ERROR    [/94.26.84.107:41061-Thread]:strat.mining.stratum.proxy.worker.WorkerConnection - No pool available for the connection /94.26.8
4.107:41061. Sending error and close the connection.
2014-06-01 00:36:26,617 INFO     [/94.26.84.107:41061-Thread]:strat.mining.stratum.proxy.manager.StratumProxyManager - Worker connection /94.26.84.107:41061 clo
sed. 0 connections active on pool None. Cause: EOF on inputStream.

Can I get this to work with p2pool?

EDIT: I got it to work with a classic pool, so I think the issue I'm experiencing is related only to p2pool nodes.
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
June 01, 2014, 08:49:52 AM
Last edit: June 01, 2014, 09:20:40 AM by Pfool
 #54

Hi,

Here's the command I use to start the stratum-proxy:

Code:
e:\Users\user\Downloads\stratum-proxy-0.2.0\stratum-proxy-0.2.0>"c:\Program Files (x86)\Java\jre7\bin\java.exe" -jar stratum-proxy.jar -h drk.kopame.com:7903 -u Xi3bEBfhgogwobNELiq5wiE8X8Eef5maFh -p 123

When I try to use it to connect to my darkcoin p2pool node, I get the following errors:

Code:
2014-06-01 00:33:39,041 ERROR    [Pool-drk.kopame.com:7903-Thread]:strat.mining.stratum.proxy.pool.PoolConnection - Pool-drk.kopame.com:7903. JSON-RPC parsing e
rror with line: {"error": null, "jsonrpc": "2.0", "id": 2, "result": null}.
java.lang.NullPointerException
        at strat.mining.stratum.proxy.pool.Pool.processAuthorizeResponse(Pool.java:406)
        at strat.mining.stratum.proxy.pool.PoolConnection.onAuthorizeResponse(PoolConnection.java:120)
        at strat.mining.stratum.proxy.network.StratumConnection.onResponseReceived(StratumConnection.java:281)
        at strat.mining.stratum.proxy.network.StratumConnection.onLineRead(StratumConnection.java:222)
        at strat.mining.stratum.proxy.network.StratumConnection.access$200(StratumConnection.java:54)
        at strat.mining.stratum.proxy.network.StratumConnection$1.run(StratumConnection.java:151)
2014-06-01 00:33:39,043 INFO     [Pool-drk.kopame.com:7903-Thread]:strat.mining.stratum.proxy.manager.StratumProxyManager - Set difficulty 0.039327938706819054
on pool drk.kopame.com:7903.
2014-06-01 00:33:39,047 INFO     [Pool-drk.kopame.com:7903-Thread]:strat.mining.stratum.proxy.manager.StratumProxyManager - New block detected on pool drk.kopam
e.com:7903.
Jun 01, 2014 12:33:39 AM org.glassfish.jersey.server.ApplicationHandler initialize
INFO: Initiating Jersey application, version Jersey: 2.7 2014-03-12 18:11:31...
Jun 01, 2014 12:33:39 AM org.glassfish.grizzly.http.server.NetworkListener start
INFO: Started listener bound to [0.0.0.0:8888]
Jun 01, 2014 12:33:39 AM org.glassfish.grizzly.http.server.HttpServer start
INFO: [HttpServer] Started.
2014-06-01 00:34:01,684 INFO     [Pool-drk.kopame.com:7903-Thread]:strat.mining.stratum.proxy.manager.StratumProxyManager - Set difficulty 0.041979390149169404
on pool drk.kopame.com:7903.
2014-06-01 00:34:01,698 INFO     [Pool-drk.kopame.com:7903-Thread]:strat.mining.stratum.proxy.manager.StratumProxyManager - New block detected on pool drk.kopam
e.com:7903.

And here's the error I get when I connect a miner to it:

Code:
2014-06-01 00:36:26,553 INFO     [Thread-3]:strat.mining.stratum.proxy.manager.StratumProxyManager$1 - New connection on 0.0.0.0/0.0.0.0:3333 from /94.26.84.107
:41060.
2014-06-01 00:36:26,559 ERROR    [/94.26.84.107:41060-Thread]:strat.mining.stratum.proxy.worker.WorkerConnection - No pool available for the connection /94.26.8
4.107:41060. Sending error and close the connection.
2014-06-01 00:36:26,563 INFO     [/94.26.84.107:41060-Thread]:strat.mining.stratum.proxy.manager.StratumProxyManager - Worker connection /94.26.84.107:41060 clo
sed. 0 connections active on pool None. Cause: EOF on inputStream.
2014-06-01 00:36:26,602 INFO     [Thread-3]:strat.mining.stratum.proxy.manager.StratumProxyManager$1 - New connection on 0.0.0.0/0.0.0.0:3333 from /94.26.84.107
:41061.
2014-06-01 00:36:26,613 ERROR    [/94.26.84.107:41061-Thread]:strat.mining.stratum.proxy.worker.WorkerConnection - No pool available for the connection /94.26.8
4.107:41061. Sending error and close the connection.
2014-06-01 00:36:26,617 INFO     [/94.26.84.107:41061-Thread]:strat.mining.stratum.proxy.manager.StratumProxyManager - Worker connection /94.26.84.107:41061 clo
sed. 0 connections active on pool None. Cause: EOF on inputStream.

Can I get this to work with p2pool?

EDIT: I got it to work with a classic pool, so I think the issue I'm experiencing is related only to p2pool nodes.

The problem is the P2Pool response to the authorize request. It returns null as result. It should return true or false. I have added a check for null result in the proxy, but the authorize request will still fail (since null is considered as false).

Does it work when your miner is directly connected to the P2Pool ?

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
plambe
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
June 01, 2014, 10:50:55 AM
 #55


The problem is the P2Pool response to the authorize request. It returns null as result. It should return true or false. I have added a check for null result in the proxy, but the authorize request will still fail (since null is considered as false).

Does it work when your miner is directly connected to the P2Pool ?


Yes, my miners are mining at the same p2pool node without issues. Also - my miners use exactly the same username and password style when mining at p2pool - as a username they use a darkcoin address and the password doesn't matter. I double checked the username and it is correct, so even if p2pool validates darkcoin addresses (which I doubt, but don't know for sure) used as usernames, it should be ok. I also tried another darkcoin address as a username, still the same result.

The p2pool node doesn't report any issues with stratum-proxy's worker, it only says it gives work to this worker. Here's the log:

Code:
2014-06-01 13:48:47.735404 New work for worker Xi3bEBfhgogwobNELiq5wiE8X8Eef5maFh! Difficulty: 0.033159 Share difficulty: 29.783877 Total block value: 5.015000 DRK including 6 transactions
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
June 01, 2014, 11:33:46 AM
 #56


The problem is the P2Pool response to the authorize request. It returns null as result. It should return true or false. I have added a check for null result in the proxy, but the authorize request will still fail (since null is considered as false).

Does it work when your miner is directly connected to the P2Pool ?


Yes, my miners are mining at the same p2pool node without issues. Also - my miners use exactly the same username and password style when mining at p2pool - as a username they use a darkcoin address and the password doesn't matter. I double checked the username and it is correct, so even if p2pool validates darkcoin addresses (which I doubt, but don't know for sure) used as usernames, it should be ok. I also tried another darkcoin address as a username, still the same result.

The p2pool node doesn't report any issues with stratum-proxy's worker, it only says it gives work to this worker. Here's the log:

Code:
2014-06-01 13:48:47.735404 New work for worker Xi3bEBfhgogwobNELiq5wiE8X8Eef5maFh! Difficulty: 0.033159 Share difficulty: 29.783877 Total block value: 5.015000 DRK including 6 transactions

Ok thank you for the details. So, I will add an option to bypass the authorize response from pool...

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
plambe
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
June 01, 2014, 11:49:02 AM
Last edit: June 01, 2014, 12:50:42 PM by plambe
 #57

One more thing - here's a tcpdump (7z), if you're interested.

EDIT: the p2pool is at 192.168.1.7, the proxy is at 192.168.1.4.
EDIT2: here's the same kind of tcpdump (7z) log, but more readable.
EDIT3: After reading up some more on the stratum protocol and some more tcpdumping classic and p2pool traffic, I added to p2pool's stratum.py function rpc_authorize "return True", which is passed to jsonrpc.py, which uses it to construct the JSON reply. This is not a solution for your proxy software in my opinion, because people will continue to use the standard p2pool source, not mine. The addition I'm talking about is on line 35 of the p2pool/bitcoin/stratum.py file.
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
June 01, 2014, 02:19:50 PM
 #58

The modification of the P2Pool to conform to the stratum protocol is, I think, the best solution. But you are right, I will try to find a solution to bypass the malformed authorize response automaticaly to be compliant with P2Pool.

Thank you for the feedback.

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
not.you
Legendary
*
Offline Offline

Activity: 1726
Merit: 1018


View Profile
June 02, 2014, 05:18:15 PM
 #59

I tried using chainminer with this, got some very strange output. Wondering if I'm just doing something really wrong, or this proxy isn't meant to work with getwork miners?

http://pastebin.com/V56qM3n8

Indeed, this proxy is a stratum proxy only, there is no getwork support (maybe later).

Please do.  I was looking for an X11 proxy for my cpu miners.  This looks to be working but I found out after I had it setup that the darkcoin miner I was using is apparently only getwork capable.

Which cpu miner do you use ? I will need one to implement the getwork miners protocol. Thanks

Actually I found out the darkcoin miners I am using do support stratum.  I just had to add the stratum+tcp:// at the front of the pool url (or in this case the IP of my machine running the proxy) and it used stratum instead of getwork.  

Depending on the CPU I am using these:
Windows 1.2 avx-aes: http://darkcoin.io/downloads/darkcoin-minerd-1.2c.zip
Windows 1.3 avx-aes: http://download.darkcoin.fr/darkCoin-cpuminer-1.3-avx-aes-windows-binaries.zip

BTW:  Thanks for this proxy.  So far it seems to work a treat.
Pfool (OP)
Full Member
***
Offline Offline

Activity: 217
Merit: 100


View Profile WWW
June 04, 2014, 06:42:01 AM
 #60

0.2.1 version released with following fixes/functionnalities:
-Implementation of an homemade timer to schedule timeouts and reconnects (should fix reconnection problem on failover pools)
-Fix compatibility with P2Pool
-Add a check to avoid error when authorize responses are incomplete
-Fix a pool reconnection issue in some rare case.
-Fix the subscribe timeout
-Add kick/ban API methods for connection/addresses
-Fix the option --pool-worker-name-separator (expecting booleans instead of strings)
-Do not authorize users that are already authorized on pools.
-Add a timeout on the pool subscribe response

https://github.com/Stratehm/stratum-proxy/releases/tag/0.2.1

TODO list in priority order:
-Add getwork miners support
-Add a configuration file
-Add a basic API front-end
-Add hashrate load-balancing
-Add getblocktemplate support for solo mining
...

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
Pages: « 1 2 [3] 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!