Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Commit

Permalink
Merge pull request #109 from hellcatz/patch-2
Browse files Browse the repository at this point in the history
Major Updates 2

```major: added support for komodo, zcash, zclassic, (zdash not tested)
coins: added requireShielding boolean
coins: updated zcash_testnet founders addresses
configs: added komodo_example.conf
api.js: added payments json api call
stats.js: improved getTotalSharesByAdress to support multiple coins.
stats.js: report more collected stats
stats.js: report payment stats
stats.js: optimizations to historical data saving
paymentProcessor.js: added requireShielding support
paymentProcessor.js: added support to pay directly from komodo pool address without shielding first
paymentProcessor.js: lower tx fee reserve for komodo to 0.00005 KMD
paymentProcessor.js: tx fee reserve for all coins is 0.0004
paymentProcessor.js: improved multi-coin support
paymentProcessor.js: added minConfShield and minConfPayout variables
paymentProcessor.js: updated coin network stat caching
paymentProcessor.js: improved operation id handling when shielding coins
paymentProcessor.js: updated coin network stat caching
paymentProcessor.js: updated payment stat collection in redis
miner_stats.html: removed ZEC references```
  • Loading branch information
Procrastinator authored Apr 10, 2017
2 parents 409e1cc + 5f41cc3 commit 05968ef
Show file tree
Hide file tree
Showing 13 changed files with 335 additions and 183 deletions.
3 changes: 2 additions & 1 deletion coins/komodo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "komodo",
"symbol": "kmd",
"algorithm": "equihash"
"algorithm": "equihash",
"txfee": 0.00005
}
5 changes: 3 additions & 2 deletions coins/zcash.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "zcash",
"symbol": "zec",
"algorithm": "equihash",

"requireShielding": true,
"payFoundersReward": true,
"percentFoundersReward": 20,
"maxFoundersRewardBlockHeight": 849999,
Expand Down Expand Up @@ -56,5 +56,6 @@
"t3PSn5TbMMAEw7Eu36DYctFezRzpX1hzf3M",
"t3R3Y5vnBLrEn8L6wFjPjBLnxSUQsKnmFpv",
"t3Pcm737EsVkGTbhsu2NekKtJeG92mvYyoN"
]
],
"txfee": 0.0004
}
31 changes: 16 additions & 15 deletions coins/zcash_testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@
"name": "zcash_testnet",
"symbol": "taz",
"algorithm": "equihash",

"requireShielding": true,
"payFoundersReward": true,
"percentFoundersReward": 20,
"maxFoundersRewardBlockHeight": 849999,
"foundersRewardAddressChangeInterval": 17709.3125,
"vFoundersRewardAddress": [
"t2UNzUUx8mWBCRYPRezvA363EYXyEpHokyi", "t2N9PH9Wk9xjqYg9iin1Ua3aekJqfAtE543", "t2NGQjYMQhFndDHguvUw4wZdNdsssA6K7x2", "t2ENg7hHVqqs9JwU5cgjvSbxnT2a9USNfhy",
"t2BkYdVCHzvTJJUTx4yZB8qeegD8QsPx8bo", "t2J8q1xH1EuigJ52MfExyyjYtN3VgvshKDf", "t2Crq9mydTm37kZokC68HzT6yez3t2FBnFj", "t2EaMPUiQ1kthqcP5UEkF42CAFKJqXCkXC9",
"t2F9dtQc63JDDyrhnfpzvVYTJcr57MkqA12", "t2LPirmnfYSZc481GgZBa6xUGcoovfytBnC", "t26xfxoSw2UV9Pe5o3C8V4YybQD4SESfxtp", "t2D3k4fNdErd66YxtvXEdft9xuLoKD7CcVo",
"t2DWYBkxKNivdmsMiivNJzutaQGqmoRjRnL", "t2C3kFF9iQRxfc4B9zgbWo4dQLLqzqjpuGQ", "t2MnT5tzu9HSKcppRyUNwoTp8MUueuSGNaB", "t2AREsWdoW1F8EQYsScsjkgqobmgrkKeUkK",
"t2Vf4wKcJ3ZFtLj4jezUUKkwYR92BLHn5UT", "t2K3fdViH6R5tRuXLphKyoYXyZhyWGghDNY", "t2VEn3KiKyHSGyzd3nDw6ESWtaCQHwuv9WC", "t2F8XouqdNMq6zzEvxQXHV1TjwZRHwRg8gC",
"t2BS7Mrbaef3fA4xrmkvDisFVXVrRBnZ6Qj", "t2FuSwoLCdBVPwdZuYoHrEzxAb9qy4qjbnL", "t2SX3U8NtrT6gz5Db1AtQCSGjrpptr8JC6h", "t2V51gZNSoJ5kRL74bf9YTtbZuv8Fcqx2FH",
"t2FyTsLjjdm4jeVwir4xzj7FAkUidbr1b4R", "t2EYbGLekmpqHyn8UBF6kqpahrYm7D6N1Le", "t2NQTrStZHtJECNFT3dUBLYA9AErxPCmkka", "t2GSWZZJzoesYxfPTWXkFn5UaxjiYxGBU2a",
"t2RpffkzyLRevGM3w9aWdqMX6bd8uuAK3vn", "t2JzjoQqnuXtTGSN7k7yk5keURBGvYofh1d", "t2AEefc72ieTnsXKmgK2bZNckiwvZe3oPNL", "t2NNs3ZGZFsNj2wvmVd8BSwSfvETgiLrD8J",
"t2ECCQPVcxUCSSQopdNquguEPE14HsVfcUn", "t2JabDUkG8TaqVKYfqDJ3rqkVdHKp6hwXvG", "t2FGzW5Zdc8Cy98ZKmRygsVGi6oKcmYir9n", "t2DUD8a21FtEFn42oVLp5NGbogY13uyjy9t",
"t2UjVSd3zheHPgAkuX8WQW2CiC9xHQ8EvWp", "t2TBUAhELyHUn8i6SXYsXz5Lmy7kDzA1uT5", "t2Tz3uCyhP6eizUWDc3bGH7XUC9GQsEyQNc", "t2NysJSZtLwMLWEJ6MH3BsxRh6h27mNcsSy",
"t2KXJVVyyrjVxxSeazbY9ksGyft4qsXUNm9", "t2J9YYtH31cveiLZzjaE4AcuwVho6qjTNzp", "t2QgvW4sP9zaGpPMH1GRzy7cpydmuRfB4AZ", "t2NDTJP9MosKpyFPHJmfjc5pGCvAU58XGa4",
"t29pHDBWq7qN4EjwSEHg8wEqYe9pkmVrtRP", "t2Ez9KM8VJLuArcxuEkNRAkhNvidKkzXcjJ", "t2D5y7J5fpXajLbGrMBQkFg2mFN8fo3n8cX", "t2UV2wr1PTaUiybpkV3FdSdGxUJeZdZztyt"
]
"vFoundersRewardAddress": [
"t2UNzUUx8mWBCRYPRezvA363EYXyEpHokyi", "t2N9PH9Wk9xjqYg9iin1Ua3aekJqfAtE543", "t2NGQjYMQhFndDHguvUw4wZdNdsssA6K7x2", "t2ENg7hHVqqs9JwU5cgjvSbxnT2a9USNfhy",
"t2BkYdVCHzvTJJUTx4yZB8qeegD8QsPx8bo", "t2J8q1xH1EuigJ52MfExyyjYtN3VgvshKDf", "t2Crq9mydTm37kZokC68HzT6yez3t2FBnFj", "t2EaMPUiQ1kthqcP5UEkF42CAFKJqXCkXC9",
"t2F9dtQc63JDDyrhnfpzvVYTJcr57MkqA12", "t2LPirmnfYSZc481GgZBa6xUGcoovfytBnC", "t26xfxoSw2UV9Pe5o3C8V4YybQD4SESfxtp", "t2D3k4fNdErd66YxtvXEdft9xuLoKD7CcVo",
"t2DWYBkxKNivdmsMiivNJzutaQGqmoRjRnL", "t2C3kFF9iQRxfc4B9zgbWo4dQLLqzqjpuGQ", "t2MnT5tzu9HSKcppRyUNwoTp8MUueuSGNaB", "t2AREsWdoW1F8EQYsScsjkgqobmgrkKeUkK",
"t2Vf4wKcJ3ZFtLj4jezUUKkwYR92BLHn5UT", "t2K3fdViH6R5tRuXLphKyoYXyZhyWGghDNY", "t2VEn3KiKyHSGyzd3nDw6ESWtaCQHwuv9WC", "t2F8XouqdNMq6zzEvxQXHV1TjwZRHwRg8gC",
"t2BS7Mrbaef3fA4xrmkvDisFVXVrRBnZ6Qj", "t2FuSwoLCdBVPwdZuYoHrEzxAb9qy4qjbnL", "t2SX3U8NtrT6gz5Db1AtQCSGjrpptr8JC6h", "t2V51gZNSoJ5kRL74bf9YTtbZuv8Fcqx2FH",
"t2FyTsLjjdm4jeVwir4xzj7FAkUidbr1b4R", "t2EYbGLekmpqHyn8UBF6kqpahrYm7D6N1Le", "t2NQTrStZHtJECNFT3dUBLYA9AErxPCmkka", "t2GSWZZJzoesYxfPTWXkFn5UaxjiYxGBU2a",
"t2RpffkzyLRevGM3w9aWdqMX6bd8uuAK3vn", "t2JzjoQqnuXtTGSN7k7yk5keURBGvYofh1d", "t2AEefc72ieTnsXKmgK2bZNckiwvZe3oPNL", "t2NNs3ZGZFsNj2wvmVd8BSwSfvETgiLrD8J",
"t2ECCQPVcxUCSSQopdNquguEPE14HsVfcUn", "t2JabDUkG8TaqVKYfqDJ3rqkVdHKp6hwXvG", "t2FGzW5Zdc8Cy98ZKmRygsVGi6oKcmYir9n", "t2DUD8a21FtEFn42oVLp5NGbogY13uyjy9t",
"t2UjVSd3zheHPgAkuX8WQW2CiC9xHQ8EvWp", "t2TBUAhELyHUn8i6SXYsXz5Lmy7kDzA1uT5", "t2Tz3uCyhP6eizUWDc3bGH7XUC9GQsEyQNc", "t2NysJSZtLwMLWEJ6MH3BsxRh6h27mNcsSy",
"t2KXJVVyyrjVxxSeazbY9ksGyft4qsXUNm9", "t2J9YYtH31cveiLZzjaE4AcuwVho6qjTNzp", "t2QgvW4sP9zaGpPMH1GRzy7cpydmuRfB4AZ", "t2NDTJP9MosKpyFPHJmfjc5pGCvAU58XGa4",
"t29pHDBWq7qN4EjwSEHg8wEqYe9pkmVrtRP", "t2Ez9KM8VJLuArcxuEkNRAkhNvidKkzXcjJ", "t2D5y7J5fpXajLbGrMBQkFg2mFN8fo3n8cX", "t2UV2wr1PTaUiybpkV3FdSdGxUJeZdZztyt"
],
"txfee": 0.0004
}
4 changes: 3 additions & 1 deletion coins/zclassic.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
"name": "zclassic",
"symbol": "zcl",
"algorithm": "equihash",
"peerMagic": "24e92764"
"requireShielding": true,
"peerMagic": "24e92764",
"txfee": 0.0004
}
4 changes: 3 additions & 1 deletion coins/zdash.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"name": "zdash",
"symbol": "zdash",
"algorithm": "equihash"
"algorithm": "equihash",
"requireShielding": true,
"txfee": 0.0004
}
4 changes: 2 additions & 2 deletions config_example.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},

"defaultPoolConfigs": {
"blockRefreshInterval": 30,
"blockRefreshInterval": 500,
"jobRebroadcastTimeout": 55,
"connectionTimeout": 600,
"emitInvalidBlockHashes": false,
Expand All @@ -36,7 +36,7 @@
"stratumHost": "cryppit.com",
"stats": {
"updateInterval": 30,
"historicalRetention": 43200,
"historicalRetention": 14400,
"hashrateWindow": 300
},
"adminCenter": {
Expand Down
8 changes: 7 additions & 1 deletion libs/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ module.exports = function(logger, portalConfig, poolConfigs){
return;
case 'pool_stats':
res.end(JSON.stringify(portalStats.statPoolHistory));
return;
case 'payments':
var poolBlocks = [];
for(var pool in portalStats.stats.pools) {
poolBlocks.push({name: pool, pending: portalStats.stats.pools[pool].pending, payments: portalStats.stats.pools[pool].payments});
}
res.end(JSON.stringify(poolBlocks));
return;
case 'worker_stats':
if (req.url.indexOf("?")>0) {
Expand Down Expand Up @@ -56,7 +63,6 @@ module.exports = function(logger, portalConfig, poolConfigs){
//console.log(portalStats.statHistory[h].time);
}
}
// note, h is the last record from above loop, which is latest
for(var pool in portalStats.stats.pools) {
for(var w in portalStats.stats.pools[pool].workers){
if (w.startsWith(address)) {
Expand Down
Loading

0 comments on commit 05968ef

Please sign in to comment.