Dockerized version of https://github.com/dvandal/cryptonote-nodejs-pool
10K+
This container is maintained by Funky Penguin's Geek Cookbook, a collection of "recipes" to run popular applications on Docker Swarm or Kubernetes, in a cheeky, geek format.
Got more details at:
This is a nodejs-based mining pool package for cryptonote coins, forked from https://github.com/dvandal/cryptonote-nodejs-pool
You want to run a Turtlecoin pool, for one thing. This repo includes support for turtlecoin oddities, like RPC password on wallet, and the new turtlcoin-lite algorithm.
High performance Node.js (with native C addons) mining pool for CryptoNote based coins. Comes with lightweight example front-end script which uses the pool's AJAX API. Support for Cryptonight (Original, Monero v7, Stellite v7), Cryptonight Light (Original, Aeon v7, IPBC) and Cryptonight Heavy (Sumokoin) algorithms.
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash
sudo apt-get install -y nodejs
sudo add-apt-repository ppa:chris-lea/redis-server
sudo apt-get update
sudo apt-get install redis-server
libssl required for the node-multi-hashing module
sudo apt-get install libssl-devBoost is required for the cryptoforknote-util module
sudo apt-get install libboost-all-devThose 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.
Redis warning: It'sa good idea to learn about and understand software that you are using - a good place to start with redis is data persistence.
Do not run the pool as root : create a new user without ssh access to avoid security issues :
sudo adduser --disabled-password --disabled-login your-user
To login with this user :
sudo su - your-user
Clone the repository and run npm update for all the dependencies to be installed:
git clone https://github.com/dvandal/cryptonote-nodejs-pool.git pool
cd pool
npm update
Copy the config_examples/COIN.json file of your choice to config.json then overview each options and change any to match your preferred setup.
Explanation for each field:
/* Pool host displayed in notifications and front-end */
"poolHost": "your.pool.host",
/* Used for storage in redis so multiple coins can share the same redis instance. */
"coin": "graft",
/* Used for front-end display */
"symbol": "GRFT",
/* Minimum units in a single coin, see COIN constant in DAEMON_CODE/src/cryptonote_config.h */
"coinUnits": 10000000000,
/* Number of coin decimals places for notifications and front-end */
"coinDecimalPlaces": 4,
/* Coin network time to mine one block, see DIFFICULTY_TARGET constant in DAEMON_CODE/src/cryptonote_config.h */
"coinDifficultyTarget": 120,
/* Set daemon type. Supported values: default, forknote (Fix block height + 1), bytecoin (ByteCoin Wallet RPC API, w/ block height fix), turtlecoin (ByteCoin Wallet RPC API but no block height fix required) */
"daemonType": "default",
/* Set Cryptonight algorithm settings.
Supported algorithms: cryptonight (default). cryptonight_light and cryptonight_heavy
Supported variants for "cryptonight": 0 (Original), 1 (Monero v7), 3 (Stellite / XTL)
Supported variants for "cryptonight_light": 0 (Original), 1 (Aeon v7), 2 (IPBC)
Supported blob types: 0 (Cryptonote), 1 (Forknote v1), 2 (Forknote v2), 3 (Cryptonote v2 / Masari) */
"cnAlgorithm": "cryptonight",
"cnVariant": 1,
"cnBlobType": 0,
/* Logging */
"logging": {
"files": {
/* Specifies the level of log output verbosity. This level and anything
more severe will be logged. Options are: info, warn, or error. */
"level": "info",
/* Directory where to write log files. */
"directory": "logs",
/* How often (in seconds) to append/flush data to the log files. */
"flushInterval": 5
},
"console": {
"level": "info",
/* Gives console output useful colors. If you direct that output to a log file
then disable this feature to avoid nasty characters in the file. */
"colors": true
}
},
/* Modular Pool Server */
"poolServer": {
"enabled": true,
/* Set to "auto" by default 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. */
"clusterForks": "auto",
/* Address where block rewards go, and miner payments come from. */
"poolAddress": "GBqRuitSoU3PFPBAkXMEnLdBRWXH4iDSD6RDxnQiEFjVJhWUi1UuqfV5EzosmaXgpPGE6JJQjMYhZZgWY8EJQn8jQTsuTit",
/* This is the integrated address prefix used for miner login validation. */
"intAddressPrefix": 91,
/* Poll RPC daemons for new blocks every this many milliseconds. */
"blockRefreshInterval": 1000,
/* How many seconds until we consider a miner disconnected. */
"minerTimeout": 900,
"sslCert": "./cert.pem", // The SSL certificate
"sslKey": "./privkey.pem", // The SSL private key
"sslCA": "./chain.pem" // The SSL certificate authority chain
"ports": [
{
"port": 3333, // Port for mining apps to connect to
"difficulty": 2000, // Initial difficulty miners are set to
"desc": "Low end hardware" // Description of port
},
{
"port": 4444,
"difficulty": 15000,
"desc": "Mid range hardware"
},
{
"port": 5555,
"difficulty": 25000,
"desc": "High end hardware"
},
{
"port": 7777,
"difficulty": 500000,
"desc": "Cloud-mining / NiceHash"
},
{
"port": 8888,
"difficulty": 25000,
"desc": "Hidden port",
"hidden": true // Hide this port in the front-end
},
{
"port": 9999,
"difficulty": 20000,
"desc": "SSL connection",
"ssl": true // Enable SSL
}
],
/* Variable difficulty is a feature that will automatically adjust difficulty for
individual miners based on their hashrate in order to lower networking and CPU
overhead. */
"varDiff": {
"minDiff": 100, // Minimum difficulty
"maxDiff": 100000000,
"targetTime": 60, // Try to get 1 share per this many seconds
"retargetTime": 30, // Check to see if we should retarget every this many seconds
"variancePercent": 30, // Allow time to vary this % from target without retargeting
"maxJump": 100 // Limit diff percent increase/decrease in a single retargeting
},
/* Set difficulty on miner client side by passing <address> param with +<difficulty> postfix */
"fixedDiff": {
"enabled": true,
"separator": "+", // Character separator between <address> and <difficulty>
},
/* Set payment ID on miner client side by passing <address>.<paymentID> */
"paymentId": {
"addressSeparator": "." // Character separator between <address> and <paymentID>
},
/* Feature to trust share difficulties from miners which can
significantly reduce CPU load. */
"shareTrust": {
"enabled": true,
"min": 10, // Minimum percent probability for share hashing
"stepDown": 3, // Increase trust probability % this much with each valid share
"threshold": 10, // Amount of valid shares required before trusting begins
"penalty": 30 // Upon breaking trust require this many valid share before trusting
},
/* If under low-diff share attack we can ban their IP to reduce system/network load. */
"banning": {
"enabled": true,
"time": 600, // How many seconds to ban worker for
"invalidPercent": 25, // What percent of invalid shares triggers ban
"checkThreshold": 30 // Perform check when this many shares have been submitted
},
/* Slush Mining is a reward calculation technique which disincentivizes pool hopping and rewards 'loyal' miners by valuing younger shares higher than older shares. Remember adjusting the weight!
More about it here: https://mining.bitcoin.cz/help/#!/manual/rewards */
"slushMining": {
"enabled": false, // Enables slush mining. Recommended for pools catering to professional miners
"weight": 300 // Defines how fast the score assigned to a share declines in time. The value should roughly be equivalent to the average round duration in seconds divided by 8. When deviating by too much numbers may get too high for JS.
}
},
/* Module that sends payments to miners according to their submitted shares. */
"payments": {
"enabled": true,
"interval": 300, // How often to run in seconds
"maxAddresses": 50, // Split up payments if sending to more than this many addresses
"mixin": 5, // Number of transactions yours is indistinguishable from
"priority": 0, // The transaction priority
"transferFee": 4000000000, // Fee to pay for each transaction
"dynamicTransferFee": true, // Enable dynamic transfer fee (fee is multiplied by number of miners)
"minerPayFee" : true, // Miner pays the transfer fee instead of pool owner when using dynamic transfer fee
"minPayment": 100000000000, // Miner balance required before sending payment
"maxPayment": null, // Maximum miner balance allowed in miner settings
"maxTransactionAmount": 0, // Split transactions by this amount (to prevent "too big transaction" error)
"denomination": 10000000000 // Truncate to this precision and store remainder
},
/* Module that monitors the submitted block maturities and manages rounds. Confirmed
blocks mark the end of a round where workers' balances are increased in proportion
to their shares. */
"blockUnlocker": {
"enabled": true,
"interval": 30, // How often to check block statuses in seconds
/* Block depth required for a block to unlocked/mature. Found in daemon source as
the variable CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW */
"depth": 60,
"poolFee": 0.8, // 0.8% pool fee (1% total fee total including donations)
"devDonation": 0.2, // 0.2% donation to send to pool dev
"networkFee": 0.0, // Network/Governance fee (used by some coins like Loki)
/* Some forknote coins have an issue with block height in RPC request, to fix you can enable this option.
See: https://github.com/forknote/forknote-pool/issues/48 */
"fixBlockHeightRPC": false
},
/* AJAX API used for front-end website. */
"api": {
"enabled": true,
"hashrateWindow": 600, // How many second worth of shares used to estimate hash rate
"updateInterval": 3, // Gather stats and broadcast every this many seconds
"bindIp": "0.0.0.0", // Bind API to a specific IP (set to 0.0.0.0 for all)
"port": 8117, // The API port
"blocks": 30, // Amount of blocks to send at a time
"payments": 30, // Amount of payments to send at a time
"password": "your_password", // Password required for admin stats
"ssl": false, // Enable SSL API
"sslPort": 8119, // The SSL port
"sslCert": "./cert.pem", // The SSL certificate
"sslKey": "./privkey.pem", // The SSL private key
"sslCA": "./chain.pem", // The SSL certificate authority chain
"trustProxyIP": false // Proxy X-Forwarded-For support
"ignoreSrcIP": false // Silently ignore source IP when changing min payments, or notification settings
},
/* Coin daemon connection details (default port is 18981) */
"daemon": {
"host": "127.0.0.1",
"port": 18981
},
/* Wallet daemon connection details (default port is 18980) */
"wallet": {
"host": "127.0.0.1",
"port": 18982
},
/* Redis connection info (default port is 6379) */
"redis": {
"host": "127.0.0.1",
"port": 6379,
"auth": null, // If set, client will run redis auth command on connect. Use for remote db
"db": 0, // Set the REDIS database to use (default to 0)
"cleanupInterval": 15 // Set the REDIS database cleanup interval (in days)
}
/* Pool Notifications */
"notifications": {
"emailTemplate": "email_templates/default.txt",
"emailSubject": {
"emailAdded": "Your email was registered",
"workerConnected": "Worker %WORKER_NAME% connected",
"workerTimeout": "Worker %WORKER_NAME% stopped hashing",
"workerBanned": "Worker %WORKER_NAME% banned",
"blockFound": "Block %HEIGHT% found !",
"blockUnlocked": "Block %HEIGHT% unlocked !",
"blockOrphaned": "Block %HEIGHT% orphaned !",
"payment": "We sent you a payment !"
},
"emailMessage": {
"emailAdded": "Your email has been registered to receive pool notifications.",
"workerConnected": "Your worker %WORKER_NAME% for address %MINER% is now connected from ip %IP%.",
"workerTimeout": "Your worker %WORKER_NAME% for address %MINER% has stopped submitting hashes on %LAST_HASH%.",
"workerBanned": "Your worker %WORKER_NAME% for address %MINER% has been banned.",
"blockFound": "Block found at height %HEIGHT% by miner %MINER% on %TIME%. Waiting maturity.",
"blockUnlocked": "Block mined at height %HEIGHT% with %REWARD% and %EFFORT% effort on %TIME%.",
"blockOrphaned": "Block orphaned at height %HEIGHT% :(",
"payment": "A payment of %AMOUNT% has been sent to %ADDRESS% wallet."
},
"telegramMessage": {
"workerConnected": "Your worker _%WORKER_NAME%_ for address _%MINER%_ is now connected from ip _%IP%_.",
"workerTimeout": "Your worker _%WORKER_NAME%_ for address _%MINER%_ has stopped submitting hashes on _%LAST_HASH%_.",
"workerBanned": "Your worker _%WORKER_NAME%_ for address _%MINER%_ has been banned.",
"blockFound": "*Block found at height* _%HEIGHT%_ *by miner* _%MINER%_*! Waiting maturity.*",
"blockUnlocked": "*Block mined at height* _%HEIGHT%_ *with* _%REWARD%_ *and* _%EFFORT%_ *effort on* _%TIME%_*.*",
"blockOrphaned": "*Block orphaned at height* _%HEIGHT%_ *:(*",
"payment": "A payment of _%AMOUNT%_ has been sent."
}
},
/* Email Notifications */
"email": {
"enabled": false,
"fromAddress": "[email protected]", // Your sender email
"transport": "sendmail", // The transport mode (sendmail, smtp or mailgun)
// Configuration for sendmail transport
// Documentation: http://nodemailer.com/transports/sendmail/
"sendmail": {
"path": "/usr/sbin/sendmail" // The path to sendmail command
},
// Configuration for SMTP transport
// Documentation: http://nodemailer.com/smtp/
"smtp": {
"host": "smtp.example.com", // SMTP server
"port": 587, // SMTP port (25, 587 or 465)
"secure": false, // TLS (if false will upgrade with STARTTLS)
"auth": {
"user": "username", // SMTP username
"pass": "password" // SMTP password
},
"tls": {
"rejectUnauthorized": false // Reject unauthorized TLS/SSL certificate
}
},
// Configuration for MailGun transport
"mailgun": {
"key": "your-private-key", // Your MailGun Private API key
"domain": "mg.yourdomain" // Your MailGun domain
}
},
/* Telegram channel notifications.
See Telegram documentation to setup your bot: https://core.telegram.org/bots#3-how-do-i-create-a-bot */
"telegram": {
"enabled": false,
"botName": "", // The bot user name.
"token": "", // The bot unique authorization token
"channel": "", // The telegram channel id (ex: BlockHashMining)
"channelStats": {
"enabled": false, // Enable periodical updater of pool statistics in telegram channel
"interval": 5 // Periodical update interval (in minutes)
},
"botCommands": { // Set the telegram bot commands
"stats": "/stats", // Pool statistics
"enable": "/enable", // Enable telegram notifications
"disable": "/disable" // Disable telegram notifications
}
},
/* Monitoring RPC services. Statistics will be displayed in Admin panel */
"monitoring": {
"daemon": {
"checkInterval": 60, // Interval of sending rpcMethod request
"rpcMethod": "getblockcount" // RPC method name
},
"wallet": {
"checkInterval": 60,
"rpcMethod": "getbalance"
}
},
/* Prices settings for market and price charts */
"prices": {
"source": "cryptonator", // Exchange (supported values: cryptonator, altex, crex24, cryptopia, stocks.exchange, tradeogre)
"currency": "USD" // Default currency
},
/* Collect pool statistics to display in frontend charts */
"charts": {
"pool": {
"hashrate": {
"enabled": true, // Enable data collection and chart displaying in frontend
"updateInterval": 60, // How often to get current value
"stepInterval": 1800, // Chart step interval calculated as average of all updated values
"maximumPeriod": 86400 // Chart maximum periods (chart points number = maximumPeriod / stepInterval = 48)
},
"miners": {
"enabled": true,
"updateInterval": 60,
"stepInterval": 1800,
"maximumPeriod": 86400
},
"workers": {
"enabled": true,
"updateInterval": 60,
"stepInterval": 1800,
"maximumPeriod": 86400
},
"difficulty": {
"enabled": true,
"updateInterval": 1800,
"stepInterval": 10800,
"maximumPeriod": 604800
},
"price": {
"enabled": true,
"updateInterval": 1800,
"stepInterval": 10800,
"maximumPeriod": 604800
},
"profit": {
"enabled": true,
"updateInterval": 1800,
"stepInterval": 10800,
"maximumPeriod": 604800
}
},
"user": { // Chart data displayed in user stats block
"hashrate": {
"enabled": true,
"updateInterval": 180,
"stepInterval": 1800,
"maximumPeriod": 86400
},
"payments": { // Payment chart uses all user payments data stored in DB
"enabled": true
}
},
"blocks": {
"enabled": true,
"days": 30 // Number of days displa
Content type
Image
Digest
Size
242.6 MB
Last updated
over 7 years ago
docker pull funkypenguin/cryptonote-nodejs-pool