2014-03-27 15:29:43 -07:00
# NOMP ![NOMP Logo](http://zone117x.github.io/node-open-mining-portal/logo.svg "NOMP Logo")
2014-03-07 14:16:27 -08:00
#### Node Open Mining Portal
2014-02-28 19:12:59 -08:00
2014-03-01 12:18:07 -08:00
This portal is an extremely efficient, highly scalable, all-in-one, easy to setup cryptocurrency mining pool written
2014-04-15 15:38:51 -07:00
entirely in Node.js. It contains a stratum poolserver; reward/payment/share processor; and a (*not yet completed*)
responsive user-friendly front-end website featuring mining instructions, in-depth live statistics, and an admin center.
#### Table of Contents
* [Features ](#features )
2014-04-20 11:10:19 -07:00
* [Attack Mitigation ](#attack-mitigation )
2014-04-15 15:38:51 -07:00
* [Security ](#security )
* [Planned Features ](#planned-features )
* [Community Support ](#community--support )
* [Usage ](#usage )
* [Requirements ](#requirements )
* [Setting Up Coin Daemon ](#0-setting-up-coin-daemon )
* [Downloading & Installing ](#1-downloading--installing )
* [Configuration ](#2-configuration )
* [Portal Config ](#portal-config )
* [Coin Config ](#coin-config )
* [Pool Config ](#pool-config )
* [Setting Up Blocknotify ](#optional-recommended-setting-up-blocknotify )
* [Starting the Portal ](#3-start-the-portal )
* [Upgrading NOMP ](#upgrading-nomp )
* [Donations ](#donations )
* [Credits ](#credits )
* [License ](#license )
### Features
2014-03-14 15:12:26 -07:00
2014-03-27 11:40:57 -07:00
* For the pool server it uses the highly efficient [node-stratum-pool ](//github.com/zone117x/node-stratum-pool ) module which
2014-03-31 10:29:36 -07:00
supports vardiff, POW & POS, transaction messages, anti-DDoS, IP banning, [several hashing algorithms ](//github.com/zone117x/node-stratum-pool#hashing-algorithms-supported ).
2014-03-14 15:12:26 -07:00
2014-03-27 11:40:57 -07:00
* The portal has an [MPOS ](//github.com/MPOS/php-mpos ) compatibility mode so that the it can
function as a drop-in-replacement for [python-stratum-mining ](//github.com/Crypto-Expert/stratum-mining ). This
2014-03-06 23:04:48 -08:00
mode can be enabled in the configuration and will insert shares into a MySQL database in the format which MPOS expects.
2014-04-15 17:09:26 -07:00
For a direct tutorial see the wiki page [Setting up NOMP for MPOS usage ](//github.com/zone117x/node-open-mining-portal/wiki/Setting-up-NOMP-for-MPOS-usage ).
2014-03-06 23:04:48 -08:00
2014-03-14 15:12:26 -07:00
* Multi-pool ability - this software was built from the ground up to run with multiple coins simultaneously (which can
have different properties and hashing algorithms). It can be used to create a pool for a single coin or for multiple
coins at once. The pools use clustering to load balance across multiple CPU cores.
2014-02-28 19:12:59 -08:00
2014-03-14 15:12:26 -07:00
* For reward/payment processing, shares are inserted into Redis (a fast NoSQL key/value store). The PROP (proportional)
2014-03-22 19:08:33 -07:00
reward system is used with [Redis Transactions ](http://redis.io/topics/transactions ) for secure and super speedy payouts.
2014-04-28 14:04:12 -07:00
There is zero risk to the pool operator. Shares from rounds resulting in orphaned blocks will be merged into share in the
current round so that each and every share will be rewarded
2014-03-02 13:36:41 -08:00
2014-03-14 15:12:26 -07:00
* This portal does not have user accounts/logins/registrations. Instead, miners simply use their coin address for stratum
2014-03-01 12:18:07 -08:00
authentication. A minimalistic HTML5 front-end connects to the portals statistics API to display stats from from each
pool such as connected miners, network/pool difficulty/hash rate, etc.
2014-02-28 19:12:59 -08:00
2014-04-26 15:52:47 -07:00
* Coin-switching ports using coin-networks and crypto-exchange APIs to detect profitability. Miner's connect to these ports
with their public key which NOMP uses to derive an address for any coin needed to be paid out.
2014-04-08 11:33:13 -07:00
2014-04-05 17:35:28 -07:00
#### Attack Mitigation
2014-04-05 17:45:05 -07:00
* Detects and thwarts socket flooding (garbage data sent over socket in order to consume system resources).
2014-04-05 17:35:28 -07:00
* Detects and thwarts zombie miners (botnet infected computers connecting to your server to use up sockets but not sending any shares).
* Detects and thwarts invalid share attacks:
2014-04-05 17:42:48 -07:00
* NOMP is not vulnerable to the low difficulty share exploits happening to other pool servers. Other pool server
software has hardcoded guesstimated max difficulties for new hashing algorithms while NOMP dynamically generates the
max difficulty for each algorithm based on values founds in coin source code.
2014-04-05 17:35:28 -07:00
* IP banning feature which on a configurable threshold will ban an IP for a configurable amount of time if the miner
submits over a configurable threshold of invalid shares.
* NOMP is written in Node.js which uses a single thread (async) to handle connections rather than the overhead of one
thread per connection, and clustering is also implemented so all CPU cores are taken advantage of.
2014-03-06 23:04:48 -08:00
2014-04-05 17:36:24 -07:00
#### Security
NOMP has some implicit security advantages for pool operators and miners:
* Without a registration/login system, non-security-oriented miners reusing passwords across pools is no longer a concern.
* Automated payouts by default and pool profits are sent to another address so pool wallets aren't plump with coins -
giving hackers little reward and keeping your pool from being a target.
* Miners can notice lack of automated payments as a possible early warning sign that an operator is about to run off with their coins.
2014-03-06 23:04:48 -08:00
#### Planned Features
2014-03-24 13:00:18 -07:00
* NOMP API - Used by the website to display stats and information about the pool(s) on the portal's front-end website,
and by the NOMP Desktop app to retrieve a list of available coins (and version-bytes for local wallet/address generation).
2014-03-15 19:48:53 -07:00
2014-03-06 23:04:48 -08:00
* To reduce variance for pools just starting out which have little to no hashing power a feature is planned which will
2014-03-01 12:18:07 -08:00
allow your own pool to connect upstream to a larger pool server. It will request work from the larger pool then
redistribute the work to our own connected miners.
2014-02-28 19:12:59 -08:00
2014-04-15 15:38:51 -07:00
### Community / Support
2014-03-19 14:32:18 -07:00
IRC
* Support / general discussion join #nomp: https://webchat.freenode.net/?channels=#nomp
* Development discussion join #nomp -dev: https://webchat.freenode.net/?channels=#nomp-dev
2014-03-07 14:16:27 -08:00
2014-03-19 14:32:18 -07:00
Join our subreddit [/r/nomp ](http://reddit.com/r/nomp )!
2014-03-07 14:16:27 -08:00
2014-03-13 14:30:33 -07:00
*Having problems getting the portal running due to some module dependency error?* It's probably because you
2014-03-13 14:26:54 -07:00
didn't follow the instructions in this README. Please __read the usage instructions__ including [requirements ](#requirements ) and [downloading/installing ](#1-downloading--installing ). If you've followed the instructions completely and are still having problems then open an issue here on github or join our #nomp IRC channel and explain your problem :).
2014-03-07 14:16:27 -08:00
If your pool uses NOMP let us know and we will list your website here.
2014-04-09 21:53:35 -07:00
##### Some pools using NOMP or node-stratum-module:
* http://chunkypools.com
* http://clevermining.com
* http://rapidhash.net
2014-04-15 15:38:51 -07:00
* http://suchpool.pw
2014-04-09 21:53:35 -07:00
* http://hashfaster.com
2014-04-15 15:38:51 -07:00
* http://miningpoolhub.com
2014-04-23 11:53:19 -07:00
* http://teamdoge.com
2014-04-23 22:59:53 -07:00
* http://miningwith.us
2014-04-09 21:53:35 -07:00
* http://kryptochaos.com
2014-04-28 14:04:12 -07:00
* http://uberpools.org
2014-04-23 23:02:38 -07:00
* http://onebtcplace.com
2014-04-26 15:23:23 -07:00
* http://minr.es
* http://mining.theminingpools.com
2014-04-28 14:04:12 -07:00
* http://www.omargpools.ca/pools.html
* http://pool.trademybit.com/
2014-03-01 11:47:42 -08:00
Usage
=====
2014-03-06 23:12:04 -08:00
#### Requirements
2014-03-12 21:57:04 -07:00
* Coin daemon(s) (find the coin's repo and build latest version from source)
* [Node.js ](http://nodejs.org/ ) v0.10+ ([follow these installation instructions](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager))
* [Redis ](http://redis.io/ ) key-value store v2.6+ ([follow these instructions](http://redis.io/topics/quickstart))
2014-03-06 23:12:04 -08:00
2014-04-16 05:44:57 -07:00
##### Seriously
Those 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.
2014-03-06 23:12:04 -08:00
2014-03-24 13:00:18 -07:00
#### 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=litecoinrpc
rpcpassword=securepassword
rpcport=19332
```
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
2014-03-27 11:43:45 -07:00
involves spawning a daemon using the `-datadir=/backup` command-line argument which creates a new daemon instance with
2014-03-28 10:38:59 -07:00
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:
2014-03-24 13:00:18 -07:00
* https://en.bitcoin.it/wiki/Running_bitcoind
2014-03-28 10:38:59 -07:00
* https://en.bitcoin.it/wiki/Data_directory
* https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list
* https://en.bitcoin.it/wiki/Difficulty
2014-03-24 13:00:18 -07:00
2014-03-13 14:26:54 -07:00
#### 1) Downloading & Installing
2014-03-01 11:47:42 -08:00
2014-03-06 23:04:48 -08:00
Clone the repository and run `npm update` for all the dependencies to be installed:
2014-03-01 11:47:42 -08:00
```bash
2014-04-06 09:38:43 -07:00
git clone https://github.com/zone117x/node-open-mining-portal.git nomp
2014-03-26 16:41:07 -07:00
cd nomp
2014-03-01 11:47:42 -08:00
npm update
```
2014-03-13 14:02:50 -07:00
#### 2) Configuration
2014-03-01 11:47:42 -08:00
##### Portal config
2014-04-02 12:06:06 -07:00
Inside the `config_example.json` file, ensure the default configuration will work for your environment, then copy the file to `config.json` .
2014-03-13 14:02:50 -07:00
Explanation for each field:
````javascript
{
/* Specifies the level of log output verbosity. Anything more severy than the level specified
will also be logged. */
"logLevel": "debug", //or "warning", "error"
2014-04-26 15:23:23 -07:00
/* The NOMP CLI (command-line interface) will listen for commands on this port. For example,
blocknotify messages are sent to NOMP through this. */
"cliPort": 17117,
2014-03-13 14:02:50 -07:00
/* By default 'forks' is set to "auto" which will spawn one process/fork/worker for each CPU
core in your system. Each of these workers will run a separate instance of your pool(s),
and the kernel will load balance miners using these forks. Optionally, the 'forks' field
can be a number for how many forks will be spawned. */
"clustering": {
"enabled": true,
"forks": "auto"
},
2014-04-08 11:23:48 -07:00
/* This is the front-end. Its not finished. When it is finished, this comment will say so. */
"website": {
"enabled": true,
"port": 80,
2014-04-10 18:33:41 -07:00
/* Used for displaying stratum connection data on the Getting Started page. */
"stratumHost": "cryppit.com",
"stats": {
/* Gather stats to broadcast to page viewers and store in redis for historical stats
every this many seconds. */
"updateInterval": 15,
/* How many seconds to hold onto historical stats. Currently set to 24 hours. */
"historicalRetention": 43200,
/* How many seconds worth of shares should be gathered to generate hashrate. */
2014-04-15 15:38:51 -07:00
"hashrateWindow": 300
2014-04-10 18:33:41 -07:00
},
/* Not done yet. */
"adminCenter": {
"enabled": true,
"password": "password"
}
2014-04-08 11:23:48 -07:00
},
2014-04-15 15:38:51 -07:00
/* Redis instance of where to store global portal data such as historical stats, proxy states,
ect.. */
"redis": {
"host": "127.0.0.1",
"port": 6379
},
2014-04-08 11:23:48 -07:00
2014-04-26 15:31:27 -07:00
/* With this switching configuration, you can setup ports that accept miners for work based on
a specific algorithm instead of a specific coin. Miners that connect to these ports are
2014-04-08 11:23:48 -07:00
automatically switched a coin determined by the server. The default coin is the first
configured pool for each algorithm and coin switching can be triggered using the
2014-04-26 15:23:23 -07:00
cli.js script in the scripts folder.
2014-04-08 11:23:48 -07:00
2014-04-26 15:31:27 -07:00
Miners connecting to these switching ports must use their public key in the format of
RIPEMD160(SHA256(public-key)). An address for each type of coin is derived from the miner's
public key, and payments are sent to that address. */
"switching": {
"switch1": {
2014-04-08 11:23:48 -07:00
"enabled": false,
2014-04-26 15:31:27 -07:00
"algorithm": "sha256",
"ports": {
"3333": {
"diff": 10,
"varDiff": {
"minDiff": 16,
"maxDiff": 512,
"targetTime": 15,
"retargetTime": 90,
"variancePercent": 30
}
}
2014-04-08 11:23:48 -07:00
}
},
2014-04-26 15:31:27 -07:00
"switch2": {
2014-04-08 11:23:48 -07:00
"enabled": false,
2014-04-26 15:31:27 -07:00
"algorithm": "scrypt",
"ports": {
"4444": {
"diff": 10,
"varDiff": {
"minDiff": 16,
"maxDiff": 512,
"targetTime": 15,
"retargetTime": 90,
"variancePercent": 30
}
}
2014-04-08 11:23:48 -07:00
}
},
2014-04-26 15:31:27 -07:00
"switch3": {
2014-04-08 11:23:48 -07:00
"enabled": false,
2014-04-26 15:31:27 -07:00
"algorithm": "x11",
"ports": {
"5555": {
"diff": 0.001
}
}
2014-04-08 11:23:48 -07:00
}
2014-04-26 15:31:27 -07:00
},
"profitSwitch": {
"enabled": false,
"updateInterval": 600,
"depth": 0.90,
"usePoloniex": true,
"useCryptsy": true,
"useMintpal": true
2014-03-13 14:02:50 -07:00
}
}
````
2014-03-01 11:47:42 -08:00
##### Coin config
Inside the `coins` directory, ensure a json file exists for your coin. If it does not you will have to create it.
2014-03-06 23:04:48 -08:00
Here is an example of the required fields:
2014-03-01 17:41:14 -08:00
````javascript
2014-03-01 11:47:42 -08:00
{
"name": "Litecoin",
2014-03-02 13:36:41 -08:00
"symbol": "ltc",
2014-05-02 14:59:46 -07:00
"algorithm": "scrypt",
/* Magic value only required for setting up p2p block notifications. It is found in the daemon
source code as the pchMessageStart variable.
For example, litecoin mainnet magic: http://git.io/Bi8YFw
And for litecoin testnet magic: http://git.io/NXBYJA */
"peerMagic": "fbc0b6db" //optional
"peerMagicTestnet": "fcc1b7dc" //optional
//"txMessages": false, //options - defaults to false
//"mposDiffMultiplier": 256, //options - only for x11 coins in mpos mode
2014-03-01 11:47:42 -08:00
}
````
2014-03-02 13:36:41 -08:00
2014-05-02 14:59:46 -07:00
For additional documentation how to configure coins and their different algorithms
2014-04-01 08:41:13 -07:00
see [these instructions ](//github.com/zone117x/node-stratum-pool#module-usage ).
2014-03-31 16:44:05 -07:00
2014-03-01 11:47:42 -08:00
##### Pool config
2014-03-02 13:36:41 -08:00
Take a look at the example json file inside the `pool_configs` directory. Rename it to `yourcoin.json` and change the
2014-03-09 19:31:58 -07:00
example fields to fit your setup.
2014-03-01 11:47:42 -08:00
2014-03-02 13:36:41 -08:00
Description of options:
````javascript
{
2014-03-31 16:57:56 -07:00
"enabled": true, //Set this to false and a pool will not be created from this config file
2014-03-09 19:31:58 -07:00
"coin": "litecoin.json", //Reference to coin config file in 'coins' directory
2014-03-03 21:55:09 -08:00
2014-04-03 13:37:55 -07:00
"address": "mi4iBXbBsydtcc5yFmsff2zCFVX4XG7qJc", //Address to where block rewards are given
2014-05-02 14:59:46 -07:00
/* Block rewards go to the configured pool wallet address to later be paid out to miners,
2014-05-04 14:51:48 -07:00
except for a percentage that can go to, for examples, pool operator(s) as pool fees or
or to donations address. Addresses or hashed public keys can be used. Here is an example
of rewards going to the main pool op, a pool co-owner, and NOMP donation. */
2014-05-02 14:59:46 -07:00
"rewardRecipients": {
"n37vuNFkXfk15uFnGoVyHZ6PYQxppD3QqK": 1.5, //1.5% goes to pool op
"mirj3LtZxbSTharhtXvotqtJXUY7ki5qfx": 0.5, //0.5% goes to a pool co-owner
2014-05-04 17:56:13 -07:00
/* 0.1% donation to NOMP. This pubkey can accept any type of coin, please leave this in
your config to help support NOMP development. */
2014-05-02 14:59:46 -07:00
"22851477d63a085dbc2398c8430af1c09e7343f6": 0.1
},
2014-04-03 13:37:55 -07:00
"blockRefreshInterval": 1000, //How often to poll RPC daemons for new blocks, in milliseconds
2014-04-20 11:04:41 -07:00
/* Some miner apps will consider the pool dead/offline if it doesn't receive anything new jobs
for around a minute, so every time we broadcast jobs, set a timeout to rebroadcast
2014-04-03 13:37:55 -07:00
in this many seconds unless we find a new job. Set to zero or remove to disable this. */
"jobRebroadcastTimeout": 55,
//instanceId: 37, //Recommend not using this because a crypto-random one will be generated
/* Some attackers will create thousands of workers that use up all available socket connections,
usually the workers are zombies and don't submit shares after connecting. This feature
detects those and disconnects them. */
"connectionTimeout": 600, //Remove workers that haven't been in contact for this many seconds
/* Sometimes you want the block hashes even for shares that aren't block candidates. */
"emitInvalidBlockHashes": false,
/* We use proper maximum algorithm difficulties found in the coin daemon source code. Most
miners/pools that deal with scrypt use a guesstimated one that is about 5.86% off from the
actual one. So here we can set a tolerable threshold for if a share is slightly too low
due to mining apps using incorrect max diffs and this pool using correct max diffs. */
2014-05-02 14:59:46 -07:00
"shareVariancePercent": 2,
2014-03-02 13:36:41 -08:00
2014-04-15 15:38:51 -07:00
/* Enable for client IP addresses to be detected when using a load balancer with TCP proxy
protocol enabled, such as HAProxy with 'send-proxy' param:
http://haproxy.1wt.eu/download/1.5/doc/configuration.txt */
"tcpProxyProtocol": false,
2014-05-02 14:59:46 -07:00
/* To receive payments, miners must connect with their address or mining key as their username.
This option will only authenticate miners using an address or mining key. */
2014-05-03 03:09:51 -07:00
"validateWorkerUsername": true,
2014-04-15 15:38:51 -07:00
2014-05-02 14:59:46 -07:00
"paymentProcessing": {
"enabled": true,
2014-03-06 23:04:48 -08:00
2014-05-02 14:59:46 -07:00
/* Every this many seconds get submitted blocks from redis, use daemon RPC to check
their confirmation status, if confirmed then get shares from redis that contributed
to block and send out payments. */
"paymentInterval": 30,
2014-03-06 23:04:48 -08:00
2014-05-02 14:59:46 -07:00
/* Minimum number of coins that a miner must earn before sending payment. Typically,
a higher minimum means less transactions fees (you profit more) but miners see
payments less frequently (they dislike). Opposite for a lower minimum payment. */
"minimumPayment": 0.01,
2014-03-06 23:04:48 -08:00
2014-05-02 14:59:46 -07:00
/* This daemon is used to send out payments. It MUST be for the daemon that owns the
configured 'address' that receives the block rewards, otherwise the daemon will not
be able to confirm blocks or send out payments. */
"daemon": {
"host": "127.0.0.1",
"port": 19332,
"user": "litecoinrpc",
"password": "testnet"
2014-03-02 13:36:41 -08:00
}
},
2014-03-02 13:55:08 -08:00
2014-05-02 14:59:46 -07:00
/* Redis database used for storing share and block submission data and payment processing. */
"redis": {
"host": "127.0.0.1",
"port": 6379
2014-05-02 16:01:57 -07:00
},
2014-05-02 14:59:46 -07:00
/* Enabled this mode and shares will be inserted into in a MySQL database. You may also want
to use the "emitInvalidBlockHashes" option below if you require it. The config options
"redis" and "paymentProcessing" will be ignored/unused if this is enabled. */
"mposMode": {
"enabled": false,
"host": "127.0.0.1", //MySQL db host
"port": 3306, //MySQL db port
"user": "me", //MySQL db user
"password": "mypass", //MySQL db password
"database": "ltc", //MySQL db database name
/* Checks for valid password in database when miners connect. */
"checkPassword": true,
/* Unregistered workers can automatically be registered (added to database) on stratum
worker authentication if this is true. */
"autoCreateWorker": false
},
2014-04-15 15:38:51 -07:00
/* If a worker is submitting a high threshold of invalid shares we can temporarily ban their IP
2014-04-15 15:56:35 -07:00
to reduce system/network load. Also useful to fight against flooding attacks. If running
behind something like HAProxy be sure to enable 'tcpProxyProtocol', otherwise you'll end up
banning your own IP address (and therefore all workers). */
2014-03-06 13:27:30 -08:00
"banning": {
"enabled": true,
"time": 600, //How many seconds to ban worker for
"invalidPercent": 50, //What percent of invalid shares triggers ban
"checkThreshold": 500, //Check invalid percent when this many shares have been submitted
"purgeInterval": 300 //Every this many seconds clear out the list of old bans
},
/* Each pool can have as many ports for your miners to connect to as you wish. Each port can
be configured to use its own pool difficulty and variable difficulty settings. varDiff is
optional and will only be used for the ports you configure it for. */
"ports": {
"3032": { //A port for your miners to connect to
"diff": 32, //the pool difficulty for this port
/* Variable difficulty is a feature that will automatically adjust difficulty for
individual miners based on their hashrate in order to lower networking overhead */
"varDiff": {
"minDiff": 8, //Minimum difficulty
"maxDiff": 512, //Network difficulty will be used if it is lower than this
"targetTime": 15, //Try to get 1 share per this many seconds
"retargetTime": 90, //Check to see if we should retarget every this many seconds
"variancePercent": 30 //Allow time to very this % from target without retargeting
}
},
"3256": { //Another port for your miners to connect to, this port does not use varDiff
"diff": 256 //The pool difficulty
}
},
2014-03-24 13:00:18 -07:00
/* For redundancy, recommended to have at least two daemon instances running in case one
drops out-of-sync or offline. */
2014-03-02 13:36:41 -08:00
"daemons": [
2014-03-06 12:46:01 -08:00
{ //Main daemon instance
2014-04-15 15:38:51 -07:00
"host": "127.0.0.1",
2014-03-02 13:36:41 -08:00
"port": 19332,
"user": "litecoinrpc",
"password": "testnet"
},
2014-03-06 12:46:01 -08:00
{ //Backup daemon instance
2014-04-15 15:38:51 -07:00
"host": "127.0.0.1",
2014-03-02 13:36:41 -08:00
"port": 19344,
"user": "litecoinrpc",
"password": "testnet"
}
],
2014-04-16 10:50:33 -07:00
/* This allows the pool to connect to the daemon as a node peer to receive block updates.
2014-03-02 13:45:10 -08:00
It may be the most efficient way to get block updates (faster than polling, less
2014-05-02 14:59:46 -07:00
intensive than blocknotify script). It requires the additional field "peerMagic" in
the coin config. */
2014-03-02 13:36:41 -08:00
"p2p": {
"enabled": false,
2014-04-16 10:50:33 -07:00
/* Host for daemon */
2014-04-15 15:38:51 -07:00
"host": "127.0.0.1",
2014-04-16 10:50:33 -07:00
/* Port configured for daemon (this is the actual peer port not RPC port) */
2014-03-02 13:36:41 -08:00
"port": 19333,
2014-04-16 10:56:08 -07:00
/* If your coin daemon is new enough (i.e. not a shitcoin) then it will support a p2p
feature that prevents the daemon from spamming our peer node with unnecessary
transaction data. Assume its supported but if you have problems try disabling it. */
2014-05-02 14:59:46 -07:00
"disableTransactions": true
2014-03-02 13:36:41 -08:00
}
}
````
2014-03-01 11:47:42 -08:00
You can create as many of these pool config files as you want (such as one pool per coin you which to operate).
2014-03-04 12:24:02 -08:00
If you are creating multiple pools, ensure that they have unique stratum ports.
2014-03-01 11:47:42 -08:00
2014-03-25 15:21:17 -07:00
For more information on these configuration options see the [pool module documentation ](https://github.com/zone117x/node-stratum-pool#module-usage )
2014-03-01 11:47:42 -08:00
2014-02-28 19:12:59 -08:00
2014-03-07 00:10:17 -08:00
##### [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:
```
2014-04-26 15:23:23 -07:00
node [path to cli.js] [coin name in config] [block hash symbol]
2014-03-07 00:10:17 -08:00
```
Example: inside `dogecoin.conf` add the line
```
2014-04-26 15:23:23 -07:00
blocknotify=node /home/nomp/scripts/cli.js blocknotify dogecoin %s
2014-03-07 00:10:17 -08:00
```
2014-04-08 13:26:45 -07:00
Alternatively, you can use a more efficient block notify script written in pure C. Build and usage instructions
are commented in [scripts/blocknotify.c ](scripts/blocknotify.c ).
2014-02-28 19:12:59 -08:00
2014-01-13 17:32:54 -08:00
2014-03-01 11:47:42 -08:00
#### 3) Start the portal
2014-01-13 17:32:54 -08:00
2014-03-01 11:47:42 -08:00
```bash
2014-01-13 17:58:27 -08:00
node init.js
2014-03-01 11:51:48 -08:00
```
2014-03-13 14:09:54 -07:00
###### Optional enhancements for your awesome new mining pool server setup:
* Use something like [forever ](https://github.com/nodejitsu/forever ) to keep the node script running
2014-03-07 00:10:17 -08:00
in case the master process crashes.
2014-03-13 14:09:54 -07:00
* Use something like [redis-commander ](https://github.com/joeferner/redis-commander ) to have a nice GUI
for exploring your redis database.
2014-03-13 14:13:20 -07:00
* Use something like [logrotator ](http://www.thegeekstuff.com/2010/07/logrotate-examples/ ) to rotate log
output from NOMP.
2014-03-20 15:25:59 -07:00
* Use [New Relic ](http://newrelic.com/ ) to monitor your NOMP instance and server performance.
2014-03-07 00:10:17 -08:00
2014-03-01 11:51:48 -08:00
2014-04-06 09:55:47 -07:00
#### Upgrading NOMP
2014-04-21 11:40:19 -07:00
When updating NOMP to the latest code its important to not only `git pull` the latest from this repo, but to also update
the `node-statum-pool` and `node-multi-hashing` modules, and any config files that may have been changed.
2014-04-06 09:55:47 -07:00
* Inside your NOMP directory (where the init.js script is) do `git pull` to get the latest 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.
2014-04-10 18:33:41 -07:00
* 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.
2014-04-06 09:55:47 -07:00
2014-03-01 11:51:48 -08:00
Donations
---------
2014-03-01 12:18:07 -08:00
To support development of this project feel free to donate :)
2014-03-01 12:19:57 -08:00
2014-04-04 13:10:29 -07:00
* BTC: `1KRotMnQpxu3sePQnsVLRy3EraRFYfJQFR`
* LTC: `LKfavSDJmwiFdcgaP1bbu46hhyiWw5oFhE`
* VTC: `VgW4uFTZcimMSvcnE4cwS3bjJ6P8bcTykN`
* MAX: `mWexUXRCX5PWBmfh34p11wzS5WX2VWvTRT`
* QRK: `QehPDAhzVQWPwDPQvmn7iT3PoFUGT7o8bC`
* DRK: `XcQmhp8ANR7okWAuArcNFZ2bHSB81jpapQ`
* DOGE: `DBGGVtwAAit1NPZpRm5Nz9VUFErcvVvHYW`
* Cryptsy Trade Key: `254ca13444be14937b36c44ba29160bd8f02ff76`
2014-03-15 17:58:28 -07:00
Credits
-------
2014-04-08 12:00:54 -07:00
* [Jerry Brady / mintyfresh68 ](https://github.com/bluecircle ) - got coin-switching fully working and developed proxy-per-algo feature
2014-04-10 18:33:41 -07:00
* [Tony Dobbs ](http://anthonydobbs.com ) - designs for front-end and created the NOMP logo
2014-04-21 11:44:35 -07:00
* [LucasJones ](//github.com/LucasJones ) - got p2p block notify working and implemented additional hashing algos
2014-03-27 11:40:57 -07:00
* [vekexasia ](//github.com/vekexasia ) - co-developer & great tester
* [TheSeven ](//github.com/TheSeven ) - answering an absurd amount of my questions and being a very helpful gentleman
* [UdjinM6 ](//github.com/UdjinM6 ) - helped implement fee withdrawal in payment processing
2014-04-08 13:26:45 -07:00
* [Alex Petrov / sysmanalex ](https://github.com/sysmanalex ) - contributed the pure C block notify script
2014-04-15 15:38:51 -07:00
* [svirusxxx ](//github.com/svirusxxx ) - sponsored development of MPOS mode
2014-04-16 10:50:33 -07:00
* [icecube45 ](//github.com/icecube45 ) - helping out with the repo wiki
2014-04-15 15:38:51 -07:00
* Those that contributed to [node-stratum-pool ](//github.com/zone117x/node-stratum-pool#credits )
2014-03-15 17:58:28 -07:00
2014-03-01 11:51:48 -08:00
License
-------
Released under the GNU General Public License v2
2014-03-06 23:43:01 -08:00
http://www.gnu.org/licenses/gpl-2.0.html