Commit fb5f4e0a authored by Jason Rhinelander's avatar Jason Rhinelander
Browse files

Added user-side payment/effort changes

parent 43d67461
......@@ -10,8 +10,8 @@
<title>Graft pool list</title>
<script src="/javascript/jquery/jquery.min.js"></script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script src="/pools.js?4"></script>
<link rel="stylesheet" href="/pools.css?4" />
<script src="pools.js?5"></script>
<link rel="stylesheet" href="pools.css?5" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
</head>
<body>
......@@ -46,7 +46,8 @@
<td class="name">Pool</td>
<td class="location">Location</td>
<td class="fee" sortnumeric="1">Fee (%)</td>
<td class="min" sortnumeric="1" title="The payment threshold for this pool. Note that some pools allow configuring a custom threshold">Thresh</td>
<td class="payment_system" title="The payment system of the pool. (A '?' after the type indicates a payment type that has not been confirmed)">Type</td>
<td class="min" sortnumeric="1" title="The minimum payment threshold for this pool. Note that some pools allow configuring a custom threshold">Min</td>
<td class="hashrate" sortnumeric="1" sortdesc="1" title="Current pool hashrate">Hashrate</td>
<td class="hashrate_pct" sortinstead="hashrate" title="Current pool hashrate as a percentage of the hashrate of all synchronized pools in this list">(% pools)</td>
<!--
......@@ -55,18 +56,21 @@
<td class="hr1", sortnumeric="1" sortdesc="1" title="Average pool hashrate over the past 24 hours">H/s (1d)</td>
<td class="hr7", sortnumeric="1" sortdesc="1" title="Average pool hashrate over the past week">H/s (7d)</td>
<td class="blocks_found" sortnumeric="1" sortdesc="1" title="Number of blocks this pool has found">Blocks</td>
<td class="effort" sortnumeric="1" title="Average block effort of all blocks found on a pool in the last 10080 network blocks (~2 weeks).
Green/red asterisks indicate an exceptionally lucky/unlucky pool:
. = 5% of pools are this lucky/unlucky randomly
* = 1% of pools are this lucky/unlucky randomly
** = 0.1% of pools are this lucky/unlucky randomly
*** = 0.01% of pools are this lucky/unlucky randomly
You can hover your mouse over an individual pool's effort value to see more detailed statistics.">Avg. Eff.</td>
<td class="height" sortnumeric="1" sortdesc="1" title="Current height reported by the pool; if this is within more than 1 or 2 lower (or higher!) than the others pools there is a problem">Height</td>
<td class="miners" sortnumeric="1" sortdesc="1" title="Current number of miners connected to the pool">Miners</td>
<td class="h_per_m" sortnumeric="1" sortdesc="1" title="Average hashrate per miner on this pool">H/s/m</td>
<td class="miners_paid" sortnumeric="1" sortdesc="1" title="Number of distinct miners who have received payments from this pool">Paid</td>
<td class="payments" sortnumeric="1" sortdesc="1" title="Number of payments this pool as made">Payments</td>
<td class="effort" sortnumeric="1" title="Current pool effort, i.e. total number of miner hashes since the last block found by the pool divided by the current difficulty.
1% of blocks are found with effort ≤ 1%
10% are found with effort ≤ 10.5%
50% are found with effort ≤ 63.2%
90% are found with effort ≤ 230%
1% of blocks require more than 460% effort">Effort</td>
<td class="payments" sortnumeric="1" sortdesc="1" title="Number of payments this pool as made">Pymnts.</td>
</tr>
</thead>
<tbody>
......
......@@ -58,10 +58,28 @@ thead td.desc::before {
content: "⇈";
}
thead td.hashrate_pct::before {
content: "" !important;
padding-left: 0;
}
td.name, td.location {
text-align: left;
}
td.effort.significant, td.fee.high { text-decoration: underline; cursor: help; }
td.effort.significant .indicator { font-weight: bold; }
td.effort.significant.high.conf95 { color: #660000; } /* Bad luck */
td.effort.significant.high.conf99 { color: #990000; } /* Really bad luck */
td.effort.significant.high.conf999 { color: #cc0000; } /* Perhaps something fishy here */
td.effort.significant.high.conf9999,
td.fee.high.conf9999 { color: #ff0000; } /* This is not luck anymore: the pool either lies to make its luck seem worse (why?) or is stealing blocks from miners */
td.effort.significant.low.conf95 { color: #006600; } /* lucky! */
td.effort.significant.low.conf99 { color: #009900; } /* wow! */
td.effort.significant.low.conf999 { color: #999900; } /* I'm skeptical that you are giving true luck values */
td.effort.significant.low.conf9999 { color: #ff0000; } /* I don't believe your luck values */
tr:nth-child(even) { background-color: #eeeeee; }
tr:nth-child(odd) { background-color: #ffffff; }
......
......@@ -11,9 +11,10 @@ function si_prefix(num) {
return num.toFixed(decimals) + ' ' + prefixes[prefix];
}
var pool_fields = ['name', 'location', 'fee', 'threshold', 'hashrate', 'hashrate_pct', /*'hashrate_pct_net',*/ 'hr1', 'hr7', 'blocks_found', 'height', 'miners', 'h_per_m', 'miners_paid', 'payments', 'effort'];
var pool_fields = ['name', 'location', 'fee', 'payment_system', 'threshold', 'hashrate', 'hashrate_pct', /*'hashrate_pct_net',*/ 'hr1', 'hr7', 'blocks_found', 'effort', 'height', 'miners', 'h_per_m', 'miners_paid', 'payments'];
var resort = false;
var last_column = -1;
var target_blocks_per_day = 720;
function add_commas(v) {
v = String(v);
......@@ -158,7 +159,7 @@ function update_pools(data) {
row.find('td.name').append(failure);
}
else {
for (let f of ['fee', 'threshold', 'blocks_found', 'height', 'miners', 'miners_paid', 'payments']) {
for (let f of ['fee', 'payment_system', 'threshold', 'blocks_found', 'height', 'miners', 'miners_paid', 'payments']) {
if (f in pool)
row.find('td.'+f).text(pool[f]);
}
......@@ -171,10 +172,51 @@ function update_pools(data) {
if ('location' in pool)
row.find('td.location').html(pool.location);
if (pool['effort'] !== null) {
if (pool['effort_stats']) {
let tde = row.find('td.effort');
tde.text(Math.round(pool.effort) + '%');
tde.attr("sortkey", pool.effort);
let eff = pool.effort_stats;
tde.text(eff.mean.toFixed(1) + '%');
let title = 'Since block ' + eff.since + ' (~' + ((data.height - eff.since) / target_blocks_per_day) + ' days ago) ' + pool.name + ' has found ' + eff.blocks + ' blocks ' +
'with an average effort over those blocks of ' + eff.mean.toPrecision(4) + '%.';
if (eff.pval < .05) {
title += '\n\nStatistically, the probability of a fair pool with this many blocks being this ' + (eff.mean > 100 ? 'unlucky' : 'lucky') + ' equals ' +
eff.pval.toPrecision(4).replace('e-', '×10^-') + '.';
}
if (eff.pval < .0001) {
if (eff.mean > 100) {
title += '\n\nSince the probability is so low that this average effort is simply due to bad luck, we\'ve added the effective ' +
'loss due to the abnormally high effort value to this pool\'s nominal fee of ' + row.find('td.fee').text() + '%.';
}
else {
title += '\n\nThis pool seems impossibly lucky: treat this reported luck value with suspicion.';
}
}
tde.attr('title', title);
if (eff.pval < 0.05) {
tde.addClass('significant');
tde.addClass(eff.mean > 100 ? "high" : "low");
let stars = $('<span></span>');
stars.addClass('indicator');
stars.text(eff.pval < .0001 ? '***' : eff.pval < .001 ? '**' : eff.pval < .01 ? '*' : '.');
tde.addClass(eff.pval < .0001 ? 'conf9999' : eff.pval < .001 ? 'conf999' : eff.pval < .01 ? 'conf99' : 'conf95');
tde.append(' ');
tde.append(stars);
}
if (eff.pval < .0001 && eff.mean > 100) {
let tdfee = row.find('td.fee');
let fee = parseFloat(tdfee.text());
fee += 100.0 * (1.0 - 100.0/eff.mean)
tdfee.text(fee.toFixed(1) + ' *');
tdfee.attr('sortkey', fee);
tdfee.attr('title', title);
tdfee.addClass('high').addClass('conf9999');
}
tde.attr("sortkey", eff.mean);
}
if ('hashrate' in pool) {
hr = row.find('td.hashrate');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment