Pages:
Author

Topic: New stratum/getwork proxy with Web-based GUI and pools management - page 30. (Read 120883 times)

full member
Activity: 217
Merit: 100
Just a precision (to avoid misunderstanding): the proxy is not ready for solo mining. The Getwork implementation is only on the miner side: the proxy is connected on a stratum pool and both stratum and getwork miners are connected on the proxy.

The solo mining will be implemented later (with the getBlockTemplate protocol). It is a really long task to add the getBlockTemplate support. I have not implemented the getwork support on the Pool side since I haven't found solution to do so (I think it is not possible to build stratum jobs from getwork jobs).

I haven't heard about this kind of coins. So it is not tested...(summercoin doesn't seem to send rewards to another address)
full member
Activity: 148
Merit: 100
Yet another release: the getwork protocol for miners is now supported.
Getwork has been tested with Scrypt and X11 coins only. If some people want to test some others algorithms, they are welcome  Smiley.

In the same way, the scrypt hashrate estimation is now fixed with the --scrypt option.

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

Great ! I will try that soon !

Have you tried the proxy with coins that send part of the reward to a defined address (dev or foundation) ? I've seen that some of those coins (summercoin if I remember correctly) needed a stratum modification on the pool side. So I'm wondering if your proxy would work with them.
hero member
Activity: 798
Merit: 1000
full member
Activity: 217
Merit: 100
Yet another release: the getwork protocol for miners is now supported.
Getwork has been tested with Scrypt and X11 coins only. If some people want to test some others algorithms, they are welcome  Smiley.

In the same way, the scrypt hashrate estimation is now fixed with the --scrypt option.

Binaries: https://github.com/Stratehm/stratum-proxy/releases/tag/0.3.0
full member
Activity: 217
Merit: 100
I will try to improve the API description on the project main page.

The proxy API does not use the same format as the Mining programs one (even if both are JSON formatted).

For GET requests (like pool/list, user/list and connection/list), there is no parameter. For example, just use the URL http://localhost:8888/proxy/pool/list in your browser. The response is a JSON formatted response like:

[{"name":"stratum.nicehash.com:3336","host":"stratum+tcp://stratum.nicehash.com:3336","username":"13whEvPgLWmybVhizY91DtFqSrq2wznriv","password":"p=0.65;
d=0.02","isActive":false,"isEnabled":true,"isStable":false,"isActiveSince":"10-06-14 14:18:57 +0200","difficulty":"0.02",
"extranonce1":"5bfff2543b","extranonce2Size":3,"workerExtranonce2Size":2,"numberOfWorkerConnections":0,"priority":0,"acceptedDifficulty":40.92064000000084,
"rejectedDifficulty":0.067813,"isExtranonceSubscribeEnabled":true,"acceptedHashesPerSeconds":0,"rejectedHashesPerSeconds":0}]

If you use the browser, you can add this kind of plugin to format automatically the JSON response in a more human-readable way: http://jsonview.com/

For POST requests (like pool/priority), the expected parameter is a JSON formatted string. You will have to install a plugin if you want to use your browser. For firefox, you can use this one: https://addons.mozilla.org/en-US/firefox/addon/poster/

The URL to use is http://localhost:8888/proxy/pool/priority. The Content-Type is application/json and the JSON content to POST looks like:
{"poolName": "stratum.nicehash.com:3336", "priority": 0}
hero member
Activity: 798
Merit: 1000
Trying to call the proxy's API.. the API details don't list what the actual syntax of the get and post requests should be.  You just list things like "pool/list" and "user/list" which don't follow JSON based GET or POST requests like the Mining programs (cgminer, bfgminer, etc) use which is something along the lines of {command:"whatYou'reRequesting"}

Do you have an example?
full member
Activity: 217
Merit: 100
Lack of spare time... Sad

The share submission does not yet work (but it should soon). Then I will implement the long-polling support.
full member
Activity: 148
Merit: 100
Great work ! Thanks.

How does the getwork protocol look like ? Hard to implement ?
full member
Activity: 217
Merit: 100
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
...
legendary
Activity: 1726
Merit: 1018
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.
full member
Activity: 217
Merit: 100
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.
newbie
Activity: 10
Merit: 0
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.
full member
Activity: 217
Merit: 100

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...
newbie
Activity: 10
Merit: 0

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
full member
Activity: 217
Merit: 100
newbie
Activity: 10
Merit: 0
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.
full member
Activity: 217
Merit: 100
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
full member
Activity: 217
Merit: 100
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.
legendary
Activity: 1726
Merit: 1018
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.
full member
Activity: 217
Merit: 100
Is there any way to use the proxy with a local wallet ?

No, the proxy does not yet support getwork and getblocktemplate.
Pages:
Jump to: