Bitcoin Forum
November 02, 2024, 10:05:14 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: MinerSwitcher: profitability-based mining farm pool switching  (Read 5272 times)
salfter (OP)
Hero Member
*****
Offline Offline

Activity: 651
Merit: 501


My PGP Key: 92C7689C


View Profile WWW
October 19, 2014, 09:44:37 PM
Last edit: March 07, 2016, 07:15:59 PM by salfter
 #1

https://gitlab.com/salfter/MinerSwitcher

MinerSwitcher is a profitability-based mining farm pool switcher. For the set of coins you have configured, it will determine how many of each you can produce given your hardware, and determine what they're worth in Bitcoin. It will then reconfigure all of your miners accordingly. MinerSwitcher is algorithm-agnostic: you can have a mix of sha256 miners, scrypt miners, etc., and each will be switched to whatever is most profitable for it to mine.

Sometimes pools go down without much notice. Before switching coins, MinerSwitcher verifies that at least one of your configured pools is still up. If it isn't, it prints a warning and moves on to the next most profitable pool.  (I suspect that adding a notification mechanism (Pushover, perhaps?) is in order.)  

If configured, MinerSwitcher will also send Pushover notifications when a miner is down or pools aren't reachable.

MiningSwitcher is built around my ProfitLib library.

Example output, right after startup:

Code:
Sun Oct 19 14:19:29 2014: running ProfitLib
BTC 0.00835068
UNO 0.00507514
ZET 0.00195981
Sun Oct 19 14:19:46 2014: checking BTC pools
Sun Oct 19 14:19:48 2014: switching miner4 to BTC Guild
Sun Oct 19 14:19:50 2014: switching miner4 to Eligius
Sun Oct 19 14:19:51 2014: switching miner3 to BTC Guild
Sun Oct 19 14:19:53 2014: switching miner3 to Eligius
Sun Oct 19 14:19:54 2014: switching miner2 to BTC Guild
Sun Oct 19 14:19:55 2014: switching miner2 to Eligius
42 0.00310407
LTC 0.00227397
ANC 0.00224579
FTC 0.00213765
BTG 0.00003768
Sun Oct 19 14:19:56 2014: checking 42 pools
Sun Oct 19 14:19:56 2014: switching miner1 to HashFaster 42
Sun Oct 19 14:19:59 2014: sleep for 30 minutes

miner1 is a bunch of Gridseeds (11 orbs and a blade) hanging off a Raspberry Pi, running bfgminer.  miner2 is a Bitfury rig with a couple of BFL Jalapeños, running cgminer.  miner3 and miner4 are Antminer S1s.  They're all on my home LAN, but MinerSwitcher should also work with remote mining rigs as long as the cgminer/bfgminer RPC port is accessible to the machine running MinerSwitcher.

The only outside data dependency is Cryptsy, for exchange-rate information.  All of the remaining information MinerSwitcher needs is obtained directly from coin daemons running locally. I currently have 10 daemons (DOGE & NMC can be merge-mined and are counted as appropriate) running on a box with 4 GB of RAM; it works, but RAM is overcommitted.  I'll be kicking it up to 10 GB in the next day or two.

Tipjars: BTC 1TipsGocnz2N5qgAm9f7JLrsMqkb3oXe2 LTC LTipsVC7XaFy9M6Zaf1aGGe8w8xVUeWFvR | My Bitcoin Note Generator | Pool Auto-Switchers: zpool MiningPoolHub NiceHash
Bitgem Resources: Pool Explorer Paper Wallet
salfter (OP)
Hero Member
*****
Offline Offline

Activity: 651
Merit: 501


My PGP Key: 92C7689C


View Profile WWW
December 08, 2014, 07:25:50 PM
 #2

ProfitLib has been updated to support Bittrex, Coins-E, and C-CEX in addition to Cryptsy.  MinerSwitcher has likewise been updated to use the latest ProfitLib, which expands the range of coins it can handle.

Tipjars: BTC 1TipsGocnz2N5qgAm9f7JLrsMqkb3oXe2 LTC LTipsVC7XaFy9M6Zaf1aGGe8w8xVUeWFvR | My Bitcoin Note Generator | Pool Auto-Switchers: zpool MiningPoolHub NiceHash
Bitgem Resources: Pool Explorer Paper Wallet
salfter (OP)
Hero Member
*****
Offline Offline

Activity: 651
Merit: 501


My PGP Key: 92C7689C


View Profile WWW
July 08, 2015, 05:27:16 PM
 #3

ProfitLib now supports Poloniex and BleuTrade.  Coins-E support has been removed.  These changes are available to MinerSwitcher.

On more of an infrastructure-type note, the source repositories for both ProfitLib and MinerSwitcher no longer use submodules to pull in their dependencies.  Instead, dependencies should be installed systemwide.  The easiest way to get MinerSwitcher working on Gentoo Linux is to pull in my Portage overlay (https://github.com/salfter/portage) and the Bitcoin overlay (https://gitlab.com/bitcoin/gentoo) and install MinerSwitcher.  You'll most likely need to add a few ebuilds to /etc/portage/package.accept_keywords:

Code:
net-p2p/MinerSwitcher **
dev-python/pycgminer **
dev-python/bitcoinrpc ~*
dev-python/ProfitLib **
dev-python/bleuBot **
dev-python/poloniex **
dev-python/PyCCEX **
dev-python/PyCryptopia **
dev-python/PyCryptsy **
dev-python/python-bittrex **
dev-python/python-pushover ~*
dev-python/python-nmap ~*

Once that's done, build and install:

Code:
sudo emerge -av MinerSwitcher

On other platforms, dependencies can usually be installed by downloading the source, going into the directory, and issuing something like this:

Code:
sudo python setup.py install

Tipjars: BTC 1TipsGocnz2N5qgAm9f7JLrsMqkb3oXe2 LTC LTipsVC7XaFy9M6Zaf1aGGe8w8xVUeWFvR | My Bitcoin Note Generator | Pool Auto-Switchers: zpool MiningPoolHub NiceHash
Bitgem Resources: Pool Explorer Paper Wallet
salfter (OP)
Hero Member
*****
Offline Offline

Activity: 651
Merit: 501


My PGP Key: 92C7689C


View Profile WWW
March 07, 2016, 07:18:45 PM
 #4

Due to the impending SJW takeover of GitHub, I've moved my code repositories to GitLab.  OP updated accordingly.

Tipjars: BTC 1TipsGocnz2N5qgAm9f7JLrsMqkb3oXe2 LTC LTipsVC7XaFy9M6Zaf1aGGe8w8xVUeWFvR | My Bitcoin Note Generator | Pool Auto-Switchers: zpool MiningPoolHub NiceHash
Bitgem Resources: Pool Explorer Paper Wallet
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!