Merge pull request #830 from iAmShorty/block-finding-rate

Block finding rate
This commit is contained in:
Sebastian Grewe 2013-11-07 06:52:34 -08:00
commit ae0f2cf082
15 changed files with 260 additions and 244 deletions

View File

@ -22,6 +22,22 @@ class Statistics extends Base {
return $this->getcache;
}
/**
* Get our first block found
*
**/
public function getFirstBlockFound() {
$this->debug->append("STA " . __METHOD__, 4);
if ($data = $this->memcache->get(__FUNCTION__)) return $data;
$stmt = $this->mysqli->prepare("
SELECT
time FROM " . $this->block->getTableName() . "
ORDER BY id ASC LIMIT 1");
if ($this->checkStmt($stmt) && $stmt->execute() && $result = $stmt->get_result())
return $result->fetch_object()->time;
return false;
}
/**
* Fetch last found blocks by time
**/
@ -44,7 +60,10 @@ class Statistics extends Base {
IFNULL(SUM(IF(confirmations = -1 AND FROM_UNIXTIME(time) >= DATE_SUB(now(), INTERVAL 604800 SECOND), 1, 0)), 0) AS 7DaysOrphan,
IFNULL(SUM(IF(FROM_UNIXTIME(time) >= DATE_SUB(now(), INTERVAL 2419200 SECOND), 1, 0)), 0) AS 4WeeksTotal,
IFNULL(SUM(IF(confirmations > 0 AND FROM_UNIXTIME(time) >= DATE_SUB(now(), INTERVAL 2419200 SECOND), 1, 0)), 0) AS 4WeeksValid,
IFNULL(SUM(IF(confirmations = -1 AND FROM_UNIXTIME(time) >= DATE_SUB(now(), INTERVAL 2419200 SECOND), 1, 0)), 0) AS 4WeeksOrphan
IFNULL(SUM(IF(confirmations = -1 AND FROM_UNIXTIME(time) >= DATE_SUB(now(), INTERVAL 2419200 SECOND), 1, 0)), 0) AS 4WeeksOrphan,
IFNULL(SUM(IF(FROM_UNIXTIME(time) >= DATE_SUB(now(), INTERVAL 29030400 SECOND), 1, 0)), 0) AS 12MonthTotal,
IFNULL(SUM(IF(confirmations > 0 AND FROM_UNIXTIME(time) >= DATE_SUB(now(), INTERVAL 29030400 SECOND), 1, 0)), 0) AS 12MonthValid,
IFNULL(SUM(IF(confirmations = -1 AND FROM_UNIXTIME(time) >= DATE_SUB(now(), INTERVAL 29030400 SECOND), 1, 0)), 0) AS 12MonthOrphan
FROM " . $this->block->getTableName());
if ($this->checkStmt($stmt) && $stmt->execute() && $result = $stmt->get_result())
return $this->memcache->setCache(__FUNCTION__, $result->fetch_assoc());

View File

@ -152,6 +152,20 @@ $config['accounts']['invitations']['count'] = 5;
// Currency system used in this pool, default: `LTC`
$config['currency'] = 'LTC';
/**
* Coin Target in seconds
*
* Explanation
* Target time for coins to be generated
*
* Fastcoin: 12 seconds
* Litecoin: 2,5 minutes = 150 seconds
* Feathercoin: 2,5 minutes = 150 seconds
* Bitcoin: 10 minutes = 600 seconds
*
**/
$config['cointarget'] = '150';
/**
* Default transaction fee to apply to user transactions
*

View File

@ -71,11 +71,14 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
$iHours = 24;
$aPoolStatistics = $statistics->getPoolStatsHours($iHours);
$iFirstBlockFound = $statistics->getFirstBlockFound();
$iTimeSinceFirstBlockFound = (time() - $iFirstBlockFound);
// Past blocks found, max 4 weeks back
$iFoundBlocksByTime = $statistics->getLastBlocksbyTime();
// Propagate content our template
$smarty->assign("FIRSTBLOCKFOUND", $iTimeSinceFirstBlockFound);
$smarty->assign("COINGENTIME", $config['cointarget']);
$smarty->assign("LASTBLOCKSBYTIME", $iFoundBlocksByTime);
$smarty->assign("BLOCKSFOUND", $aBlocksFoundData);
$smarty->assign("BLOCKLIMIT", $iLimit);

View File

@ -44,8 +44,11 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
// Past blocks found, max 4 weeks back
$iFoundBlocksByTime = $statistics->getLastBlocksbyTime();
$iFirstBlockFound = $statistics->getFirstBlockFound();
$iTimeSinceFirstBlockFound = ($now->getTimestamp() - $iFirstBlockFound);
// Propagate content our template
$smarty->assign("FIRSTBLOCKFOUND", $iTimeSinceFirstBlockFound);
$smarty->assign("LASTBLOCKSBYTIME", $iFoundBlocksByTime);
$smarty->assign("ESTTIME", $iEstTime);
$smarty->assign("TIMESINCELAST", $dTimeSinceLast);

View File

@ -0,0 +1,64 @@
{include file="global/block_header.tpl" BLOCK_HEADER="Block Shares" BLOCK_STYLE="clear:none;"}
<table width="100%" class="tablesorter" cellspacing="0">
<thead>
<tr>
<th align="left"></th>
<th align="center">Gen Est.</th>
<th align="center">Found</th>
<th align="center">Valid</th>
<th align="center">Orphan</th>
<th align="center">Rate Est.</th>
</tr>
</thead>
<tbody>
<tr>
<th align="left" style="padding-left: 15px">All Time</td>
<td align="center">{($FIRSTBLOCKFOUND / $COINGENTIME|default:"150")|number_format:"0"}</td>
<td align="center">{$LASTBLOCKSBYTIME.Total}</td>
<td align="center">{$LASTBLOCKSBYTIME.TotalValid}</td>
<td align="center">{$LASTBLOCKSBYTIME.TotalOrphan}</td>
<td align="center">{($LASTBLOCKSBYTIME.Total|default:"0.00" / ($FIRSTBLOCKFOUND / $COINGENTIME|default:"150") * 100)|number_format:"2"} %</td>
</tr>
<tr>
<th align="left" style="padding-left: 15px">Last Hour</td>
<td align="center">{(3600 / $COINGENTIME|default:"150")}</td>
<td align="center">{$LASTBLOCKSBYTIME.1HourTotal}</td>
<td align="center">{$LASTBLOCKSBYTIME.1HourValid}</td>
<td align="center">{$LASTBLOCKSBYTIME.1HourOrphan}</td>
<td align="center">{($LASTBLOCKSBYTIME.1HourTotal|default:"0.00" / (3600 / $COINGENTIME|default:"150") * 100)|number_format:"2"} %</td>
</tr>
<tr>
<th align="left" style="padding-left: 15px">Last 24 Hours</td>
<td align="center">{(86400 / $COINGENTIME|default:"150")}</td>
<td align="center">{$LASTBLOCKSBYTIME.24HourTotal}</td>
<td align="center">{$LASTBLOCKSBYTIME.24HourValid}</td>
<td align="center">{$LASTBLOCKSBYTIME.24HourOrphan}</td>
<td align="center">{($LASTBLOCKSBYTIME.24HourTotal|default:"0.00" / (86400 / $COINGENTIME|default:"150") * 100)|number_format:"2"} %</td>
</tr>
<tr>
<th align="left" style="padding-left: 15px">Last 7 Days</td>
<td align="center">{(604800 / $COINGENTIME|default:"150")}</td>
<td align="center">{$LASTBLOCKSBYTIME.7DaysTotal}</td>
<td align="center">{$LASTBLOCKSBYTIME.7DaysValid}</td>
<td align="center">{$LASTBLOCKSBYTIME.7DaysOrphan}</td>
<td align="center">{($LASTBLOCKSBYTIME.7DaysTotal|default:"0.00" / (604800 / $COINGENTIME|default:"150") * 100)|number_format:"2"} %</td>
</tr>
<tr>
<th align="left" style="padding-left: 15px">Last 4 Weeks</td>
<td align="center">{(2419200 / $COINGENTIME|default:"150")}</td>
<td align="center">{$LASTBLOCKSBYTIME.4WeeksTotal}</td>
<td align="center">{$LASTBLOCKSBYTIME.4WeeksValid}</td>
<td align="center">{$LASTBLOCKSBYTIME.4WeeksOrphan}</td>
<td align="center">{($LASTBLOCKSBYTIME.4WeeksTotal|default:"0.00" / (2419200 / $COINGENTIME|default:"150") * 100)|number_format:"2"} %</td>
</tr>
<tr>
<th align="left" style="padding-left: 15px">Last 12 Month</td>
<td align="center">{(29030400 / $COINGENTIME|default:"150")}</td>
<td align="center">{$LASTBLOCKSBYTIME.12MonthTotal}</td>
<td align="center">{$LASTBLOCKSBYTIME.12MonthValid}</td>
<td align="center">{$LASTBLOCKSBYTIME.12MonthOrphan}</td>
<td align="center">{($LASTBLOCKSBYTIME.12MonthTotal|default:"0.00" / (29030400 / $COINGENTIME|default:"150") * 100)|number_format:"2"} %</td>
</tr>
</tbody>
</table>
{include file="global/block_footer.tpl"}

View File

@ -0,0 +1,58 @@
{include file="global/block_header.tpl" BLOCK_HEADER="Block Shares" BLOCK_STYLE="clear:none;"}
<article class="module width_full">
<table width="70%" class="stats" rel="line">
<caption>Block Shares</caption>
<thead>
<tr>
{section block $BLOCKSFOUND step=-1}
<th scope="col">{$BLOCKSFOUND[block].height}</th>
{/section}
</th>
</thead>
<tbody>
<tr>
<th scope="row">Expected</th>
{section block $BLOCKSFOUND step=-1}
<td>{$BLOCKSFOUND[block].estshares}</td>
{/section}
</tr>
<tr>
<th scope="row">Actual</th>
{section block $BLOCKSFOUND step=-1}
<td>{$BLOCKSFOUND[block].shares}</td>
{/section}
</tr>
{if $GLOBAL.config.payout_system == 'pplns'}<tr>
<th scope="row">PPLNS</th>
{section block $BLOCKSFOUND step=-1}
<td>{$BLOCKSFOUND[block].pplns_shares}</td>
{/section}
</tr>{/if}
{if $USEBLOCKAVERAGE}<tr>
<th scope="row">Average</th>
{section block $BLOCKSFOUND step=-1}
<td>{$BLOCKSFOUND[block].block_avg}</td>
{/section}
</tr>{/if}
</tbody>
</table>
<table align="left" width="100%" border="0" style="font-size:13px;">
<tbody>
<tr>
<td class="left">
<a href="{$smarty.server.PHP_SELF}?page={$smarty.request.page}&action={$smarty.request.action}&height={if is_array($BLOCKSFOUND) && count($BLOCKSFOUND) > ($BLOCKLIMIT - 1)}{$BLOCKSFOUND[$BLOCKLIMIT - 1].height}{/if}&prev=1"><img src="{$PATH}/images/prev.png" /></a>
</td>
<td class="right">
<a href="{$smarty.server.PHP_SELF}?page={$smarty.request.page}&action={$smarty.request.action}&height={if is_array($BLOCKSFOUND) && count($BLOCKSFOUND) > 0}{$BLOCKSFOUND[0].height}{/if}&next=1"><img src="{$PATH}/images/next.png" /></i></a>
</td>
</tr>
</tbody>
</table>
<center><br>
<p style="padding-left:30px; padding-redight:30px; font-size:10px;">
The graph above illustrates N shares to find a block vs. E Shares expected to find a block based on
target and network difficulty and assuming a zero variance scenario.
</p>
</article>
{include file="global/block_footer.tpl"}

View File

@ -0,0 +1,27 @@
{include file="global/block_header.tpl" BLOCK_HEADER="Block Shares" BLOCK_STYLE="clear:none;"}
<header><h3>Last 24 hour totals</h3></header>
<table width="100%" class="tablesorter" cellspacing="0">
<thead>
<tr style="background-color:#B6DAFF;">
<th align="center">Blocks Found</th>
<th align="center">Rewards</th>
<th align="center">Avg Difficulty</th>
<th align="center">Expected Shares</th>
<th align="center">Actual Shares</th>
<th align="center" style="padding-right: 25px;">Percentage</th>
</tr>
</thead>
<tbody>
{assign var=percentage1 value=0}
<tr>
<td align="center">{$POOLSTATS.count|number_format:"0"}</td>
<td align="center">{$POOLSTATS.rewards|number_format:"4"}</td>
<td align="center">{$POOLSTATS.average|number_format:"4"}</td>
<td align="center">{$POOLSTATS.expected|number_format:"0"}</td>
<td align="center">{$POOLSTATS.shares|number_format:"0"}</td>
<td align="center" style="padding-right: 25px;">{if $POOLSTATS.shares > 0}{math assign="percentage1" equation="shares1 / estshares1 * 100" shares1=$POOLSTATS.shares estshares1=$POOLSTATS.expected}{/if}
<font color="{if ($percentage1 <= 100)}green{else}red{/if}">{$percentage1|number_format:"2"}</font></b></td>
</tr>
</tbody>
</table>
{include file="global/block_footer.tpl"}

View File

@ -0,0 +1,30 @@
{include file="global/block_header.tpl" BLOCK_HEADER="Last $BLOCKLIMIT Blocks Found" BLOCK_STYLE="clear:none;"}
<center>
<table width="100%" style="font-size:13px;">
<thead>
<tr style="background-color:#B6DAFF;">
<th class="center">Block</th>
<th>Finder</th>
<th class="center">Time</th>
<th class="right">Actual Shares</th>
</tr>
</thead>
<tbody>
{assign var=rank value=1}
{section block $BLOCKSFOUND}
<tr class="{cycle values="odd,even"}">
<td><a href="{$smarty.server.PHP_SELF}?page=statistics&action=round&height={$BLOCKSFOUND[block].height}">{$BLOCKSFOUND[block].height}</a></td>
<td>{if $BLOCKSFOUND[block].is_anonymous|default:"0" == 1 && $GLOBAL.userdata.is_admin|default:"0" == 0}anonymous{else}{$BLOCKSFOUND[block].finder|default:"unknown"|escape}{/if}</td>
<td class="center">{$BLOCKSFOUND[block].time|date_format:"%d/%m %H:%M:%S"}</td>
<td class="right">{$BLOCKSFOUND[block].shares|number_format}</td>
</tr>
{/section}
</tbody>
</table>
</center>
{if $GLOBAL.config.payout_system != 'pps'}
<ul>
<li>Note: <font color="orange">Round Earnings are not credited until {$GLOBAL.confirmations} confirms.</font></li>
</ul>
{/if}
{include file="global/block_footer.tpl"}

View File

@ -1,156 +1,4 @@
{include file="global/block_header.tpl" BLOCK_HEADER="Block Shares" BLOCK_STYLE="clear:none;"}
<table width="70%" class="stats" rel="line">
<caption>Block Shares</caption>
<thead>
<tr>
{section block $BLOCKSFOUND step=-1}
<th scope="col">{$BLOCKSFOUND[block].height}</th>
{/section}
</th>
</thead>
<tbody>
<tr>
<th scope="row">Expected</th>
{section block $BLOCKSFOUND step=-1}
<td>{$BLOCKSFOUND[block].estshares}</td>
{/section}
</tr>
<tr>
<th scope="row">Actual</th>
{section block $BLOCKSFOUND step=-1}
<td>{$BLOCKSFOUND[block].shares}</td>
{/section}
</tr>
{if $GLOBAL.config.payout_system == 'pplns'}<tr>
<th scope="row">PPLNS</th>
{section block $BLOCKSFOUND step=-1}
<td>{$BLOCKSFOUND[block].pplns_shares}</td>
{/section}
</tr>{/if}
{if $USEBLOCKAVERAGE}<tr>
<th scope="row">Average</th>
{section block $BLOCKSFOUND step=-1}
<td>{$BLOCKSFOUND[block].block_avg}</td>
{/section}
</tr>{/if}
</tbody>
</table>
<center><br>
<p style="padding-left:30px; padding-redight:30px; font-size:10px;">
The graph above illustrates N shares to find a block vs. E Shares expected to find a block based on
target and network difficulty and assuming a zero variance scenario.
</p>
<table width="100%" style="font-size:13px;">
<thead>
<tr>
<th class="center" colspan="6">Last 24 hour totals</th>
</tr>
<tr style="background-color:#B6DAFF;">
<th class="center">Blocks Found</th>
<th class="center">Rewards</th>
<th class="center">Avg Difficulty</th>
<th class="center">Expected Shares</th>
<th class="center">Actual Shares</th>
<th class="center">Percentage</th>
</tr>
</thead>
<tbody>
{assign var=percentage1 value=0}
<tr>
<td class="center">{$POOLSTATS.count|number_format:"0"}</td>
<td class="center">{$POOLSTATS.rewards|number_format:"4"}</td>
<td class="center">{$POOLSTATS.average|number_format:"4"}</td>
<td class="center">{$POOLSTATS.expected|number_format:"0"}</td>
<td class="center">{$POOLSTATS.shares|number_format:"0"}</td>
<td class="center">{if $POOLSTATS.shares > 0}{math assign="percentage1" equation="shares1 / estshares1 * 100" shares1=$POOLSTATS.shares estshares1=$POOLSTATS.expected}{/if}
<font color="{if ($percentage1 <= 100)}green{else}red{/if}">{$percentage1|number_format:"2"}</font></b></td>
</tr>
</tbody>
</table>
<table align="left" width="100%" border="0" style="font-size:13px;">
<tbody>
<tr>
<td class="left">
<a href="{$smarty.server.PHP_SELF}?page={$smarty.request.page}&action={$smarty.request.action}&height={if is_array($BLOCKSFOUND) && count($BLOCKSFOUND) > ($BLOCKLIMIT - 1)}{$BLOCKSFOUND[$BLOCKLIMIT - 1].height}{/if}&prev=1"><img src="{$PATH}/images/prev.png" /></a>
</td>
<td class="right">
<a href="{$smarty.server.PHP_SELF}?page={$smarty.request.page}&action={$smarty.request.action}&height={if is_array($BLOCKSFOUND) && count($BLOCKSFOUND) > 0}{$BLOCKSFOUND[0].height}{/if}&next=1"><img src="{$PATH}/images/next.png" /></i></a>
</td>
</tr>
</tbody>
</table>
</center>
{include file="global/block_footer.tpl"}
{include file="global/block_header.tpl" BLOCK_HEADER="Last $BLOCKLIMIT Blocks Found" BLOCK_STYLE="clear:none;"}
<center>
<table width="100%" class="sortable" style="font-size:13px;">
<thead>
<tr style="background-color:#B6DAFF;">
<th class="center">Block</th>
<th class="center">Validity</th>
<th>Finder</th>
<th class="center">Time</th>
<th class="right">Difficulty</th>
<th class="right">Amount</th>
<th class="right">Expected Shares</th>
{if $GLOBAL.config.payout_system == 'pplns'}<th class="right">PPLNS Shares</th>{/if}
<th class="right">Actual Shares</th>
<th class="right">Percentage</th>
</tr>
</thead>
<tbody>
{assign var=count value=0}
{assign var=totalexpectedshares value=0}
{assign var=totalshares value=0}
{assign var=totalpercentage value=0}
{assign var=pplnsshares value=0}
{section block $BLOCKSFOUND}
{assign var="totalshares" value=$totalshares+$BLOCKSFOUND[block].shares}
{assign var="count" value=$count+1}
{if $GLOBAL.config.payout_system == 'pplns'}{assign var="pplnsshares" value=$pplnsshares+$BLOCKSFOUND[block].pplns_shares}{/if}
<tr class="{cycle values="odd,even"}">
<td class="center"><a href="{$smarty.server.PHP_SELF}?page=statistics&action=round&height={$BLOCKSFOUND[block].height}">{$BLOCKSFOUND[block].height}</a></td>
<td class="center">
{if $BLOCKSFOUND[block].confirmations >= $GLOBAL.confirmations}
<font color="green">Confirmed</font>
{else if $BLOCKSFOUND[block].confirmations == -1}
<font color="red">Orphan</font>
{else}{$GLOBAL.confirmations - $BLOCKSFOUND[block].confirmations} left{/if}</td>
<td>{if $BLOCKSFOUND[block].is_anonymous|default:"0" == 1 && $GLOBAL.userdata.is_admin|default:"0" == 0}anonymous{else}{$BLOCKSFOUND[block].finder|default:"unknown"|escape}{/if}</td>
<td class="center">{$BLOCKSFOUND[block].time|date_format:"%d/%m %H:%M:%S"}</td>
<td class="right">{$BLOCKSFOUND[block].difficulty|number_format:"8"}</td>
<td class="right">{$BLOCKSFOUND[block].amount|number_format:"2"}</td>
<td class="right">
{$BLOCKSFOUND[block].estshares|number_format}
{assign var="totalexpectedshares" value=$totalexpectedshares+$BLOCKSFOUND[block].estshares}
</td>
{if $GLOBAL.config.payout_system == 'pplns'}<td class="right">{$BLOCKSFOUND[block].pplns_shares|number_format}</td>{/if}
<td class="right">{$BLOCKSFOUND[block].shares|number_format}</td>
<td class="right">
{math assign="percentage" equation="shares / estshares * 100" shares=$BLOCKSFOUND[block].shares estshares=$BLOCKSFOUND[block].estshares}
{assign var="totalpercentage" value=$totalpercentage+$percentage}
<font color="{if ($percentage <= 100)}green{else}red{/if}">{$percentage|number_format:"2"}</font>
</td>
</tr>
{/section}
{if $count > 0}
<tr>
<td colspan="6" class="right"><b>Totals</b></td>
<td class="right">{$totalexpectedshares|number_format}</td>
{if $GLOBAL.config.payout_system == 'pplns'}<td class="right">{$pplnsshares|number_format}</td>{/if}
<td class="right">{$totalshares|number_format}</td>
<td class="right"><font color="{if (($totalpercentage / $count) <= 100)}green{else}red{/if}">{($totalpercentage / $count)|number_format:"2"}</font>
</tr>
{/if}
</tbody>
</table>
</center>
{if $GLOBAL.config.payout_system != 'pps'}
<ul>
<li>Note: <font color="orange">Round Earnings are not credited until {$GLOBAL.confirmations} confirms.</font></li>
</ul>
{/if}
{include file="global/block_footer.tpl"}
{include file="statistics/blocks/block_shares_graph.tpl"}
{include file="statistics/blocks/block_overview_time.tpl"}
{include file="statistics/blocks/block_shares_time.tpl"}
{include file="statistics/blocks/blocks_found_details.tpl"}

View File

@ -51,31 +51,6 @@
{assign var=estshares value=(pow(2, (32 - $GLOBAL.config.target_bits)) * $DIFFICULTY) / pow(2, ($GLOBAL.config.targetdiff - 16))}
<td>{$estshares|number_format:"0"} <font size="1">(done: {(100 / $estshares * $GLOBAL.roundshares.valid)|number_format:"2"} %)</td>
</tr>
<tr>
<th align="left">All Blocks - Found / Valid / Orphan</td>
<td>{$FOUNDALLVALID + $FOUNDALLORPHAN} / {$FOUNDALLVALID} / {$FOUNDALLORPHAN}</td>
</tr>
<tr>
<th align="left">Blocks last hour - Found / Valid / Orphan</td>
<td>{$FOUNDLASTHOURVALID + $FOUNDLASTHOURORPHAN} / {$FOUNDLASTHOURVALID} / {$FOUNDLASTHOURORPHAN}</td>
</tr>
<tr>
<th align="left">Blocks last 24 hours - Found / Valid / Orphan</td>
<td>{$FOUNDLAST24HOURSVALID + $FOUNDLAST24HOURSORPHAN} / {$FOUNDLAST24HOURSVALID} / {$FOUNDLAST24HOURSORPHAN}</td>
</tr>
<tr>
<th align="left">Blocks last 7 days - Found / Valid / Orphan</td>
<td>{$FOUNDLAST7DAYSVALID + $FOUNDLAST7DAYSORPHAN} / {$FOUNDLAST7DAYSVALID} / {$FOUNDLAST7DAYSORPHAN}</td>
</tr>
<tr>
<th align="left">Blocks last 4 weeks - Found / Valid / Orphan</td>
<td>{$FOUNDLAST4WEEKSVALID + $FOUNDLAST4WEEKSORPHAN} / {$FOUNDLAST4WEEKSVALID} / {$FOUNDLAST4WEEKSORPHAN}</td>
</tr>
<tr>
<td class="leftheader">Time Since Last Block</td>
<td>{$TIMESINCELAST|seconds_to_words}</td>
</tr>
</tbody>
</table>
{if !$GLOBAL.website.api.disabled}<li>These stats are also available in JSON format <a href="{$smarty.server.PHP_SELF}?page=api&action=getpoolstatus&api_key={$GLOBAL.userdata.api_key}">HERE</a></li>{/if}
{include file="global/block_footer.tpl"}

View File

@ -4,42 +4,62 @@
<thead>
<tr>
<th align="left"></th>
<th align="center">Gen Est.</th>
<th align="center">Found</th>
<th align="center">Valid</th>
<th align="center">Orphan</th>
<th align="center">Rate Est.</th>
</tr>
</thead>
<tbody>
<tr>
<th align="left" style="padding-left: 15px">All Time</td>
<td align="center">{($FIRSTBLOCKFOUND / $COINGENTIME|default:"150")|number_format:"0"}</td>
<td align="center">{$LASTBLOCKSBYTIME.Total}</td>
<td align="center">{$LASTBLOCKSBYTIME.TotalValid}</td>
<td align="center">{$LASTBLOCKSBYTIME.TotalOrphan}</td>
<td align="center">{($LASTBLOCKSBYTIME.Total|default:"0.00" / ($FIRSTBLOCKFOUND / $COINGENTIME|default:"150") * 100)|number_format:"2"} %</td>
</tr>
<tr>
<th align="left" style="padding-left: 15px">Last Hour</td>
<td align="center">{(3600 / $COINGENTIME|default:"150")}</td>
<td align="center">{$LASTBLOCKSBYTIME.1HourTotal}</td>
<td align="center">{$LASTBLOCKSBYTIME.1HourValid}</td>
<td align="center">{$LASTBLOCKSBYTIME.1HourOrphan}</td>
<td align="center">{($LASTBLOCKSBYTIME.1HourTotal|default:"0.00" / (3600 / $COINGENTIME|default:"150") * 100)|number_format:"2"} %</td>
</tr>
<tr>
<th align="left" style="padding-left: 15px">Last 24 Hours</td>
<td align="center">{(86400 / $COINGENTIME|default:"150")}</td>
<td align="center">{$LASTBLOCKSBYTIME.24HourTotal}</td>
<td align="center">{$LASTBLOCKSBYTIME.24HourValid}</td>
<td align="center">{$LASTBLOCKSBYTIME.24HourOrphan}</td>
<td align="center">{($LASTBLOCKSBYTIME.24HourTotal|default:"0.00" / (86400 / $COINGENTIME|default:"150") * 100)|number_format:"2"} %</td>
</tr>
<tr>
<th align="left" style="padding-left: 15px">Last 7 Days</td>
<td align="center">{(604800 / $COINGENTIME|default:"150")}</td>
<td align="center">{$LASTBLOCKSBYTIME.7DaysTotal}</td>
<td align="center">{$LASTBLOCKSBYTIME.7DaysValid}</td>
<td align="center">{$LASTBLOCKSBYTIME.7DaysOrphan}</td>
<td align="center">{($LASTBLOCKSBYTIME.7DaysTotal|default:"0.00" / (604800 / $COINGENTIME|default:"150") * 100)|number_format:"2"} %</td>
</tr>
<tr>
<th align="left" style="padding-left: 15px">Last 4 Weeks</td>
<td align="center">{(2419200 / $COINGENTIME|default:"150")}</td>
<td align="center">{$LASTBLOCKSBYTIME.4WeeksTotal}</td>
<td align="center">{$LASTBLOCKSBYTIME.4WeeksValid}</td>
<td align="center">{$LASTBLOCKSBYTIME.4WeeksOrphan}</td>
<td align="center">{($LASTBLOCKSBYTIME.4WeeksTotal|default:"0.00" / (2419200 / $COINGENTIME|default:"150") * 100)|number_format:"2"} %</td>
</tr>
<tr>
<th align="left" style="padding-left: 15px">Last 12 Month</td>
<td align="center">{(29030400 / $COINGENTIME|default:"150")}</td>
<td align="center">{$LASTBLOCKSBYTIME.12MonthTotal}</td>
<td align="center">{$LASTBLOCKSBYTIME.12MonthValid}</td>
<td align="center">{$LASTBLOCKSBYTIME.12MonthOrphan}</td>
<td align="center">{($LASTBLOCKSBYTIME.12MonthTotal|default:"0.00" / (29030400 / $COINGENTIME|default:"150") * 100)|number_format:"2"} %</td>
</tr>
</tbody>
</table>
</article>
</article>

View File

@ -36,6 +36,18 @@
</tr>{/if}
</tbody>
</table>
<table class="tablesorter">
<tbody>
<tr>
<td align="left">
<a href="{$smarty.server.PHP_SELF}?page={$smarty.request.page}&action={$smarty.request.action}&height={if is_array($BLOCKSFOUND) && count($BLOCKSFOUND) > ($BLOCKLIMIT - 1)}{$BLOCKSFOUND[$BLOCKLIMIT - 1].height}{/if}&prev=1"><i class="icon-left-open"></i></a>
</td>
<td align="right">
<a href="{$smarty.server.PHP_SELF}?page={$smarty.request.page}&action={$smarty.request.action}&height={if is_array($BLOCKSFOUND) && count($BLOCKSFOUND) > 0}{$BLOCKSFOUND[0].height}{/if}&next=1"><i class="icon-right-open"></i></a>
</td>
</tr>
</tbody>
</table>
<footer>
<p style="padding-left:30px; padding-redight:30px; font-size:10px;">
The graph above illustrates N shares to find a block vs. E Shares expected to find a block based on

View File

@ -24,17 +24,4 @@
</tr>
</tbody>
</table>
<table class="tablesorter">
<tbody>
<tr>
<td align="left">
<a href="{$smarty.server.PHP_SELF}?page={$smarty.request.page}&action={$smarty.request.action}&height={if is_array($BLOCKSFOUND) && count($BLOCKSFOUND) > ($BLOCKLIMIT - 1)}{$BLOCKSFOUND[$BLOCKLIMIT - 1].height}{/if}&prev=1"><i class="icon-left-open"></i></a>
</td>
<td align="right">
<a href="{$smarty.server.PHP_SELF}?page={$smarty.request.page}&action={$smarty.request.action}&height={if is_array($BLOCKSFOUND) && count($BLOCKSFOUND) > 0}{$BLOCKSFOUND[0].height}{/if}&next=1"><i class="icon-right-open"></i></a>
</td>
</tr>
</tbody>
</table>
</article>

View File

@ -1,4 +1,4 @@
{include file="statistics/blocks/block_shares_graph.tpl"}
{include file="statistics/blocks/block_overview_time.tpl"}
{include file="statistics/blocks/block_shares_time.tpl"}
{include file="statistics/blocks/block_shares_graph.tpl"}
{include file="statistics/blocks/blocks_found_details.tpl"}

View File

@ -31,15 +31,6 @@
<th align="left">Est. Shares this Round</td>
<td id="b-target"></td>
</tr>
</tbody>
</table>
</div>
<header><h3>Block Statistics</h3></header>
<div class="module_content">
<table width="100%">
<tbody>
{if ! $GLOBAL.website.blockexplorer.disabled}
<tr>
<th align="left" width="50%">Next Network Block</td>
@ -59,45 +50,10 @@
<th align="left">Time Since Last Block</td>
<td colspan="3">{$TIMESINCELAST|seconds_to_words}</td>
</tr>
<tr>
<th align="left"></th>
<th align="center">Found</th>
<th align="center">Valid</th>
<th align="center">Orphan</th>
</tr>
<tr>
<th align="left">All Time</td>
<td align="center">{$LASTBLOCKSBYTIME.Total}</td>
<td align="center">{$LASTBLOCKSBYTIME.TotalValid}</td>
<td align="center">{$LASTBLOCKSBYTIME.TotalOrphan}</td>
</tr>
<tr>
<th align="left">Last Hour</td>
<td align="center">{$LASTBLOCKSBYTIME.1HourTotal}</td>
<td align="center">{$LASTBLOCKSBYTIME.1HourValid}</td>
<td align="center">{$LASTBLOCKSBYTIME.1HourOrphan}</td>
</tr>
<tr>
<th align="left">Last 24 Hours</td>
<td align="center">{$LASTBLOCKSBYTIME.24HourTotal}</td>
<td align="center">{$LASTBLOCKSBYTIME.24HourValid}</td>
<td align="center">{$LASTBLOCKSBYTIME.24HourOrphan}</td>
</tr>
<tr>
<th align="left">Last 7 Days</td>
<td align="center">{$LASTBLOCKSBYTIME.7DaysTotal}</td>
<td align="center">{$LASTBLOCKSBYTIME.7DaysValid}</td>
<td align="center">{$LASTBLOCKSBYTIME.7DaysOrphan}</td>
</tr>
<tr>
<th align="left">Last 4 Weeks</td>
<td align="center">{$LASTBLOCKSBYTIME.4WeeksTotal}</td>
<td align="center">{$LASTBLOCKSBYTIME.4WeeksValid}</td>
<td align="center">{$LASTBLOCKSBYTIME.4WeeksOrphan}</td>
</tr>
</tbody>
</table>
</div>
</div>
<footer>
{if !$GLOBAL.website.api.disabled}<ul><li>These stats are also available in JSON format <a href="{$smarty.server.PHP_SELF}?page=api&action=getpoolstatus&api_key={$GLOBAL.userdata.api_key|default:""}">HERE</a></li></ul>{/if}
</footer>