From f499f8d71b12defce02663f6f308611351196cc5 Mon Sep 17 00:00:00 2001 From: BlueSilver22 <34906725+BlueSilver22@users.noreply.github.com> Date: Sat, 24 Feb 2018 20:39:53 -0500 Subject: [PATCH 1/4] Update README.md --- README.md | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 8d6c89b1..439fb65d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Zcash® and Zclassic - Node Open Mining Portal +# BTCPrivate - Node Open Mining Portal -**[Click here for the official - Zcash® and Zclassic Stratum Mining Pool Installation Guide](https://zdeveloper.org/wiki:z-nomp_install)** +**[Click here for the official - z-nomp Stratum Mining Pool Installation Guide](https://zdeveloper.org/wiki:z-nomp_install)** This is a Equihash mining pool based off of Node Open Mining Portal. @@ -21,19 +21,11 @@ IRC If your pool uses Z-NOMP let us know and we will list your website here. -### Some pools using Z-NOMP or node-stratum-module: +### Some BTCPrivate Pools: -https://pool.cryptobroker.io/zcl Running MPOS and 0.5% of the fee goes to the Zclassic donation fund! 200+ blocks have been found as well! +https://btcp.ragnarpool.ovh/stats -http://luckpool.org Zcash Pool with Custom Frontend w/Miner's Jackpot - -http://zclmine.com/ Custom frontend - -http://zclassic.miningspeed.com Custom frontend and 0% fee - -https://zpool.it 0.5% fee - -http://miningpool.io/ +https://btcp.coinblockers.com/ Usage ===== @@ -57,9 +49,9 @@ you are using - a good place to start with redis is [data persistence](http://re Follow the build/install instructions for your coin daemon. Your coin.conf file should end up looking something like this: ``` daemon=1 -rpcuser=zclassicrpc +rpcuser=btcprivaterpc rpcpassword=securepassword -rpcport=8232 +rpcport=7933 ``` 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 @@ -80,14 +72,14 @@ Clone the repository and run `npm update` for all the dependencies to be install sudo apt-get install build-essential libsodium-dev npm sudo npm install n -g sudo n stable -git clone https://github.com/joshuayabut/node-open-mining-portal.git z-nomp +git clone https://github.com/BTCPrivate/z-nomp.git z-nomp cd z-nomp npm update npm install ``` ##### Pool config -Take a look at the example json file inside the `pool_configs` directory. Rename it to `zclassic.json` and change the +Take a look at the example json file inside the `pool_configs` directory. Rename it to `BTCPrivate.json` and change the example fields to fit your setup. ``` @@ -105,9 +97,9 @@ ie: Miner 1 mines at 0.1 difficulty and finds 10 shares, the pool sees it as 1 s ``` node [path to cli.js] [coin name in config] [block hash symbol] ``` -Example: inside `zclassic.conf` add the line +Example: inside `btcprivate.conf` add the line ``` -blocknotify=node /home/user/z-nomp/scripts/cli.js blocknotify zclassic %s +blocknotify=node /home/user/z-nomp/scripts/cli.js blocknotify btcprivate %s ``` Alternatively, you can use a more efficient block notify script written in pure C. Build and usage instructions From 5ff18069efba5b630bc9e41a3e1a25ffadea4c2c Mon Sep 17 00:00:00 2001 From: BlueSilver22 <34906725+BlueSilver22@users.noreply.github.com> Date: Sat, 24 Feb 2018 20:54:11 -0500 Subject: [PATCH 2/4] Create btcprivate.json --- coins/btcprivate.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 coins/btcprivate.json diff --git a/coins/btcprivate.json b/coins/btcprivate.json new file mode 100644 index 00000000..a6182b6c --- /dev/null +++ b/coins/btcprivate.json @@ -0,0 +1,8 @@ +{ + "name": "btcprivate", + "symbol": "btcp", + "algorithm": "equihash", + "requireShielding": true, + "peerMagic": "", + "txfee": 0.0004 +} From 0cb13a8775c267e043443df2392285ac0845dbd0 Mon Sep 17 00:00:00 2001 From: BlueSilver22 <34906725+BlueSilver22@users.noreply.github.com> Date: Sat, 24 Feb 2018 20:54:39 -0500 Subject: [PATCH 3/4] Create btcprivate_testnet.json --- coins/btcprivate_testnet.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 coins/btcprivate_testnet.json diff --git a/coins/btcprivate_testnet.json b/coins/btcprivate_testnet.json new file mode 100644 index 00000000..789ccb0e --- /dev/null +++ b/coins/btcprivate_testnet.json @@ -0,0 +1,8 @@ +{ + "name": "btcprivate_testnet", + "symbol": "bttt", + "algorithm": "equihash", + "requireShielding": true, + "peerMagic": "", + "txfee": 0.0004 +} From 1b8b9deb3821cf04b2fdf20cedfae3d0c8520d95 Mon Sep 17 00:00:00 2001 From: Chao Lu Date: Mon, 5 Mar 2018 14:08:10 -0500 Subject: [PATCH 4/4] fix live_connections memory leaks --- libs/api.js | 10 +++++++--- package.json | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libs/api.js b/libs/api.js index 1b416117..bfa48296 100644 --- a/libs/api.js +++ b/libs/api.js @@ -1,5 +1,6 @@ var redis = require('redis'); var async = require('async'); +var onFinished = require('on-finished'); var stats = require('./stats.js'); @@ -112,9 +113,12 @@ module.exports = function(logger, portalConfig, poolConfigs){ var uid = Math.random().toString(); _this.liveStatConnections[uid] = res; res.flush(); - req.on("close", function() { - delete _this.liveStatConnections[uid]; - }); + // req.on("close", function() { + // delete _this.liveStatConnections[uid]; + // }); + onFinished(res, function (err, res) { + delete _this.liveStatConnections[uid]; + }) return; default: next(); diff --git a/package.json b/package.json index 6bbfd4e5..ef2d6feb 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "nonce": "1.0.4", "redis": "2.7.1", "request": "2.81.0", + "on-finished": "2.3.0", "stratum-pool": "git+https://github.com/z-classic/node-stratum-pool.git" }, "engines": {