Hush-flavored NOMP
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
fekt 27231cf425 Rename to zaddr 1 month ago
coins Sample configs and other stuff from hushpool.is 2 years ago
libs Merge pull request 'hushpool.is changes and JS updates' (#4) from fekt/hnomp:master into master 2 years ago
pool_configs Removing ac_founders 5 months ago
scripts init 6 years ago
website Rename to zaddr 1 month ago
.dockerignore Dockerize 3 years ago
.gitignore hushpool.is changes and JS updates 2 years ago
CONFIGURE.md some updates 3 years ago
Dockerfile bringing the hush puppy in 3 years ago
LICENSE Create LICENSE 6 years ago
README.md Update 'README.md' 5 months ago
coins.template Disablecb (#19) 5 years ago
config_example.json some updates 3 years ago
docker-compose.yml bringing the hush puppy in 3 years ago
gencfg.sh some updates 3 years ago
init.js try to add redis auth 3 years ago
package.json Updating to our own node-stratum-pool 5 months ago
pm2.json add pm2 config 3 years ago
poolconfigs.template Add trackShares template example 6 years ago

README.md

Mining stratum for Hush and Hush Smart Chains

Table of Contents

Differences between this and Z-NOMP

  • This is meant for Hush and Hush smartchain mining
  • ZEC/ZEN specific stuff is removed

Using Docker (easy)

This method sets up 2 docker containers, one with hnomp and one with redis.

It will directly use your host system's network so you can connect to the coin daemon without opening up RPC beyond 127.0.0.1.

The ports it listens on must not be in use, this includes 8080 for the website, 6379 for redis and any ports you open for stratums (default is 3333).

It is currently untested, but config.json has the ports as line items, so perhaps they can be changed in that file.

Requirements

Install Docker and docker-compose

Docker Install

git clone https://git.hush.is/hush/hnomp.git
cd ./hnomp
cp config_example.json config.json
  • Next follow this new config document and then come back to this one & start to get Docker up and running.

Then run the following command in the hnomp directory.

docker-compose up &

Docker stop

docker-compose down

To rebuild and update Docker version

docker-compose down
docker rmi knomp_knomp
git pull
docker-compose up &

Bare metal installation

Requirements

Upgrade

Please be sure to backup your ./coins and ./pool_configs directory before upgrading

Kill your running pool (CTRL-C)

cd hnomp
git pull
npm install
npm start

Continued Installation on either setup

Note: This setup from here-on applies to both Docker and bare-metal installations.

Install Daemon

# The following packages are needed to build both Hush and this stratum:
sudo apt-get update
sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python python-zmq zlib1g-dev wget libcurl4-openssl-dev bsdmainutils automake curl libboost-dev libboost-system-dev libsodium-dev jq redis-server nano -y

Now, let's build the Hush daemon. In order to not duplicate documentation, please follow the instructions in the hush3 repository here before proceeding.

Now, start up the Hush deamon which should start downloading its blockchain. This might take a couple of hours to a day to sync, depending on system speed/network connection.

If you are setting up a single chain to mine and/or don't know what pubkey is, skip this step and use the startup params for the hushd daemon as provided by the individual coin's team.

cd ~/hush3/src
./smartchains

Install Pool

Once all the blockchains you want on your pool have synced up we can configure the stratum.

We need node and npm installed to start and recommend you install them via your Linux OS's package manager.

cd ~
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

Now, let's build our stratum and run it. This will install the pool and configure it for all the smartchains on your system automatically. It must be run from the same user as the coin deamons were launched, as it pulls the rpcuser/pass from the conf file in the home directory.

git clone https://git.hush.is/hush/hnomp.git
cd ./hnomp
npm install
cp config_example.json config.json (and configure it)
nano gencfg.sh

Edit line 7 to your own HUSH based address...

We need to generate the coins files (coin daemon must be running!): gencfg.sh <coin name>

You can run just gencfg.sh with no coin name to use the smartchains.json in hush3/src directory for all coins. Make sure you edit the template with the correct values you want before running the config generator.

Finally we are ready to start the pool software

npm start

If all went well the program should start without error and you should be able to browse to your pool website on your server via port 8080.

Dependencies/Install Issues

Note: This was last tested and successfully runs with node 10.24.1 and npm 6.14.12. If you have issues with install, try these specific versions. It is recommended to use NVM to easily install and change versions.

Installing NVM on Ubuntu

sudo apt install curl 
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash 

Install and use node 10.24.1 (should install npm 6.14.12 by default)

nvm install 10.24.1

Clearing cache and deleting node_modules for rebuilding

sudo npm cache clean --force
sudo rm -r node_modules

More Config Information

Disable Coinbase Mode

This mode uses -pubkey to tell the daemon where the coinbase should be sent, and uses the daemons coinbase transaction rather then having the pool create the coinbase transaction. This enables special coinbase transactions, such as ac_founders and ac_script or new modes with CC vouts in the coinbase not yet created, it will work with all coins, except Full Z support described below.

To enable it, change the value in the ./coins/*.json to "disablecb" : true

The pool fee is taken in the payment processor using this mode, and might not be 100% accurate down to the single satoshi, so the pool address may end up with some small amount of coins over time.

Payment Processing

Please note that the default configs generated are for solo mining. If you wish to create a public pool please modify the configs like in this example config

There is now a config option you can add to your pool_configs/coin.json to toggle making an attempt at a payment upon pool startup.

"paymentProcessing": {
    "payOnStart": true,
    ...
}

Invalid Worker Addresses

You can add an option to your pool_config to have any miners that mine with an invalid address (if they somehow get through) to pay out to an address of your choosing

"invalidAddress":"zsValidAddressOfYourChoosingThatsNotThePoolZAddress"

Full Z Transaction Support (Sprout)

This is an option to force miners to use a Z address as their username for payouts

In your coins file add:

"privateChain": true,
"burnFees": true

Sapling and Sapling Payment Support

In coins/hush.json file:

"privateChain": true,
"burnFees": true,
"sapling": true

In pool_config:

"zAddress": "zsPoolsSaplingAddress",
"walletInterval": 2,
"validateWorkerUsername": true,
"paymentProcessing": {
    "minConf": 5,
    "paymentInterval": 180,
    "maxBlocksPerPayment": 20,

More Resources

  1. This resource has further info on configs and was a great help.

  2. This repository has sample configs is an old Z-NOMP with pool configurations, so these were helpful to see other options.

  3. Reference the hush.json here to configure your coin file, but refer to this repo to help learn more about coin files in general.

License

Released under the GNU General Public License v2 http://www.gnu.org/licenses/gpl-2.0.html

Forked from z-classic/z-nomp which is incorrectly licensed under MIT License - see zone117x/node-open-mining-portal

2016-2022 The Hush Developers