Run your own Bithereum Mining Pool-GitHub

Run your own Bithereum Mining Pool-GitHub

Blockchain
September 21, 2019 by admin
474
UPLOADING 1 / 1 – bithereum mininig pool github.png ATTACHMENT DETAILS bithereum mininig pool github

Bithereum Mining Pool

Feel free to run your own bithereum pool if you have the resources and expertise to handle the work involved in maintaining one. The code within this repo is a forked version of z-nomp modified for Equihash coins.

Requirements

Make sure you have done all the requirements before continuing. If you use old versions of Node.js or Redis that may come with your system package manager then you will have problems. Follow the linked instructions to get the last stable versions.

Step 1: Setting up coin daemon

Follow the installation instructions for your bithereum daemon. Your bithereum.conf file (usually located in ~/.bithereum/ folder by default) should end up looking something like the following.

txindex=1
daemon=1
rpcuser=bithereum
rpcpassword=bithereum
rpcport=8332

Step 2: Downloading & Installing

Clone this repository run the following commands from within the root level of the cloned folder. Alternatively, you can install this pool by using the pool installation script here.

sudo apt-get update -y
sudo apt-get install npm -y
sudo npm install n -g -y
sudo n v7
sudo apt update
sudo apt install redis-server -y
git clone https://github.com/BTHPOS/pool-z-nomp.git pool
cd pool
npm update
npm install

Step 3: Configure Pool

Update bth.json or bth_testnet.json to fit the changes you would like for your pool. Each file will have an enabled field at the top of the JSON. Set enabled equal to true for the file you would like to use. Be sure config files not in use have enabled set to false.

Step 4: Start the Pool

npm start

Additional Notes

  • Redis security warning: be sure firewall access to redis – an easy way is to include bind 127.0.0.1 in your redis.conf file. Also it’s a good idea to learn about and understand software that you are using – a good place to start with redis is data persistence.
  • For redundancy, its recommended to have at least two Bithereum daemon instances running in case one drops out-of-sync or offline, all instances will be polled for block/transaction updates and be used for submitting blocks. Creating a backup daemon involves spawning a daemon using the -datadir=/backup command-line argument which creates a new daemon instance with it’s own config directory and coin.conf file. Learn about the daemon, how to use it and how it works if you want to be a good pool operator. For starters be sure to read:
  • Use something like forever to keep the node script running in case the master process crashes.
  • Use something like redis-commander to have a nice GUI for exploring your redis database.
  • Use something like logrotator to rotate log output from Z-NOMP.
  • Use New Relic to monitor your Z-NOMP instance and server performance.

Setting up blocknotify (Optional)

  1. In config.json set the port and password for blockNotifyListener
  2. In your daemon conf file set the blocknotify command to use:
node [path to cli.js] [coin name in config] [block hash symbol]

Example: inside zclassic.conf add the line

blocknotify=node /home/user/z-nomp/scripts/cli.js blocknotify zclassic %s

Alternatively, you can use a more efficient block notify script written in pure C. Build and usage instructions are commented in scripts/blocknotify.c.

Upgrading Z-NOMP

When updating Z-NOMP to the latest code its important to not only git pull the latest from this repo, but to also update the node-stratum-pool and node-multi-hashing modules, and any config files that may have been changed.

  • Inside your Z-NOMP directory (where the init.js script is) do git pull to get the latest Z-NOMP code.
  • Remove the dependenices by deleting the node_modules directory with rm -r node_modules.
  • Run npm update to force updating/reinstalling of the dependencies.
  • Compare your config.json and pool_configs/coin.json configurations to the latest example ones in this repo or the ones in the setup instructions where each config field is explained. You may need to modify or add any new changes.

Credits

Bithereum

Z-NOMP

NOMP

 

  • zelcashZelCash (ZEL) $ 0.051271 2.56%
  • ycashYcash (YEC) $ 0.294269 3.04%
  • bitcoinzBitcoinZ (BTCZ) $ 0.000114 10.57%
  • hushHush (HUSH) $ 0.087638 11.74%
  • bitcoin-privateBitcoin Private (BTCP) $ 0.144497 7.33%
  • bithereumBithereum (BTH) $ 0.016830 57.86%
  • snowgemSnowGem (XSG) $ 0.019142 5.63%