Skip to content

Run a Bithereum pool of your own by using a forked version of z-nomp

License

Notifications You must be signed in to change notification settings

BTHPOS/pool-z-nomp

Repository files navigation

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

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

License

Released under the MIT License. See LICENSE file.