commit
5ebbdbada2
45
README.md
45
README.md
|
@ -1,7 +1,7 @@
|
|||
cryptonote-universal-pool
|
||||
====================
|
||||
|
||||
High performance Node.js (with native C addons) mining pool for CryptoNote based coins such as Bytecoin, Monero, QuazarCoin, HoneyPenny, etc..
|
||||
High performance Node.js (with native C addons) mining pool for CryptoNote based coins such as Bytecoin, DuckNote, Monero, QuazarCoin, HoneyPenny, etc..
|
||||
Comes with lightweight example front-end script which uses the pool's AJAX API.
|
||||
|
||||
|
||||
|
@ -72,14 +72,9 @@ Comes with lightweight example front-end script which uses the pool's AJAX API.
|
|||
|
||||
### Community / Support
|
||||
|
||||
* [CryptoNote Technology](https://cryptonote.org)
|
||||
* [CryptoNote Forum](https://forum.cryptonote.org/)
|
||||
* [Bytecoin Github](https://github.com/amjuarez/bytecoin)
|
||||
* [Monero Github](https://github.com/monero-project/bitmonero)
|
||||
* [Monero Announcement Thread](https://bitcointalk.org/index.php?topic=583449.0)
|
||||
* IRC (freenode)
|
||||
* Support / general discussion join #monero: https://webchat.freenode.net/?channels=#monero
|
||||
* Development discussion join #monero-dev: https://webchat.freenode.net/?channels=#monero-dev
|
||||
|
||||
* [CryptoNote Universal Pool Forum](https://bitcointalk.org/index.php?topic=705509)
|
||||
|
||||
#### Pools Using This Software
|
||||
|
||||
|
@ -127,22 +122,19 @@ npm update
|
|||
#### 2) Configuration
|
||||
|
||||
|
||||
*Warning for Cyrptonote coins other than Monero:* this software may or may not work with any given cryptonote coin.
|
||||
Be wary of altcoins that change the number of minimum coin units because you will have to reconfigure several config
|
||||
values to account for those changes. Unless you're offering a bounty reward - do not open an issue asking for help
|
||||
getting a coin other than Monero working with this software.
|
||||
|
||||
|
||||
Copy the `config_example.json` file to `config.json` then overview each options and change any to match your preferred setup.
|
||||
|
||||
|
||||
Explanation for each field:
|
||||
```javascript
|
||||
/* Used for storage in redis so multiple coins can share the same redis instance. */
|
||||
"coin": "monero",
|
||||
"coin": "ducknote",
|
||||
|
||||
/* Used for front-end display */
|
||||
"symbol": "MRO",
|
||||
"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": {
|
||||
|
||||
|
@ -178,7 +170,7 @@ Explanation for each field:
|
|||
"clusterForks": "auto",
|
||||
|
||||
/* Address where block rewards go, and miner payments come from. */
|
||||
"poolAddress": "4AsBy39rpUMTmgTUARGq2bFQWhDhdQNekK5v4uaLU699NPAnx9CubEJ82AkvD5ScoAZNYRwBxybayainhyThHAZWCdKmPYn"
|
||||
"poolAddress": "ddehi53dwGSBEXdhTYtga2R3fS4y9hRz4YHAsLABJpH75yUd5EDQmuL3yDBj1mG6MMeDfydY9vp4zFVVNQ99FTYq2PpsFJP2y"
|
||||
|
||||
/* Poll RPC daemons for new blocks every this many milliseconds. */
|
||||
"blockRefreshInterval": 1000,
|
||||
|
@ -411,20 +403,17 @@ Variable explanations:
|
|||
/* Must point to the API setup in your config.json file. */
|
||||
var api = "http://poolhost:8117";
|
||||
|
||||
/* Minimum units in a single coin, for Bytecoin its 100000000. */
|
||||
var coinUnits = 1000000000000;
|
||||
|
||||
/* Pool server host to instruct your miners to point to. */
|
||||
var poolHost = "cryppit.com";
|
||||
var poolHost = "poolhost.com";
|
||||
|
||||
/* IRC Server and room used for embedded KiwiIRC chat. */
|
||||
var irc = "irc.freenode.net/#monero";
|
||||
var irc = "irc.freenode.net/#ducknote";
|
||||
|
||||
/* Contact email address. */
|
||||
var email = "support@cryppit.com";
|
||||
var email = "support@poolhost.com";
|
||||
|
||||
/* Market stat display params from https://www.cryptonator.com/widget */
|
||||
var cryptonatorWidget = ["XMR-BTC", "XMR-USD", "XMR-EUR", "XMR-GBP"];
|
||||
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/";
|
||||
|
@ -435,6 +424,8 @@ 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";
|
||||
|
||||
```
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"coin": "monero",
|
||||
"symbol": "XMR",
|
||||
"coinUnits": 1000000000000,
|
||||
"coin": "ducknote",
|
||||
"symbol": "XDN",
|
||||
"coinUnits": 100000000,
|
||||
"coinDifficultyTarget": 240,
|
||||
|
||||
"logging": {
|
||||
"files": {
|
||||
|
@ -18,7 +19,7 @@
|
|||
"poolServer": {
|
||||
"enabled": true,
|
||||
"clusterForks": "auto",
|
||||
"poolAddress": "48Y4SoUJM5L3YXBEfNQ8bFNsvTNsqcH5Rgq8RF7BwpgvTBj2xr7CmWVanaw7L4U9MnZ4AG7U6Pn1pBhfQhFyFZ1rL1efL8z",
|
||||
"poolAddress": "ddehi53dwGSBEXdhTYtga2R3fS4y9hRz4YHAsLABJpH75yUd5EDQmuL3yDBj1mG6MMeDfydY9vp4zFVVNQ99FTYq2PpsFJP2y",
|
||||
"blockRefreshInterval": 1000,
|
||||
"minerTimeout": 900,
|
||||
"ports": [
|
||||
|
|
|
@ -129,6 +129,8 @@ function collectStats(){
|
|||
hashrateWindow: config.api.hashrateWindow,
|
||||
fee: config.blockUnlocker.poolFee,
|
||||
coin: config.coin,
|
||||
coinUnits: config.coinUnits,
|
||||
coinDifficultyTarget: config.coinDifficultyTarget,
|
||||
symbol: config.symbol,
|
||||
depth: config.blockUnlocker.depth,
|
||||
donation: config.blockUnlocker.devDonation,
|
||||
|
@ -471,8 +473,8 @@ function handleAdminUsers(response){
|
|||
var address = workerKeys[i].substr(-addressLength);
|
||||
var data = redisData[i];
|
||||
workersData[address] = {
|
||||
pending: data[0] / config.coinUnits,
|
||||
paid: data[1] / config.coinUnits,
|
||||
pending: data[0],
|
||||
paid: data[1],
|
||||
lastShare: data[2],
|
||||
hashes: data[3],
|
||||
hashrate: minersHashrate[address] ? minersHashrate[address] : 0
|
||||
|
|
|
@ -40,7 +40,7 @@ function convertPaymentsDataToChart(paymentsData) {
|
|||
var data = [];
|
||||
if(paymentsData && paymentsData.length) {
|
||||
for(var i = 0; paymentsData[i]; i += 2) {
|
||||
data.push([+paymentsData[i + 1], paymentsData[i].split(':')[1] / config.coinUnits]);
|
||||
data.push([+paymentsData[i + 1], paymentsData[i].split(':')[1]]);
|
||||
}
|
||||
}
|
||||
return data;
|
||||
|
|
|
@ -70,9 +70,10 @@
|
|||
|
||||
<script>
|
||||
|
||||
|
||||
lastStats = {};
|
||||
$(function() {
|
||||
$.get(api + '/stats', function(data) {
|
||||
lastStats = data;
|
||||
routePage();
|
||||
});
|
||||
});
|
||||
|
@ -115,7 +116,7 @@
|
|||
};
|
||||
|
||||
function getReadableCoins(coins) {
|
||||
return (parseInt(coins || 0) / coinUnits).toFixed(coinUnits.toString().length - 1);
|
||||
return (parseInt(coins || 0) / lastStats.config.coinUnits).toFixed(lastStats.config.coinUnits.toString().length - 1);
|
||||
}
|
||||
|
||||
function getReadableHashRateString(hashrate) {
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
var api = "http://xmr.xminingpool.com:2117";
|
||||
var api = "http://poolhost.com:1117";
|
||||
|
||||
var coinUnits = 1000000000000;
|
||||
var poolHost = "poolhost.com";
|
||||
|
||||
var poolHost = "xmr.xminingpool.com";
|
||||
var irc = "irc.freenode.net/#poolhost";
|
||||
|
||||
var irc = "irc.freenode.net/#monero";
|
||||
|
||||
var email = "support@cryppit.com";
|
||||
var email = "support@poolhost.com";
|
||||
|
||||
var cryptonatorWidget = ["XMR-BTC", "XMR-USD", "XMR-EUR"];
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
var lastStats;
|
||||
|
||||
function getReadableCoins(coins, digits, withoutSymbol){
|
||||
var amount = (parseInt(coins || 0) / coinUnits).toFixed(digits || coinUnits.toString().length - 1);
|
||||
var amount = (parseInt(coins || 0) / lastStats.config.coinUnits).toFixed(digits || lastStats.config.coinUnits.toString().length - 1);
|
||||
return amount + (withoutSymbol ? '' : (' ' + lastStats.config.symbol));
|
||||
}
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
<td><a href="./?wallet={{this.number}}">{{this.number}}</a></td>
|
||||
<td data-sort="{{this.wallet.hashrate}}">{{this.readableHashrate}}</td>
|
||||
<td data-sort="{{this.wallet.hashes}}">{{this.readableHashes}}</td>
|
||||
<td data-sort="{{this.wallet.pending}}">{{this.wallet.pending}}</td>
|
||||
<td data-sort="{{this.wallet.paid}}">{{this.wallet.paid}}</td>
|
||||
<td data-sort="{{this.wallet.pending}}">{{this.readablePending}}</td>
|
||||
<td data-sort="{{this.wallet.paid}}">{{this.readablePaid}}</td>
|
||||
<td data-sort="{{this.wallet.lastShare}}">{{this.timeago}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
|
@ -23,12 +23,15 @@
|
|||
properObject = {};
|
||||
for(var wallet in wallets) {
|
||||
if(wallets.hasOwnProperty(wallet)) {
|
||||
var userData = wallets[wallet];
|
||||
walletsArray.push({
|
||||
number: wallet,
|
||||
wallet: wallets[wallet],
|
||||
timeago: $.timeago(new Date(wallets[wallet].lastShare * 1000).toISOString()),
|
||||
readableHashrate: getReadableHashRateString(wallets[wallet].hashrate) + '/s',
|
||||
readableHashes: getReadableHashRateString(wallets[wallet].hashes)
|
||||
wallet: userData,
|
||||
timeago: $.timeago(new Date(userData.lastShare * 1000).toISOString()),
|
||||
readablePending: getReadableCoins(userData.pending),
|
||||
readablePaid: getReadableCoins(userData.paid),
|
||||
readableHashrate: getReadableHashRateString(userData.hashrate) + '/s',
|
||||
readableHashes: getReadableHashRateString(userData.hashes)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,16 +73,6 @@
|
|||
|
||||
<hr>
|
||||
|
||||
<h3>Wallet & Daemon Software</h3>
|
||||
<p>
|
||||
<ul>
|
||||
<li><a target="_blank" href="http://monero.cc/getting-started/">Getting started with Monero</a></li>
|
||||
<li>Monero information and news on its <a href="https://bitcointalk.org/index.php?topic=583449.0">BitcoinTalk announcement thread</a></li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Mining Apps</h3>
|
||||
<div class="yourStats table-responsive">
|
||||
<table class="table">
|
||||
|
|
|
@ -329,7 +329,7 @@
|
|||
|
||||
$('#networkLastBlockFound').timeago('update', new Date(lastStats.network.timestamp * 1000).toISOString());
|
||||
|
||||
updateText('networkHashrate', getReadableHashRateString(lastStats.network.difficulty / 60) + '/sec');
|
||||
updateText('networkHashrate', getReadableHashRateString(lastStats.network.difficulty / lastStats.config.coinDifficultyTarget) + '/sec');
|
||||
updateText('networkDifficulty', lastStats.network.difficulty.toString());
|
||||
updateText('blockchainHeight', lastStats.network.height.toString());
|
||||
updateText('networkLastReward', getReadableCoins(lastStats.network.reward, 4));
|
||||
|
@ -593,7 +593,7 @@
|
|||
function createUserCharts(data) {
|
||||
for(var chart in userGraphStat) {
|
||||
if(data['charts'][chart] && data['charts'][chart].length) {
|
||||
var graphData = getGraphData(data['charts'][chart]);
|
||||
var graphData = getGraphData(data['charts'][chart], chart == 'payments');
|
||||
userGraphStat[chart].tooltipValueLookups.names = graphData.names;
|
||||
$('[data-chart=user_' + chart + ']').show().find('.chart').sparkline(graphData.values, userGraphStat[chart]);
|
||||
}
|
||||
|
@ -631,7 +631,7 @@
|
|||
|
||||
/* Show stats of the currency */
|
||||
|
||||
function getGraphData (rawData) {
|
||||
function getGraphData (rawData, fixValueToCoins) {
|
||||
var graphData = {
|
||||
names: [],
|
||||
values: []
|
||||
|
@ -639,7 +639,7 @@
|
|||
if(rawData) {
|
||||
for (var i = 0, xy; xy = rawData[i]; i++) {
|
||||
graphData.names.push(new Date(xy[0]*1000).toUTCString());
|
||||
graphData.values.push(xy[1]);
|
||||
graphData.values.push(fixValueToCoins ? getReadableCoins(xy[1], 4, true) : xy[1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue