Skip to content
 
 

Repository files navigation

s-nomp: Some New Open Mining Portal

NOTE: We're working on putting together an "official" s-nomp which can be supported by many coins and pools instead of so many running their own flavors. More to come!

This is a Equihash mining pool based off Node Open Mining Portal.

Production Usage Notice

This is beta software. All of the following are things that can change and break an existing s-nomp setup: functionality of any feature, structure of configuration files and structure of redis data. If you use this software in production then DO NOT pull new code straight into production usage because it can and often will break your setup and require you to tweak things like config files or redis data. Only tagged releases are considered stable.

Paid Solution

Usage of this software requires abilities with sysadmin, database admin, coin daemons, and sometimes a bit of programming. Running a production pool can literally be more work than a full-time job.

Community / Support

Please join our Discord to follow development. Any support questions can be answered here quickly as well.

https://discord.gg/4mVaTsH

Usage

Requirements

Seriously

These are legitimate requirements. 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.

Note: Node.js 20.x LTS is required for compatibility with Ubuntu 24.04 and modern security patches. Node 8.11 is EOL and no longer supported.

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.

0) Setting up coin daemon

Follow the build/install instructions for your coin daemon. Your coin.conf file should end up looking something like this:

daemon=1
rpcuser=zclassicrpc
rpcpassword=securepassword
rpcport=8232

For redundancy, its recommended to have at least two 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:

1) Downloading & Installing

First, install system dependencies and Node.js:

sudo apt-get install build-essential libsodium-dev npm libboost-all-dev redis-server
sudo npm install n -g
sudo n stable

Clone the repository and run the installation script:

git clone https://github.com/raw391/s-nomp.git s-nomp
cd s-nomp
bash scripts/install.sh

The installation script will:

  • Check all dependencies (Node.js 20+, Redis, build tools)
  • Install npm packages
  • Build native modules (equihashverify, bignum)
  • Patch jobManager.js for Node.js 20.x compatibility (makes verushash optional)
  • Verify PM2 is available

2) Configuration

Pool config

Take a look at the example json file inside the pool_configs directory. Rename it to zclassic.json and change the example fields to fit your setup.

The pool_configs directory contains example configurations for various coins. Each file shows:

  • Daemon connection settings (host, port, user, password)
  • Pool payout addresses (transparent address, z-address if applicable)
  • Port configuration for miners
  • Payment processing settings
  • Fee percentages
Main config

Copy and edit the main configuration file:

cp config_example.json config.json

Edit config.json to configure:

  • Redis connection settings
  • Website host and port
  • Clustering options
  • Logging preferences
Examples directory

The examples/ directory contains helpful configuration examples:

  • example_nginx - Nginx reverse proxy configuration for running the pool website behind nginx (recommended for SSL/TLS)
Please Note that: 1 Difficulty is actually 8192, 0.125 Difficulty is actually 1024.

Whenever a miner submits a share, the pool counts the difficulty and keeps adding them as the shares. 

ie: Miner 1 mines at 0.1 difficulty and finds 10 shares, the pool sees it as 1 share. Miner 2 mines at 0.5 difficulty and finds 5 shares, the pool sees it as 2.5 shares. 
[Optional, recommended] Setting up blocknotify
  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/s-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.

3) Start the pool

Using PM2 (Recommended for Production)

PM2 is a production process manager that keeps your pool running and automatically restarts it if it crashes:

pm2 start ecosystem.config.js
pm2 save
pm2 startup  # Follow the instructions to enable PM2 on system boot

To view logs:

pm2 logs s-nomp

To stop/restart:

pm2 stop s-nomp
pm2 restart s-nomp
Using npm start (Development/Testing)

For development or testing, you can run directly:

npm start
Optional enhancements for your awesome new mining pool server setup:
  • Use something like redis-commander to have a nice GUI for exploring your redis database.
  • Use something like logrotator to rotate log output from s-nomp.
  • Use New Relic to monitor your s-nomp instance and server performance.

Upgrading s-nomp

When updating s-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 s-nomp directory (where the init.js script is) do git pull to get the latest s-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

s-nomp

z-nomp

NOMP

License

Released under the MIT License. See LICENSE file.

About

Mining pool software for all equihash coins.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages