This repository has been archived by the owner on Oct 20, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 662
Configuration
Calvin Tam edited this page Nov 5, 2017
·
29 revisions
MiningCore is configured using a single JSON configuration file which may be used to initialize a cluster of multiple pool each supporting a different crypto-currency.
Note: Please refer to this page for a list of supported coins and other configuration options.
Example configuration:
{
"logging": {
"level": "info",
"enableConsoleLog": true,
"enableConsoleColors": true,
"logFile": "",
"logBaseDirectory": "",
"perPoolLogFile": false
},
"banning": {
"manager": "integrated" // "integrated" or "iptables" (linux only)
},
"notifications": {
"enabled": true,
"email": {
"host": "smtp.example.com",
"port": 587,
"user": "user",
"password": "password",
"fromAddress": "info@yourpool.org",
"fromName": "pool support"
},
"admin": {
"enabled": false,
"emailAddress": "user@example.com",
"notifyBlockFound": true
}
},
// Where to persist shares and blocks to
"persistence": {
// Persist to postgresql database
"postgres": {
"host": "127.0.0.1",
"port": 5432,
"user": "miningcore",
"password": "yourpassword",
"database": "miningcore"
}
},
// Donate a tiny percentage of the rewards to the ongoing development of Miningcore
"devDonation": 0.1,
// Generate payouts for recorded shares and blocks
"paymentProcessing": {
"enabled": true,
"interval": 600, // how often to process payouts
// Path to a file used to backup shares under emergency conditions such as database outage
"shareRecoveryFile": "recovered-shares.txt"
},
// Api Settings
"api": {
"enabled": true,
"listenAddress": "127.0.0.1", // Binding address for API, Default: 127.0.0.1
"port": 4000 // Binding port for API, Default: 4000
},
"pools": [{
// DON'T change the id after a production pool has begun collecting shares!
"id": "dash1",
"enabled": true,
"coin": {
"type": "DASH"
},
// Address to where block rewards are given (pool wallet)
"address": "yiZodEgQLbYDrWzgBXmfUUHeBVXBNr8rwR",
// Block rewards go to the configured pool wallet address to later be paid out to miners,
// 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
"rewardRecipients": [
{
"type": "op",
"address": "yiZodEgQLbYDrWzgBXmfUUHeBVXBNr8rwR", // pool
"percentage": 1.5
}
],
// How often to poll RPC daemons for new blocks, in milliseconds
"blockRefreshInterval": 1000,
// 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
// in this many seconds unless we find a new job. Set to zero or remove to disable this.
"jobRebroadcastTimeout": 55,
// 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 features
// detects those and disconnects them.
"clientConnectionTimeout": 600, // Remove workers that haven't been in contact for this many seconds
// If a worker is submitting a high threshold of invalid shares we can temporarily ban their IP
// 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).
"banning": {
"enabled": true,
"time": 600, // How many seconds to ban worker for
"invalidPercent": 50, // What percent of invalid shares triggers ban
"checkThreshold": 50 // Check invalid percent when this many shares have been submitted
},
// 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": {
"3052": { // A port for your miners to connect to
"listenAddress": "0.0.0.0", // the binding address for the port, default: 127.0.0.1
"difficulty": 0.02, // 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": 0.01, // Minimum difficulty
"maxDiff": null, // Network difficulty will be used if it is lower than this (null to disable)
"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
"maxDelta": 500 // Do not alter difficulty by more than this during a single retarget in either direction
}
},
"3053": { // Another port for your miners to connect to, this port does not use varDiff
"listenAddress": "0.0.0.0", // the binding address for the port, default: 127.0.0.1
"difficulty": 100 // 256 // The pool difficulty
}
},
// Recommended to have at least two daemon instances running in case one drops out-of-sync
// or offline. For redundancy, 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" argument which creates a new daemon instance with it's own
// RPC config. For more info on this see: https:// en.bitcoin.it/wiki/Data_directory
// and https:// en.bitcoin.it/wiki/Running_bitcoind
"daemons": [{
"host": "127.0.0.1",
"port": 15001,
"user": "user",
"password": "pass"
}
],
// Generate payouts for recorded shares
"paymentProcessing": {
"enabled": true,
"minimumPayment": 0.01, // in pool-base-currency (ie. Bitcoin, NOT Satoshis)
"payoutScheme": "PPLNS",
"payoutSchemeConfig": {
"factor": 2.0
}
}
}]
}