Bitcoin Forum
May 23, 2017, 05:09:15 PM *
News: If the forum does not load normally for you, please send me a traceroute.
 
   Home   Help Search Donate Login Register  
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 »
  Print  
Author Topic: New stratum/getwork proxy with Web-based GUI and pools management  (Read 84840 times)
Pfool
Full Member
***
Offline Offline

Activity: 217


View Profile WWW
May 16, 2014, 01:06:42 PM
 #1

Hi all,

I have released a new Stratum proxy implemented in Java (Windows/Linux/Mac... just install a JVM).

Here after are the main functionnalities:

-Several pool switching strategies (PriorityFailover, WeightedRoundRobin and more to come)
-Up to 256 workers at the same time (stratum and getwork)
-REST API (pool monitoring, change pool priority, workers stats and much more)
-Friendly Web-Based client with hashrate graphs.
-Support Extranonce notification to avoid disconnection when switching pool.

This proxy may be used to centralize the pool management in a single place. No need to configure pools on each workers, just configure the pools on the proxy and connect your workers to the proxy.

It may be useful if you rent some hashing power on sites like betarigs, leaserig or nicehash to monitor what is really happening. Just connect the leased rigs to the proxy and the proxy to the pools(s) (take care of your bandwith to avoid rejects).

And many things I haven't thought about...

  Pool A <---+                               +-------------+ Rig1                                        
 (Active)     |                                |                                                
                 |                                +-------------+ Rig2                      
                 |                                |                                                
  Pool B <---+ StratumProxy  <------+-------------+ Rig3                                  
(FailOver)    |                                |                                                
                 |                                +-------------+ Rig4                    
                 |                                |                                                
  Pool C <---+                               +-------------+ NiceHash
(FailOver)                                     |
                                                  +-------------+ betarigs
                                                  |
                                                  +-------------+ leaserig


Source code : https://github.com/Stratehm/stratum-proxy
Binaries: https://github.com/Stratehm/stratum-proxy/releases

It has been tested with SHA256, Scrypt, X11 and X13 pools (but should work with all algorithm supporting stratum).

/!\ This proxy does not work with cryptoNight pools. The pool mining protocol of cryptoNight pools is stratum-like but not stratum.

Thank you for testing and your feedback...

WARN: CGMiner 3.7.2 is not compatible with Stratum proxies (this one and others)  due to a bug on the extranonce2 size management. You can use sgminer instead or some forks of cgminer which include the fix. If using cgminer 3.7.2, you will have 100% rejects  (generally with message Share above target).
This bug has been fixed in later version of cgminer, but it no more supports scrypt mining.
EDIT: You can use the Getwork protocol instead of stratum with CGminer 3.7.2.

Client example:

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
POLONIEX TRADING SIGNALS
+50% Profit and more via TELEGRAM
ALTCOINTRADER.CO
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1495559355
Hero Member
*
Offline Offline

Posts: 1495559355

View Profile Personal Message (Offline)

Ignore
1495559355
Reply with quote  #2

1495559355
Report to moderator
1495559355
Hero Member
*
Offline Offline

Posts: 1495559355

View Profile Personal Message (Offline)

Ignore
1495559355
Reply with quote  #2

1495559355
Report to moderator
1495559355
Hero Member
*
Offline Offline

Posts: 1495559355

View Profile Personal Message (Offline)

Ignore
1495559355
Reply with quote  #2

1495559355
Report to moderator
micax1
Hero Member
*****
Offline Offline

Activity: 532


View Profile
May 21, 2014, 02:29:09 AM
 #2

Hi. So I installed this proxy here is what I got after first attempt to start it:

xxx@Stratum:~/java_stratum/target#  java -jar stratum.jar --pool-connection-retry-delay 1 --pool-hashrate-sampling-period 60  --stratum-listen-port 19999 -h eu.com:4440 us.com:4444 west01.us.trademybit.com:4444 -p x -u user.7
Log directory not set or available. Use the tmp OS directory.
2014-05-20 22:11:39,268 INFO     [main]:strat.mining.stratum.proxy.Launcher - LogLevel not set, using INFO.
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
        at java.util.ArrayList.rangeCheck(ArrayList.java:635)
        at java.util.ArrayList.get(ArrayList.java:411)
        at strat.mining.stratum.proxy.cli.CommandLineOptions.getPools(CommandLineOptions.java:134)
        at strat.mining.stratum.proxy.Launcher.initProxyManager(Launcher.java:129)
        at strat.mining.stratum.proxy.Launcher.main(Launcher.java:92)
2014-05-20 22:11:39,320 INFO     [Thread-0]:strat.mining.stratum.proxy.Launcher$1 - User requested shutdown... Gracefuly kill all connections...
2014-05-20 22:11:39,320 INFO     [Thread-0]:strat.mining.stratum.proxy.Launcher$1 - Shutdown !

Please advise.

Thank you.

█▌
_
█▌█▌█▌
_
█▌█▌█▌
_
█▌█▌█▌
Pfool
Full Member
***
Offline Offline

Activity: 217


View Profile WWW
May 21, 2014, 09:28:22 AM
 #3

Hi,

Thank you for using the proxy.

You need to have the same numbers of users and passwords as the numbers of pools on the command line. In your command line, you should have java -jar stratum.jar --pool-connection-retry-delay 1 --pool-hashrate-sampling-period 60  --stratum-listen-port 19999 -h eu.com:4440 us.com:4444 west01.us.trademybit.com:4444 -p x x x -u user.7 user.7 user.7 if the usernames and passwords are the same for each pools.

The usernames and passwords have to be in the same orders as the pools.

I will add a more explicit message when this kinf of error happens.

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
djm34
Legendary
*
Offline Offline

Activity: 1064


View Profile WWW
May 21, 2014, 10:09:32 AM
 #4

wohoo a new stratum for slow miner only  Grin

djm34 facebook page
BTC: 1NENYmxwZGHsKFmyjTc5WferTn5VTFb7Ze
Pledge for neoscrypt ccminer to that address: 16UoC4DmTz2pvhFvcfTQrzkPTrXkWijzXw
micax1
Hero Member
*****
Offline Offline

Activity: 532


View Profile
May 21, 2014, 12:49:27 PM
 #5

Hi,

Thank you for using the proxy.

You need to have the same numbers of users and passwords as the numbers of pools on the command line. In your command line, you should have java -jar stratum.jar --pool-connection-retry-delay 1 --pool-hashrate-sampling-period 60  --stratum-listen-port 19999 -h eu.com:4440 us.com:4444 west01.us.trademybit.com:4444 -p x x x -u user.7 user.7 user.7 if the usernames and passwords are the same for each pools.

The usernames and passwords have to be in the same orders as the pools.

I will add a more explicit message when this kinf of error happens.


Ok done, it`s now working - will get more detailed feedback today!
Thank you

█▌
_
█▌█▌█▌
_
█▌█▌█▌
_
█▌█▌█▌
Pfool
Full Member
***
Offline Offline

Activity: 217


View Profile WWW
May 21, 2014, 12:57:09 PM
 #6

wohoo a new stratum for slow miner only  Grin

I know I shouldn't feed the troll... Sad

Quick response: Load the proxy with high number of connections and hashing power  and share your result. I will be happy to improve performance if needed  Tongue

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
djm34
Legendary
*
Offline Offline

Activity: 1064


View Profile WWW
May 21, 2014, 03:02:45 PM
 #7

wohoo a new stratum for slow miner only  Grin

I know I shouldn't feed the troll... Sad

Quick response: Load the proxy with high number of connections and hashing power  and share your result. I will be happy to improve performance if needed  Tongue
I mean, why not developing something for nvidia cards ? (that's what I meant)

djm34 facebook page
BTC: 1NENYmxwZGHsKFmyjTc5WferTn5VTFb7Ze
Pledge for neoscrypt ccminer to that address: 16UoC4DmTz2pvhFvcfTQrzkPTrXkWijzXw
DubFX
Sr. Member
****
Offline Offline

Activity: 434


View Profile
May 21, 2014, 03:16:38 PM
 #8

Good job, but yep we need something for nvidia cards also.
SirChiko
Hero Member
*****
Offline Offline

Activity: 812



View Profile
May 21, 2014, 03:17:29 PM
 #9

Good job, but yep we need something for nvidia cards also.
Agree i do not have ati cards myself but i'm gamer.
Pfool
Full Member
***
Offline Offline

Activity: 217


View Profile WWW
May 21, 2014, 03:20:26 PM
 #10

wohoo a new stratum for slow miner only  Grin

I know I shouldn't feed the troll... Sad

Quick response: Load the proxy with high number of connections and hashing power  and share your result. I will be happy to improve performance if needed  Tongue
I mean, why not developing something for nvidia cards ? (that's what I meant)

Oh ok, so it was not really a troll...my bad!

Sorry but I don't really understand the link between nvidia cards and the proxy.
The stratum proxy is not a mining software, it does not compute hashes, it just relays stratum requests and responses (with some other cool features of course), so there is no advantages to use graphic cards to do that.


Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
djm34
Legendary
*
Offline Offline

Activity: 1064


View Profile WWW
May 21, 2014, 03:32:06 PM
 #11

wohoo a new stratum for slow miner only  Grin

I know I shouldn't feed the troll... Sad

Quick response: Load the proxy with high number of connections and hashing power  and share your result. I will be happy to improve performance if needed  Tongue
I mean, why not developing something for nvidia cards ? (that's what I meant)

Oh ok, so it was not really a troll...my bad!

Sorry but I don't really understand the link between nvidia cards and the proxy.
The stratum proxy is not a mining software, it does not compute hashes, it just relays stratum requests and responses (with some other cool features of course), so there is no advantages to use graphic cards to do that.
sorry I misread your post, I thought that it would only work with sgminer (when you wrote regarding the xtranonce support for these miners)

djm34 facebook page
BTC: 1NENYmxwZGHsKFmyjTc5WferTn5VTFb7Ze
Pledge for neoscrypt ccminer to that address: 16UoC4DmTz2pvhFvcfTQrzkPTrXkWijzXw
DubFX
Sr. Member
****
Offline Offline

Activity: 434


View Profile
May 21, 2014, 03:34:28 PM
 #12

wohoo a new stratum for slow miner only  Grin

I know I shouldn't feed the troll... Sad

Quick response: Load the proxy with high number of connections and hashing power  and share your result. I will be happy to improve performance if needed  Tongue
I mean, why not developing something for nvidia cards ? (that's what I meant)

Oh ok, so it was not really a troll...my bad!

Sorry but I don't really understand the link between nvidia cards and the proxy.
The stratum proxy is not a mining software, it does not compute hashes, it just relays stratum requests and responses (with some other cool features of course), so there is no advantages to use graphic cards to do that.
sorry I misread your post, I thought that it would only work with sgminer (when you wrote regarding the xtranonce support for these miners)
Now i feed kind of stupig i did read OP really fast, then checked replies and replied on reply...oh well i'm sorry  Roll Eyes
Pfool
Full Member
***
Offline Offline

Activity: 217


View Profile WWW
May 21, 2014, 03:42:50 PM
 #13

wohoo a new stratum for slow miner only  Grin

I know I shouldn't feed the troll... Sad

Quick response: Load the proxy with high number of connections and hashing power  and share your result. I will be happy to improve performance if needed  Tongue
I mean, why not developing something for nvidia cards ? (that's what I meant)

Oh ok, so it was not really a troll...my bad!

Sorry but I don't really understand the link between nvidia cards and the proxy.
The stratum proxy is not a mining software, it does not compute hashes, it just relays stratum requests and responses (with some other cool features of course), so there is no advantages to use graphic cards to do that.
sorry I misread your post, I thought that it would only work with sgminer (when you wrote regarding the xtranonce support for these miners)

The proxy should be compatible with all miners that support the stratum protocol. I have tested the proxy only with cgminer and sgminer, but if you want to test it with cudaMiner (or another one), you are welcome.

To complete the information about extranonce support, if the proxy is the only pool configured in your miner (and failover are configured on the proxy), there is no real benefit to use the setExtrnaonce notifications. But if you have failover configured in your miner, the setExtranonce support will avoid your miner to see the proxy as dead during the switch... (I hope you will find this understandable)

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

Activity: 217


View Profile WWW
May 21, 2014, 06:21:40 PM
 #14

First stable release available here:
https://github.com/Stratehm/stratum-proxy/releases/tag/0.1.0

with following fix and imporvements:
-Fix only REJECTED shares when no failover pool is available.
-Improve the support of client.reconnect and add --pool-no-reconnect
-Add accepted/rejected hashrate calculation for pools. Use the pool/list API method to get the hashrate.
-API change: Add user details and connection details methods (hashrate by pool, by user, by connection)
-Added parameters to control the shares sampling period to calculate pools, users and connections hashrates.
-Modification on user and password parameters: If less user and password provided than number of pools, the last user and password provided will be used for remaining pools.
-Improve command line options parsing error management.

Thanx Wink
BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
leicas
Newbie
*
Offline Offline

Activity: 9


View Profile
May 23, 2014, 11:42:18 AM
 #15

I'm using your proxy on a Raspberry Pi and with several Nvidia card mining X11, working great !

Also I've been coding some php-frontend to log info from the JSON data you provide, thanks a lot for your work.
btljuice
Member
**
Offline Offline

Activity: 90


View Profile
May 23, 2014, 08:32:22 PM
 #16

This could be very useful for bitfury rigs using chainminer. I'm going to try it out this weekend I think.
btljuice
Member
**
Offline Offline

Activity: 90


View Profile
May 24, 2014, 11:22:21 PM
 #17

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
Pfool
Full Member
***
Offline Offline

Activity: 217


View Profile WWW
May 25, 2014, 07:47:46 AM
 #18

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).

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

Activity: 149


View Profile
May 25, 2014, 08:16:52 AM
 #19

I'm trying to use it on windows but I get the following error :

Exception in thread "main" java.lang.UnsupportedClassVersionError: strat/mining/stratum/proxy/Launcher : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(Unknown Source)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$000(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)
Could not find the main class: strat.mining.stratum.proxy.Launcher. Program will exit.

How to fix this ?
Pfool
Full Member
***
Offline Offline

Activity: 217


View Profile WWW
May 25, 2014, 10:54:23 AM
 #20

I'm trying to use it on windows but I get the following error :

Exception in thread "main" java.lang.UnsupportedClassVersionError: strat/mining/stratum/proxy/Launcher : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(Unknown Source)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$000(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)
Could not find the main class: strat.mining.stratum.proxy.Launcher. Program will exit.

How to fix this ?

I think you have a JVM in 1.6 version (try "java -version" to check the version). Try to install a newer version: http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

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 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!