Author

Topic: Multi pool stratum proxy - how to do it? (Read 11959 times)

newbie
Activity: 15
Merit: 0
October 14, 2022, 12:38:55 PM
#14
Has the algorithm changed?
sr. member
Activity: 425
Merit: 253

# This will install required dependencies (namely Twisted and Stratum libraries), but don't install the package into the system.
sudo python setup.py develop


1.  What?  Don't install into the system?
2. I got an error here.

conquest@conquest-desktop:~$ sudo python setup.py develop
python: can't open file 'setup.py': [Errno 2] No such file or directory


3. help!

Edit >   got that figure out.

What I dont know is this:  When you go into CGminer and point it at the new stratum server, do you use "stratum+tcp://192.168.1.121:3333" or "x:8333" or "http://x "
I cant get it to work... says my pool is dead on cgminer, but listening on the stratum server....


Edit >  got that figured out.

4. WTF... all the shares are rejected

2014-03-24 18:14:30,399 INFO proxy stratum_listener.submit # [91ms] Share from 'fasbit.1' REJECTED: (23, u'Low difficulty share', None)


Any ideas?

legendary
Activity: 1400
Merit: 1000
I solved definitively using my linux machine and installing on it CryptoManiac / stratum-mining-proxy. Using already compiled exe on windows machine was too unstable (disconnected after 1 hour of work)

Now I can point all my scrypt rigs to one unique proxy.

installation instructions on ubuntu are very simple:
# Python and libssl development packages are required
sudo apt-get install -y git-core python-dev libssl-dev
git clone https://github.com/CryptoManiac/stratum-mining-proxy.git
cd stratum-mining-proxy

# This will upgrade setuptools package
sudo python distribute_setup.py

# Build and install LTC scrypt extension
cd litecoin_scrypt
sudo python setup.py install
cd ..

# This will install required dependencies (namely Twisted and Stratum libraries), but don't install the package into the system.
sudo python setup.py develop

to launch the stratum proxy for scrypt mining, just use:
ulimit -n 4096 | ./mining_proxy.py -pa scrypt -o your_pool_address -p port_of_your_pool -cu user.worker -cp worker_password -sp 3333 -gp 8332

replace your_pool_address, port_of_your_pool, user.worker and worker_password with proper values

your_pool_address --> address of your pool (example, ltc.ghash.io)
port_of_your_pool -->  the port of your pool, (example 3333)
user.worker --> the worker
worker_password --> password of the worker

before launching the stratum proxy, I set ulimit -n 4096 due to the fact using too many rigs, you can receive python error message "OSError: [Errno 24] Too many open files" after few hours of work...
member
Activity: 109
Merit: 10
I took a look at MultiMiner. Very useful site, thanks!
newbie
Activity: 13
Merit: 0
So, is there any decent advanced stratum proxy? By "advanced" I mean:
- it should have support for mutiple pools (primary, backup/failover ...)
- it should work with various cgminers, sgminers and other forks of them (vertminer...)

..

Any suggestions?

I would like to know too; but until then there is a simple trick you could do.

First just get a simple tcp port forwarder, like this: http://jtcpfwd.sourceforge.net/ or maybe even ssh.

Then open set up some forwards on different ports, just an example:

Port 4001 points to multipool:7777
Port 40002 points to middlecoin, etc
... Port 4010 points to wafflepool

Then in your cgminer/bfgminer coinfigs, just setup it up to point to all 10 ports on your proxy server : mylocalproxy:4000, mylocalproxy:4001, ... mylocalhost:4010


So all miners connect to all pools.  Just bring down (or up) the pools you want on any of those 10 ports.  It works good.  That is, if pool 7 is most profitable, then kill all other forwarders but the one running on 4007.  All your miners will "fail over" to that pool/port since it's the only one up.


Or the other way, instead of having 10 ports; just have one and switch it around to point it to whatever you want.

This works good, the only problem is making sure you have the correct workers.


legendary
Activity: 1400
Merit: 1000
March 18, 2014, 01:01:57 AM
#9
I'm also looking for some advanced stratum proxy. MultiMiner is problematic, because it uses BFGminer as the proxy, which has problems with various cgminers. The famous mining-proxy (from here: http://mining.bitcoin.cz/mining-proxy-howto) is somehow useless, since I can only define one pool and thus I don't have any backup/failover pools.

So, is there any decent advanced stratum proxy? By "advanced" I mean:
- it should have support for mutiple pools (primary, backup/failover ...)
- it should work with various cgminers, sgminers and other forks of them (vertminer...)

Basically what I want is to have a single machine as a proxy, and all my miners would connect to this machine, and then to the actual pools. Miners can be configured for various coins (regular scrypt, vertcoin, scrypt-jane, keccak ... of course all miners would mine the same type of coin at once).

Any suggestions?

I successfully experimented a very simple approach pointing some of my scrypt mining machines to stratum_proxy.exe  taken from here https://www.wemineltc.com/gettingstarted

I pointed the stratum proxy to a single pool using

stratum_proxy.exe -o POOL_SERVERNAME -p 3333 -cu workerusername -cp password

and then all single miners are pointed (using fake credentials) to the stratum_proxy using getwork 8332 port and http:// protocol (i do not know why, but only only getwork works to connect scrypt miner to the stratum_proxy).

Then, when you need to switch all mining rigs, simple launch a new batch with taskkill /f /im stratum_proxy.exe and with the new credentials to a different more profitable pool...

taskkill /f /im stratum_proxy.exe
stratum_proxy.exe -o SERVERNAME -p 3333 -cu workerusername -cp password

But this very simple approach will not solve the lost shares when switching from one pool to another...  It could be great if someone could point us to a better solution to avoid losing shares when switching from a pool to an other
sr. member
Activity: 457
Merit: 273
February 24, 2014, 12:49:22 PM
#8
I'm also looking for some advanced stratum proxy. MultiMiner is problematic, because it uses BFGminer as the proxy, which has problems with various cgminers. The famous mining-proxy (from here: http://mining.bitcoin.cz/mining-proxy-howto) is somehow useless, since I can only define one pool and thus I don't have any backup/failover pools.

So, is there any decent advanced stratum proxy? By "advanced" I mean:
- it should have support for mutiple pools (primary, backup/failover ...)
- it should work with various cgminers, sgminers and other forks of them (vertminer...)

Basically what I want is to have a single machine as a proxy, and all my miners would connect to this machine, and then to the actual pools. Miners can be configured for various coins (regular scrypt, vertcoin, scrypt-jane, keccak ... of course all miners would mine the same type of coin at once).

Any suggestions?
legendary
Activity: 1456
Merit: 1018
HoneybadgerOfMoney.com Weed4bitcoin.com
February 23, 2014, 08:13:22 PM
#7
Sorry to hijack this so much later but I found that using the standard stratum mining proxy program from slush's pool let me do this.  Using a host machine that is configured with a static IP, I point all miners to this machine and the stratum proxy feeds them work.  Details of how to do this with linux were answered here: http://bitcoin.stackexchange.com/questions/22476/i-have-8-antminers-is-there-a-way-i-could-change-their-pool-credentials-all-at/22551?noredirect=1#22551 which was answered by mcstar.

particularly:

Quote
Here are the instructions for setting a mining proxy which allows all your miners to connect via the proxy instead of via their own config. This way you only have to stop then start a single process on the proxy to change pools instead of messing with each miner to do the switch.

Setup mining_proxy.py on a linux machine
pont slush's mining_proxy.py at a pool of your choosing using a bash script file (remember to chmod 755 so you can run the bash script with ./)
setup each pool you want to mine with it's own script (same -sp (port) for each )
point all your miners at the proxy server with the port you are using
make sure all pools use the same worker names and passwords (since this is setup on the miners)
start your chosen bash script (best to use screen so you can exit the session and leave it running)
miners can be switched by ssh via screen -d -r , then ctrl-c (to kill the proxy), now just run the correct bash script to switch to the next pool.

I found this thread because I was looking for a fancy way to have a script read coinchoose api for the most profitable coin and to then turn on that stratum proxy,  So that I'm mining a group of profitable coins and not just the one I have configured.  I have my miners themselves setup to mine a failover pool if the alt-coin pool is down.
hero member
Activity: 840
Merit: 1002
December 14, 2013, 08:32:30 PM
#6
I tried MultiMiner. bfgminer seems to work well with it, but cgminer gets h-not-zero errors for all shares.

I then found out that MultiMiner uses bfgminer as stratum proxy. Compiled a new version of bfgminer and ran it on the mining PC - same result - bfgminer works with it, but cgminer gets h-not-zero errors.

Both bfgminer and cgminer work properly when connected to an actual pool.

Yes, Luke knows about this issue and is looking into it. In the meantime either use bfgminer rather than cgminer (to connect to the proxy) or use the GetWork port rather than the Stratum port. And maybe pop over to the bfgminer thread to mention this as well so Luke knows there are several users running into it:

https://bitcointalksearch.org/topic/old-bfgminer-3100-modular-asicfpga-gbtstrtm-rpc-maclnxw64-antu1-drb-168174
full member
Activity: 126
Merit: 100
December 14, 2013, 08:25:06 PM
#5
I tried MultiMiner. bfgminer seems to work well with it, but cgminer gets h-not-zero errors for all shares.

I then found out that MultiMiner uses bfgminer as stratum proxy. Compiled a new version of bfgminer and ran it on the mining PC - same result - bfgminer works with it, but cgminer gets h-not-zero errors.

Both bfgminer and cgminer work properly when connected to an actual pool.
hero member
Activity: 840
Merit: 1002
December 13, 2013, 11:15:55 PM
#4
I do not see a way to use it as a proxy server.

It's in there. It's shown in a couple of the screenshots. Install it, click Settings, Advanced miner settings. There's an option to enable the proxy there:



Then you can switch the coin it mines via the context menu.
full member
Activity: 126
Merit: 100
December 13, 2013, 11:00:27 PM
#3
Take a look at MultiMiner: http://multiminerapp.com

I do not see a way to use it as a proxy server. The mining devices are connected to a Linux PC that runs bfgminer (for a BFL device) and a modified cgminer (for Technobit HEX16B - no bfgminer support for it). I cannot move the devices to a Windows PC.

I need a simpler daemon. One that just sits between the stratum client (cgminer, bfgminer) and the actual pool, just gets the work from pool and sends it to the miner. Then I could just switch the pool manually or write a script to do it for me.
hero member
Activity: 840
Merit: 1002
December 13, 2013, 09:34:48 PM
#2
Hi, is there a way to have a stratum proxy server for multi pool mining? The idea is to have one place where I could specify the pool (with user/password) and not have to reconfigure each miner in order to switch pools (or coins) - I could just switch it in the proxy and all my miners would start working for the new pool.

Take a look at MultiMiner: http://multiminerapp.com
full member
Activity: 126
Merit: 100
December 13, 2013, 08:19:01 PM
#1
Hi, is there a way to have a stratum proxy server for multi pool mining? The idea is to have one place where I could specify the pool (with user/password) and not have to reconfigure each miner in order to switch pools (or coins) - I could just switch it in the proxy and all my miners would start working for the new pool.
Jump to: