Better error message for when payment processor detects that it doesn't own the address. Updated readme with better deamon setup instructions. Removed 'reward' field from coins since we auto-detect that now.
This commit is contained in:
parent
f2862598a9
commit
1a00efc42a
32
README.md
32
README.md
|
@ -29,11 +29,8 @@ pool such as connected miners, network/pool difficulty/hash rate, etc.
|
|||
|
||||
#### Planned Features
|
||||
|
||||
* NOMP API - this API be used in several ways.
|
||||
* The website will use the API to display stats and information about the pool(s) on the portal's front-end website.
|
||||
* The NOMP Desktop app will use the API to connect to the portal to display a list of available coins to mine and
|
||||
NOMP server will have to send the desktop app each coin's version-byte so that a wallet (private key & address) can be
|
||||
generated securely and locally then used to mine on the pool.
|
||||
* NOMP API - Used by the website to display stats and information about the pool(s) on the portal's front-end website,
|
||||
and by the NOMP Desktop app to retrieve a list of available coins (and version-bytes for local wallet/address generation).
|
||||
|
||||
* To reduce variance for pools just starting out which have little to no hashing power a feature is planned which will
|
||||
allow your own pool to connect upstream to a larger pool server. It will request work from the larger pool then
|
||||
|
@ -75,6 +72,21 @@ Usage
|
|||
* [Redis](http://redis.io/) key-value store v2.6+ ([follow these instructions](http://redis.io/topics/quickstart))
|
||||
|
||||
|
||||
#### 0) Setting up coin daemon
|
||||
Follow the build/install instructions for your coin daemon. Your coin.conf file should end up looking something like this:
|
||||
```
|
||||
daemon=1
|
||||
rpcuser=litecoinrpc
|
||||
rpcpassword=securepassword
|
||||
rpcport=19332
|
||||
```
|
||||
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
|
||||
involves spawning a daemon using the "-datadir=/backup" argument which creates a new daemon instance with it's own
|
||||
config directory and coin.conf file. For more info on this see:
|
||||
* https://en.bitcoin.it/wiki/Data_directory
|
||||
* https://en.bitcoin.it/wiki/Running_bitcoind
|
||||
|
||||
#### 1) Downloading & Installing
|
||||
|
||||
Clone the repository and run `npm update` for all the dependencies to be installed:
|
||||
|
@ -135,7 +147,6 @@ Here is an example of the required fields:
|
|||
"name": "Litecoin",
|
||||
"symbol": "ltc",
|
||||
"algorithm": "scrypt", //or "sha256", "scrypt-jane", "quark", "x11"
|
||||
"reward": "POW", //or "POS"
|
||||
"txMessages": false //or true
|
||||
}
|
||||
````
|
||||
|
@ -274,13 +285,8 @@ Description of options:
|
|||
}
|
||||
},
|
||||
|
||||
/* 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
|
||||
- https://en.bitcoin.it/wiki/Running_bitcoind */
|
||||
/* For redundancy, recommended to have at least two daemon instances running in case one
|
||||
drops out-of-sync or offline. */
|
||||
"daemons": [
|
||||
{ //Main daemon instance
|
||||
"host": "localhost",
|
||||
|
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Alphacoin",
|
||||
"symbol" : "ALF",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Anoncoin",
|
||||
"symbol" : "ANC",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Auroracoin",
|
||||
"symbol" : "AUR",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name": "Bitcoin",
|
||||
"symbol": "btc",
|
||||
"algorithm": "sha256",
|
||||
"reward": "POW",
|
||||
"txMessages": false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Bottlecaps",
|
||||
"symbol" : "CAP",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POS",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Casinocoin",
|
||||
"symbol" : "CSC",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Catcoin",
|
||||
"symbol" : "CAT",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name": "Darkcoin",
|
||||
"symbol": "drk",
|
||||
"algorithm": "x11",
|
||||
"reward": "POW",
|
||||
"txMessages": false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Diamondcoin",
|
||||
"symbol" : "DMD",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POS",
|
||||
"txMessages" : true
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Digibyte",
|
||||
"symbol" : "DGB",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Dogecoin",
|
||||
"symbol" : "DOGE",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Earthcoin",
|
||||
"symbol" : "EAC",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Elephantcoin",
|
||||
"symbol" : "ELP",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Emerald",
|
||||
"symbol" : "EMD",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Ezcoin",
|
||||
"symbol" : "EZC",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Fastcoin",
|
||||
"symbol" : "FST",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Flappycoin",
|
||||
"symbol" : "FLAP",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Florincoin",
|
||||
"symbol" : "FLO",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : true
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Frankocoin",
|
||||
"symbol" : "FRK",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Galaxycoin",
|
||||
"symbol" : "GLX",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POS",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Gamecoin",
|
||||
"symbol" : "GME",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"name" : "Hobonickels",
|
||||
"symbol" : "HBN",
|
||||
"algorithm" : "scrypt",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Junkcoin",
|
||||
"symbol" : "JKC",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Kittehcoin",
|
||||
"symbol" : "MEOW",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Krugercoin",
|
||||
"symbol" : "KGC",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Litecoin",
|
||||
"symbol" : "LTC",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Lottocoin",
|
||||
"symbol" : "LOT",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Luckycoin",
|
||||
"symbol" : "LKY",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Memecoin",
|
||||
"symbol" : "MEM",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Neocoin",
|
||||
"symbol" : "NEC",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POS",
|
||||
"txMessages" : true
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Netcoin",
|
||||
"symbol" : "NET",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : true
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Noirbits",
|
||||
"symbol" : "NRB",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name": "Peercoin",
|
||||
"symbol": "ppc",
|
||||
"algorithm": "sha256",
|
||||
"reward": "POS",
|
||||
"txMessages": false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Phoenixcoin",
|
||||
"symbol" : "PXC",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name": "Quarkcoin",
|
||||
"symbol": "qrk",
|
||||
"algorithm": "quark",
|
||||
"reward": "POW",
|
||||
"txMessages": false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Reddcoin",
|
||||
"symbol" : "REDD",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Sexcoin",
|
||||
"symbol" : "SXC",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name": "Skeincoin",
|
||||
"symbol": "skc",
|
||||
"algorithm": "skein",
|
||||
"reward": "POW",
|
||||
"txMessages": false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Spots",
|
||||
"symbol" : "SPT",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Stablecoin",
|
||||
"symbol" : "SBC",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name" : "Xencoin",
|
||||
"symbol" : "XNC",
|
||||
"algorithm" : "scrypt",
|
||||
"reward" : "POW",
|
||||
"txMessages" : false
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
"name": "Yacoin",
|
||||
"symbol": "yac",
|
||||
"algorithm": "scrypt-jane",
|
||||
"reward": "POS",
|
||||
"txMessages": false
|
||||
}
|
8
init.js
8
init.js
|
@ -109,10 +109,10 @@ var spawnPoolWorkers = function(portalConfig, poolConfigs){
|
|||
|
||||
var createPoolWorker = function(forkId){
|
||||
var worker = cluster.fork({
|
||||
workerType : 'pool',
|
||||
forkId : forkId,
|
||||
pools : serializedConfigs,
|
||||
portalConfig : JSON.stringify(portalConfig)
|
||||
workerType: 'pool',
|
||||
forkId: forkId,
|
||||
pools: serializedConfigs,
|
||||
portalConfig: JSON.stringify(portalConfig)
|
||||
});
|
||||
worker.on('exit', function(code, signal){
|
||||
logger.error('Master', 'PoolSpanwer', 'Fork ' + forkId + ' died, spawning replacement worker...');
|
||||
|
|
|
@ -34,7 +34,7 @@ function SetupForPool(logger, poolOptions){
|
|||
logger.debug(logSystem, logComponent, 'Connected to daemon for payment processing');
|
||||
|
||||
daemon.cmd('validateaddress', [poolOptions.address], function(result){
|
||||
if (!result[0].response.ismine){
|
||||
if (!result[0].response || !result[0].response.ismine){
|
||||
logger.error(logSystem, logComponent, 'Daemon does not own pool address - payment processing can not be done with this daemon');
|
||||
}
|
||||
});
|
||||
|
|
|
@ -119,13 +119,16 @@ module.exports = function(logger){
|
|||
|
||||
if (data.solution && !isValidBlock)
|
||||
logger.debug(logSystem, logComponent, logSubCat, 'We thought a block solution was found but it was rejected by the daemon, share data: ' + shareData);
|
||||
|
||||
else if (isValidBlock)
|
||||
logger.debug(logSystem, logComponent, logSubCat, 'Block solution found: ' + data.solution);
|
||||
|
||||
|
||||
if (isValidShare)
|
||||
logger.debug(logSystem, logComponent, logSubCat, 'Valid share diff of ' + data.difficultiy + ' submitted by worker ' + data.worker + ' [ ' + data.ip + ']' );
|
||||
logger.debug(logSystem, logComponent, logSubCat, 'Valid share of difficulty ' + data.difficulty + ' by ' + data.worker + ' [' + data.ip + ']' );
|
||||
|
||||
else if (!isValidShare)
|
||||
logger.debug(logSystem, logComponent, logSubCat, 'Invalid share submitted, share data: ' + shareData)
|
||||
logger.debug(logSystem, logComponent, logSubCat, 'Invalid share submitted, share data: ' + shareData);
|
||||
|
||||
|
||||
handlers.share(isValidShare, isValidBlock, data)
|
||||
|
|
Loading…
Reference in New Issue