Bretheren and ladies,
I hope this finds you doing well. I have recently completed a Jell-O wrestling bout in regards to setting up a diverse mining network with multiple miner clients to a stratum proxy and I thought I’d share some of my experiences. I *THINK* this same info must exist somewhere BUT I couldn’t fine it sooooooo I recreated the wheel and this is how I did it. First things first, my internet connectivity is provided by via a cable modem and I am allotted 5 static IPs. The basic network physical layout looks like ->
InterWebs->SMC_Cable_Modem->4_Inerface_MikroTik_RB750G
The 5_Inerface_MikroTik_RB750G’s physical port and IP assignments are as follows
->Port1 with 5 REAL IPv4 IPs(x.x.x.129-133)
->Port2 192.168.119.0/24 WITH DHCP service on port to clients ranging from .50 to .254
->Port3 192.168.120.0/24 WITH DHCP service on port to clients ranging from .50 to .254
->Port4 192.168.121.0/24 WITH DHCP service on port to clients ranging from .50 to . 254
->Port5 192.168.122.0/24 servicing Cisco E3500 wireless route and thus wireless devices
None of my mining infrastructure is wireless and it is all connected to a 10/100/1000 ethernet switch hung off of Port 3. Further, all of the REAL IPv4 addresses are SRC –NAT *FROM* and for certain services DST-NAT to the networks and/or devices present or represented by those RFC1918 networks . For my mining infrastructure I have a Banging AM3+ machine running Ubuntu 13.04, my stratum proxy(s) [you’ll see why I put the (s) there in a moment] and btcminer java client for my Ztex gear. On this same .120.0/24 network I have a RasPi head that runs my bfgminer client that is connected to a farm of Block Erupter USB sticks. As well, on this same .120.0/24 network I have a number of Gen 1 Block Erupter blades (in quite the gangstah’-ghetto PVC rack) running. Setting up each of these miners is beyond the scope of this except to say they all connect to my AM3+ box to get their mining work and the stratum proxy(s) on that box connect to the stratum server.
Here’s the thing that caused me to pull out what little hair I have left …. THAT DAMN STRATUM PROXY SETUP. Here’s what I was doing initially that WAS NOT providing me the mining satisfaction I so dearly sought ….. I was trying to fire up that stratum proxy and allow it to listen for BOTH stratum clients *AND* a DIVERSE set of getwork clients in the same stratum proxy process. Sure, I was able to do this with only ONE farm of stratum devices from ONE stratum client and ONE farm of getwork clients from ONE getwork client. However, the moment I tried to connect to said stratum proxy from my Block Erupter Blades (which are getwork clients) the Blades would NOT get work OR would return only “Round Invalid” shares This was a pain in my arse …. As you might imagine. For your reference here’s what my initial stratum proxy startup line looked like ->
/opt/stratum-mining-proxy/mining_proxy.py -o FAKE.FAKE.mining.com -p 3334 –sh localhost -sp 3335 –oh localhost –gp 3336
Like I said, the Blades would not play nice in this environment. As soon as BOTH stratum clients *AND* getwork clients were connected to the proxy the Blades would fall out and misbehave *OR* would not connect after the btcminer connected. This *might* have been due to the stratum proxy not being able to keep up with the load BUT I kinda doubt that. In any case, my remedy was to write a start up shell script to start up a dedicated stratum proxy dedicated to stratum hosts and two different stratm proxy instances able to split the getwork clients across them. First things first, to run Slush’s stratum proxy you’ll need to go get it at
https://github.com/slush0/stratum-mining-proxy . Once you’ve done that and installed it per the Slush instructions, here’re the scripts ->
Stratum client script ::
#!/bin/bash
/opt/stratum-mining-proxy/mining_proxy.py -o FAKE.FAKE.mining.com -p 3334 -sp 3335
############END STRATUM SCRIPT#############
FIRST getwork client script ::
#!/bin/bash
/opt/stratum-mining-proxy/mining_proxy.py -o FAKE.FAKE.mining.com -p 3334 -sp 3336
############END FIRST GETWORK SCRIPT#############
Second getwork client script ::
#!/bin/bash
/opt/stratum-mining-proxy/mining_proxy.py -o FAKE.FAKE.mining.com -p 3334 -sp 3338
############END SECOND GETWORK SCRIPT#############
Once I spun up my stratum mining clients and had them connect to port 3335 at IP x.x.120.3 that seemed to work fine, then the btcminer for the Ztex devices as getwork client(s) to port 3336 at IP x.x.120.3 and finally I spanned my Block Erupter blades evenly across port 3336 at IP x.x.120.3 *AND* port 3338 at IP x.x.120.3.
Should you find yourself needing to setup a mining environment like this and you find a need to setup your Block Erupter Gen1 blades please, please, please follow Dogie’s VERY, VERY AWESOME setup guide at
https://bitcointalksearch.org/topic/guide-dogies-comprehensive-asicminer-blade-setup-205369 . The part where one sets up their stratum server and ports is where I set it to x.x.120.3, x.x.120.3 and 3336,3338 respectively. Now, let's say you've had success doing this another way .... please share.
If this was useful to you please feel free to toss me a little BTC to address 1HaZvsUjJpcAf76QWg7Muu4mnWRWCrRNMs . Have a nice day.
H@shKraker