High performance Node.js (with native C addons) mining pool for CryptoNote based coins such as Bytecoin, DuckNote, Monero, QuazarCoin, Boolberry, Dashcoin, etc..Comes with lightweight example front-end script which uses the pool's AJAX API.
sudo apt-get install libssl-dev
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.
Redis security warning: be sure firewall access to redis - an easy way is toinclude bind 127.0.0.1
in your redis.conf
file. Also it's a good idea to learn about and understand software thatyou are using - a good place to start with redis is data persistence.
Installing pool on different Linux distributives is different because it depends on system default components and versions. For now the easiest way to install pool is to use Ubuntu 14 LTS. Thus, all you had to do in order to prepare Ubunty 14 for pool installation is to run:
sudo apt-get install git redis-server libboost1.55-all-dev nodejs-dev nodejs-legacy npm cmake libssl-dev
Clone the repository and run npm update
for all the dependencies to be installed:
git clone https://github.com/techqc/cryptonote-xmr-pool.git pool
cd pool
npm update
Explanation for each field:
/* Used for storage in redis so multiple coins can share the same redis instance. */
"coin": "ducknote",
/* Used for front-end display */
"symbol": "XDN",
/* Minimum units in a single coin, see COIN constant in DAEMON_CODE/src/cryptonote_config.h */
"coinUnits": 100000000,
/* Coin network time to mine one block, see DIFFICULTY_TARGET constant in DAEMON_CODE/src/cryptonote_config.h */
"coinDifficultyTarget": 240,
"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": "ddehi53dwGSBEXdhTYtga2R3fS4y9hRz4YHAsLABJpH75yUd5EDQmuL3yDBj1mG6MMeDfydY9vp4zFVVNQ99FTYq2PpsFJP2y"
/* Poll RPC daemons for new blocks every this many milliseconds. */
"blockRefreshInterval": 1000,
/* How many seconds until we consider a miner disconnected. */
"minerTimeout": 900,
"ports": [
{
"port": 3333, //Port for mining apps to connect to
"difficulty": 100, //Initial difficulty miners are set to
"desc": "Low end hardware" //Description of port
},
{
"port": 5555,
"difficulty": 2000,
"desc": "Mid range hardware"
},
{
"port": 7777,
"difficulty": 10000,
"desc": "High end hardware"
}
],
/* 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": 2, //Minimum difficulty
"maxDiff": 100000,
"targetTime": 100, //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 very this % from target without retargeting
"maxJump": 100 //Limit diff percent increase/decrease in a single retargetting
},
/* Set difficulty on miner client side by passing <address> param with .<difficulty> postfix
minerd -u 4AsBy39rpUMTmgTUARGq2bFQWhDhdQNekK5v4uaLU699NPAnx9CubEJ82AkvD5ScoAZNYRwBxybayainhyThHAZWCdKmPYn.5000 */
"fixedDiff": {
"enabled": true,
"separator": "+", // character separator between <address> and <difficulty>
},
/* 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
}
},
/* Module that sends payments to miners according to their submitted shares. */
"payments": {
"enabled": true,
"interval": 600, //how often to run in seconds
"maxAddresses": 50, //split up payments if sending to more than this many addresses
"mixin": 3, //number of transactions yours is indistinguishable from
"transferFee": 5000000000, //fee to pay for each transaction
"minPayment": 100000000000, //miner balance required before sending payment
"maxTransactionAmount": 0, //split transactions by this amount(to prevent "too big transaction" error)
"denomination": 100000000000 //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": 1.8, //1.8% pool fee (2% total fee total including donations)
},
/* 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
"port": 8117,
"blocks": 30, //amount of blocks to send at a time
"payments": 30, //amount of payments to send at a time
"password": "test" //password required for admin stats
},
/* Coin daemon connection details. */
"daemon": {
"host": "127.0.0.1",
"port": 18081
},
/* Wallet daemon connection details. */
"wallet": {
"host": "127.0.0.1",
"port": 8082
},
/* Redis connection into. */
"redis": {
"host": "127.0.0.1",
"port": 6379
}
/* 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"
}
/* 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)
},
"workers": {
"enabled": true,
"updateInterval": 60,
"stepInterval": 1800, //chart step interval calculated as maximum of all updated values
"maximumPeriod": 86400
},
"difficulty": {
"enabled": true,
"updateInterval": 1800,
"stepInterval": 10800,
"maximumPeriod": 604800
},
"price": { //USD price of one currency coin received from cryptonator.com/api
"enabled": true,
"updateInterval": 1800,
"stepInterval": 10800,
"maximumPeriod": 604800
},
"profit": { //Reward * Rate / Difficulty
"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
}
}
Your miners that are Windows users can use cryptonote-easy-minerwhich will automatically generate their wallet address and stratup multiple threads of simpleminer. You can downloadit and edit the config.ini
file to point to your own pool.Inside the easyminer
folder, edit config.init
to point to your pool details
pool_host=example.com
pool_port=5555
Rezip and upload to your server or a file host. Then change the easyminerDownload
link in your config.json
file topoint to your zip file.
node init.js
The file config.json
is used by default but a file can be specified using the -config=file
command argument, for example:
node init.js -config=config_backup.json
This software contains four distinct modules:
pool
- Which opens ports for miners to connect and processes sharesapi
- Used by the website to display network, pool and miners' dataunlocker
- Processes block candidates and increases miners' balances when blocks are unlockedpayments
- Sends out payments to miners according to their balances stored in redisBy default, running the init.js
script will start up all four modules. You can optionally have the script startonly start a specific module by using the -module=name
command argument, for example:
node init.js -module=api
Example screenshot of running the pool in single module mode with tmux.
Simply host the contents of the website_example
directory on file server capable of serving simple static files.
Edit the variables in the website_example/config.js
file to use your pool's specific configuration.Variable explanations:
/* Must point to the API setup in your config.json file. */
var api = "http://poolhost:8117";
/* Pool server host to instruct your miners to point to. */
var poolHost = "poolhost.com";
/* IRC Server and room used for embedded KiwiIRC chat. */
var irc = "irc.freenode.net/#ducknote";
/* Contact email address. */
var email = "support@poolhost.com";
/* Market stat display params from https://www.cryptonator.com/widget */
var cryptonatorWidget = ["XDN-BTC", "XDN-USD", "XDN-EUR"];
/* Download link to cryptonote-easy-miner for Windows users. */
var easyminerDownload = "https://github.com/zone117x/cryptonote-easy-miner/releases/";
/* Used for front-end block links. */
var blockchainExplorer = "http://chainradar.com/{symbol}/block/{id}";
/* Used by front-end transaction links. */
var transactionExplorer = "http://chainradar.com/{symbol}/transaction/{id}";
/* Any custom CSS theme for pool frontend */
var themeCss = "themes/default-theme.css";
The following files are included so that you can customize your pool website without having to make significant changesto index.html
or other front-end files thus reducing the difficulty of merging updates with your own changes:
custom.css
for creating your own pool stylecustom.js
for changing the functionality of your pool websiteThen simply serve the files via nginx, Apache, Google Drive, or anything that can host static content.
When updating to the latest code its important to not only git pull
the latest from this repo, but to also updatethe Node.js modules, and any config files that may have been changed.
git pull
to get the latest code.node_modules
directory with rm -r node_modules
.npm update
to force updating/reinstalling of the dependencies.config.json
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.Monero does have a testnet. Call daemon and simplewallet with --tesnet to connect to it.Downloading the testnet blockchain may still take a while to start usint testnet, so you can use this excellenttutorial http://moneroexamples.github.io/private-testnet/ to set up a private testnet. Should work with othercoins, too, but below are original testnet instructions by server43 for reference, too.
For cryptonote based coins that don't have a testnet mode (yet), you can effectively create a testnet with the following steps:
/src/p2p/net_node.inl
and remove lines with ADD_HARDCODED_SEED_NODE
to prevent it from connecting to mainnet (Monero example: http://git.io/0a12_Q)./coind --p2p-bind-port 28080 --allow-local-ip
./coind --p2p-bind-port 5011 --rpc-bind-port 5010 --add-peer 0.0.0.0:28080 --allow-local-ip
Credit to surfer43 for these instructions
Documentation for JSON-RPC commands can be found here:
Curl can be used to use the JSON-RPC commands from command-line. Here is an example of calling getblockheaderbyheight
for block 100:
curl 127.0.0.1:18081/json_rpc -d '{"method":"getblockheaderbyheight","params":{"height":100}}'
1667jMt7NTZDaC8WXAxtMYBR8DPWCVoU4d
-48Y4SoUJM5L3YXBEfNQ8bFNsvTNsqcH5Rgq8RF7BwpgvTBj2xr7CmWVanaw7L4U9MnZ4AG7U6Pn1pBhfQhFyFZ1rL1efL8z
Released under the GNU General Public License v2
环境:2cpu,2G,centos7 首先关闭CentOS的SELinux功能和防火墙 建议升级gcc到7.3:https://lijunmin.blog.csdn.net/article/details/102455127 安装依赖: yum install centos-release-scl epel-release -y yum install cmake3 devtoolset-7-gc
Xmr Monero node Xmr is an implementation of the Monero cryptocurrency. It aims to be a fullMonero node with wallet functionality. This is a work in progress that is not yet functional Building Xmr Xmr
The Lithe Project Development Team Awesome CryptoNote A curated list of awesome CryptoNote open-source blockchains, resources, projects, and shiny other things related.Many projects are derived from f
Xmr-stak-cpu-linux Cryptonight mining software on Linux v2.1 Without 2% donation Make a donation to me here: Electroneum: etnkPFomBtL1JN1c32tm3VavBMNMhbY8qDLg9kxmYJouQyy55sPaDYA2WwBkRUsD68RWzqobCCNyjW
Bitcoin & Monero Cross-chain Atomic Swap ia.cr/2020/1126 Abstract In blockchains where hashed timelock contracts are possible atomic swaps are already deployed, but when one blockchain doesn't have th
xmr-stak-cpu-nvidia-windows Cryptonight mining software on Windows v2.2 Without 2% donation Make a donation to me here: Electroneum: etnkPFomBtL1JN1c32tm3VavBMNMhbY8qDLg9kxmYJouQyy55sPaDYA2WwBkRUsD68R
莫内罗(XMR)是一个开源,2014年推出的面向隐私的加密货币。 它是建立和运作的概念。这些区块链构成了数字货币背后的基础技术,是参与者活动的公共分类账,显示了网络上的所有交易。