Pfool (OP)
|
|
May 16, 2014, 01:06:42 PM Last edit: July 23, 2014, 08:42:35 PM by Pfool |
|
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-proxyBinaries: https://github.com/Stratehm/stratum-proxy/releasesIt 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 BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
|
|
|
micax1
|
|
May 21, 2014, 02:29:09 AM |
|
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 (OP)
|
|
May 21, 2014, 09:28:22 AM |
|
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 BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
|
|
|
djm34
Legendary
Offline
Activity: 1400
Merit: 1050
|
|
May 21, 2014, 10:09:32 AM |
|
wohoo a new stratum for slow miner only
|
djm34 facebook pageBTC: 1NENYmxwZGHsKFmyjTc5WferTn5VTFb7Ze Pledge for neoscrypt ccminer to that address: 16UoC4DmTz2pvhFvcfTQrzkPTrXkWijzXw
|
|
|
micax1
|
|
May 21, 2014, 12:49:27 PM |
|
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 (OP)
|
|
May 21, 2014, 12:57:09 PM |
|
wohoo a new stratum for slow miner only I know I shouldn't feed the troll... 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
|
Thanx BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
|
|
|
djm34
Legendary
Offline
Activity: 1400
Merit: 1050
|
|
May 21, 2014, 03:02:45 PM |
|
wohoo a new stratum for slow miner only I know I shouldn't feed the troll... 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 I mean, why not developing something for nvidia cards ? (that's what I meant)
|
djm34 facebook pageBTC: 1NENYmxwZGHsKFmyjTc5WferTn5VTFb7Ze Pledge for neoscrypt ccminer to that address: 16UoC4DmTz2pvhFvcfTQrzkPTrXkWijzXw
|
|
|
DubFX
|
|
May 21, 2014, 03:16:38 PM |
|
Good job, but yep we need something for nvidia cards also.
|
|
|
|
SirChiko
Legendary
Offline
Activity: 966
Merit: 1000
|
|
May 21, 2014, 03:17:29 PM |
|
Good job, but yep we need something for nvidia cards also.
Agree i do not have ati cards myself but i'm gamer.
|
The only online casino on which i won something. I made 17mBTC from 1mBTC in like 15 minutes. This is not paid AD!
|
|
|
Pfool (OP)
|
|
May 21, 2014, 03:20:26 PM |
|
wohoo a new stratum for slow miner only I know I shouldn't feed the troll... 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 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 BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
|
|
|
djm34
Legendary
Offline
Activity: 1400
Merit: 1050
|
|
May 21, 2014, 03:32:06 PM |
|
wohoo a new stratum for slow miner only I know I shouldn't feed the troll... 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 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 pageBTC: 1NENYmxwZGHsKFmyjTc5WferTn5VTFb7Ze Pledge for neoscrypt ccminer to that address: 16UoC4DmTz2pvhFvcfTQrzkPTrXkWijzXw
|
|
|
DubFX
|
|
May 21, 2014, 03:34:28 PM |
|
wohoo a new stratum for slow miner only I know I shouldn't feed the troll... 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 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
|
|
|
|
Pfool (OP)
|
|
May 21, 2014, 03:42:50 PM |
|
wohoo a new stratum for slow miner only I know I shouldn't feed the troll... 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 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 BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
|
|
|
Pfool (OP)
|
|
May 21, 2014, 06:21:40 PM |
|
First stable release available here: https://github.com/Stratehm/stratum-proxy/releases/tag/0.1.0with 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 BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
|
|
|
leicas
Newbie
Offline
Activity: 9
Merit: 0
|
|
May 23, 2014, 11:42:18 AM |
|
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
Activity: 92
Merit: 10
|
|
May 23, 2014, 08:32:22 PM |
|
This could be very useful for bitfury rigs using chainminer. I'm going to try it out this weekend I think.
|
|
|
|
btljuice
Member
Offline
Activity: 92
Merit: 10
|
|
May 24, 2014, 11:22:21 PM |
|
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 (OP)
|
|
May 25, 2014, 07:47:46 AM |
|
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/V56qM3n8Indeed, this proxy is a stratum proxy only, there is no getwork support (maybe later).
|
Thanx BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
|
|
|
Delivereath
|
|
May 25, 2014, 08:16:52 AM |
|
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 (OP)
|
|
May 25, 2014, 10:54:23 AM |
|
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 BTC: 19wv8FQKv3NkwTdzBCQn1AGsb9ghqBPWXi
|
|
|
|