In order to test the GetBlockTemplate, ValidateAddress and SubmitBlock RPC calls a mining pool is used.
git clone https://github.com/zone117x/node-open-mining-portal.git nomp
cd nomp
npm update
A node-watch update is currently breaking the nomp installation, to fix it follow this issue:
{
"logLevel": "debug",
"logColors": true,
"cliPort": 17117,
"clustering": {
"enabled": false,
"forks": "auto"
},
"defaultPoolConfigs": {
"blockRefreshInterval": 1000,
"jobRebroadcastTimeout": 55,
"connectionTimeout": 600,
"emitInvalidBlockHashes": false,
"validateWorkerUsername": true,
"tcpProxyProtocol": false,
"banning": {
"enabled": true,
"time": 600,
"invalidPercent": 50,
"checkThreshold": 500,
"purgeInterval": 300
},
"redis": {
"host": "127.0.0.1",
"port": 6379
}
},
"website": {
"enabled": false,
"host": "0.0.0.0",
"port": 80,
"stratumHost": "35.184.165.194",
"stats": {
"updateInterval": 60,
"historicalRetention": 43200,
"hashrateWindow": 300
},
"adminCenter": {
"enabled": true,
"password": "passwordnono"
}
},
"redis": {
"host": "127.0.0.1",
"port": 6379
},
"switching": {
"switch1": {
"enabled": false,
"algorithm": "sha256",
"ports": {
"3333": {
"diff": 10,
"varDiff": {
"minDiff": 16,
"maxDiff": 512,
"targetTime": 15,
"retargetTime": 90,
"variancePercent": 30
}
}
}
},
"switch2": {
"enabled": false,
"algorithm": "scrypt",
"ports": {
"4444": {
"diff": 10,
"varDiff": {
"minDiff": 16,
"maxDiff": 512,
"targetTime": 15,
"retargetTime": 90,
"variancePercent": 30
}
}
}
},
"switch3": {
"enabled": false,
"algorithm": "x11",
"ports": {
"5555": {
"diff": 0.001,
"varDiff": {
"minDiff": 0.001,
"maxDiff": 1,
"targetTime": 15,
"retargetTime": 60,
"variancePercent": 30
}
}
}
}
},
"profitSwitch": {
"enabled": false,
"updateInterval": 600,
"depth": 0.90,
"usePoloniex": true,
"useCryptsy": true,
"useMintpal": true,
"useBittrex": true
}
}
Make sure you change the address because it's the one that is going to receive the block rewards. Also set your RPC credentials in the daemon section.
{
"enabled": true,
"coin": "bitcoin.json",
"address": "mz8DUu5atAfNEBNeQHrpdGkfWZ9vmk3Q13",
"rewardRecipients": {
},
"paymentProcessing": {
"enabled": false,
"paymentInterval": 20,
"minimumPayment": 70,
"daemon": {
"host": "127.0.0.1",
"port": 18332,
"user": "litecoinrpc",
"password": "litecoinrpcpass"
}
},
"ports": {
"4008": {
"diff": 1
},
"4333": {
"diff": 400,
"varDiff": {
"minDiff": 150,
"maxDiff": 512,
"targetTime": 15,
"retargetTime": 90,
"variancePercent": 30
}
},
"4080": {
"diff": 262144,
"varDiff": {
"minDiff": 262144,
"maxDiff": 2621440000,
"targetTime": 15,
"retargetTime": 90,
"variancePercent": 30
}
}
},
"daemons": [
{
"host": "127.0.0.1",
"port": 18332,
"user": "hanchon",
"password": "hanchonpass"
}
],
"p2p": {
"enabled": false,
"host": "127.0.0.1",
"port": 19333,
"disableTransactions": true
},
"mposMode": {
"enabled": false,
"host": "127.0.0.1",
"port": 3306,
"user": "me",
"password": "mypass",
"database": "ltc",
"checkPassword": true,
"autoCreateWorker": false
}
}
Start the redis server on a terminal or a screen session.
nvm use v0.10.25
node init.js