From f8f8b0a997e82f151393b7faa2220b545f0232d7 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 7 Nov 2013 10:50:32 +0100 Subject: [PATCH 1/8] [FEATURE] calculating-luck --- public/include/classes/statistics.class.php | 21 +++++- public/include/pages/statistics/pool.inc.php | 3 + .../mmcFE/statistics/pool/default.tpl | 70 ++++++++++++------- .../mpos/statistics/pool/general_stats.tpl | 59 +++++++++------- 4 files changed, 99 insertions(+), 54 deletions(-) diff --git a/public/include/classes/statistics.class.php b/public/include/classes/statistics.class.php index 02b3f204..fcb72531 100644 --- a/public/include/classes/statistics.class.php +++ b/public/include/classes/statistics.class.php @@ -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()); diff --git a/public/include/pages/statistics/pool.inc.php b/public/include/pages/statistics/pool.inc.php index c53a0c05..0252f1fb 100644 --- a/public/include/pages/statistics/pool.inc.php +++ b/public/include/pages/statistics/pool.inc.php @@ -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); diff --git a/public/templates/mmcFE/statistics/pool/default.tpl b/public/templates/mmcFE/statistics/pool/default.tpl index 7cf67f68..57a397e6 100644 --- a/public/templates/mmcFE/statistics/pool/default.tpl +++ b/public/templates/mmcFE/statistics/pool/default.tpl @@ -51,32 +51,50 @@ {assign var=estshares value=(pow(2, (32 - $GLOBAL.config.target_bits)) * $DIFFICULTY) / pow(2, ($GLOBAL.config.targetdiff - 16))} {$estshares|number_format:"0"} (done: {(100 / $estshares * $GLOBAL.roundshares.valid)|number_format:"2"} %) - - All Blocks - Found / Valid / Orphan - {$FOUNDALLVALID + $FOUNDALLORPHAN} / {$FOUNDALLVALID} / {$FOUNDALLORPHAN} - - - Blocks last hour - Found / Valid / Orphan - {$FOUNDLASTHOURVALID + $FOUNDLASTHOURORPHAN} / {$FOUNDLASTHOURVALID} / {$FOUNDLASTHOURORPHAN} - - - Blocks last 24 hours - Found / Valid / Orphan - {$FOUNDLAST24HOURSVALID + $FOUNDLAST24HOURSORPHAN} / {$FOUNDLAST24HOURSVALID} / {$FOUNDLAST24HOURSORPHAN} - - - Blocks last 7 days - Found / Valid / Orphan - {$FOUNDLAST7DAYSVALID + $FOUNDLAST7DAYSORPHAN} / {$FOUNDLAST7DAYSVALID} / {$FOUNDLAST7DAYSORPHAN} - - - Blocks last 4 weeks - Found / Valid / Orphan - {$FOUNDLAST4WEEKSVALID + $FOUNDLAST4WEEKSORPHAN} / {$FOUNDLAST4WEEKSVALID} / {$FOUNDLAST4WEEKSORPHAN} - - - Time Since Last Block - {$TIMESINCELAST|seconds_to_words} - - - + + + + Est. Shares + Shares found + Luck + + + since Pool Start + {($FIRSTBLOCKFOUND / $ESTTIME)|number_format:"2"} + {$LASTBLOCKSBYTIME.Total} + {($LASTBLOCKSBYTIME.Total / ($FIRSTBLOCKFOUND / $ESTTIME) * 100)|number_format:"2"} % + + + last hour + {(3600 / $ESTTIME)|number_format:"2"} + {$LASTBLOCKSBYTIME.1HourTotal} + {($LASTBLOCKSBYTIME.1HourTotal / (3600 / $ESTTIME) * 100)|number_format:"2"} % + + + last day + {(86400 / $ESTTIME)|number_format:"2"} + {$LASTBLOCKSBYTIME.24HourTotal} + {($LASTBLOCKSBYTIME.24HourTotal / (86400 / $ESTTIME) * 100)|number_format:"2"} % + + + last week + {(604800 / $ESTTIME)|number_format:"2"} + {$LASTBLOCKSBYTIME.7DaysTotal} + {($LASTBLOCKSBYTIME.7DaysTotal / (604800 / $ESTTIME) * 100)|number_format:"2"} % + + + last month + {(419200 / $ESTTIME)|number_format:"2"} + {$LASTBLOCKSBYTIME.4WeeksTotal} + {($LASTBLOCKSBYTIME.4WeeksTotal / (2419200 / $ESTTIME) * 100)|number_format:"2"} % + + + last year + {(29030400 / $ESTTIME)|number_format:"2"} + {$LASTBLOCKSBYTIME.12MonthTotal} + {($LASTBLOCKSBYTIME.12MonthTotal / (29030400 / $ESTTIME) * 100)|number_format:"2"} % + + {if !$GLOBAL.website.api.disabled}
  • These stats are also available in JSON format HERE
  • {/if} {include file="global/block_footer.tpl"} diff --git a/public/templates/mpos/statistics/pool/general_stats.tpl b/public/templates/mpos/statistics/pool/general_stats.tpl index 23562594..c1649a59 100644 --- a/public/templates/mpos/statistics/pool/general_stats.tpl +++ b/public/templates/mpos/statistics/pool/general_stats.tpl @@ -31,15 +31,6 @@ Est. Shares this Round - - - - - -

    Block Statistics

    -
    - - {if ! $GLOBAL.website.blockexplorer.disabled} + +
    Next Network Block @@ -59,41 +50,55 @@ Time Since Last Block {$TIMESINCELAST|seconds_to_words}
    +
    + +

    Pool Luck

    +
    + + - - - + + + - - - + - - - + - - - + - - - + - - - + + + + + +
    FoundValidOrphanEst. SharesShares foundLuck
    All Time + since Pool Start + {($FIRSTBLOCKFOUND / $ESTTIME)|number_format:"2"} {$LASTBLOCKSBYTIME.Total}{$LASTBLOCKSBYTIME.TotalValid}{$LASTBLOCKSBYTIME.TotalOrphan}{($LASTBLOCKSBYTIME.Total / ($FIRSTBLOCKFOUND / $ESTTIME) * 100)|number_format:"2"} %
    Last Hour + last hour + {(3600 / $ESTTIME)|number_format:"2"} {$LASTBLOCKSBYTIME.1HourTotal}{$LASTBLOCKSBYTIME.1HourValid}{$LASTBLOCKSBYTIME.1HourOrphan}{($LASTBLOCKSBYTIME.1HourTotal / (3600 / $ESTTIME) * 100)|number_format:"2"} %
    Last 24 Hours + last day + {(86400 / $ESTTIME)|number_format:"2"} {$LASTBLOCKSBYTIME.24HourTotal}{$LASTBLOCKSBYTIME.24HourValid}{$LASTBLOCKSBYTIME.24HourOrphan}{($LASTBLOCKSBYTIME.24HourTotal / (86400 / $ESTTIME) * 100)|number_format:"2"} %
    Last 7 Days + last week + {(604800 / $ESTTIME)|number_format:"2"} {$LASTBLOCKSBYTIME.7DaysTotal}{$LASTBLOCKSBYTIME.7DaysValid}{$LASTBLOCKSBYTIME.7DaysOrphan}{($LASTBLOCKSBYTIME.7DaysTotal / (604800 / $ESTTIME) * 100)|number_format:"2"} %
    Last 4 Weeks + last month + {(419200 / $ESTTIME)|number_format:"2"} {$LASTBLOCKSBYTIME.4WeeksTotal}{$LASTBLOCKSBYTIME.4WeeksValid}{$LASTBLOCKSBYTIME.4WeeksOrphan}{($LASTBLOCKSBYTIME.4WeeksTotal / (2419200 / $ESTTIME) * 100)|number_format:"2"} %
    last year + {(29030400 / $ESTTIME)|number_format:"2"}{$LASTBLOCKSBYTIME.12MonthTotal}{($LASTBLOCKSBYTIME.12MonthTotal / (29030400 / $ESTTIME) * 100)|number_format:"2"} %
    From 90a000e7ee17f5a4b4b654da81912b752f486f5d Mon Sep 17 00:00:00 2001 From: root Date: Thu, 7 Nov 2013 11:18:48 +0100 Subject: [PATCH 2/8] [FIX] division by zero --- .../mmcFE/statistics/pool/default.tpl | 18 +++++++++--------- .../mpos/statistics/pool/general_stats.tpl | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/public/templates/mmcFE/statistics/pool/default.tpl b/public/templates/mmcFE/statistics/pool/default.tpl index 57a397e6..0f8bc582 100644 --- a/public/templates/mmcFE/statistics/pool/default.tpl +++ b/public/templates/mmcFE/statistics/pool/default.tpl @@ -54,45 +54,45 @@ - Est. Shares - Shares found + Est. Blocks + Blocks found Luck - since Pool Start + since 1st Block {($FIRSTBLOCKFOUND / $ESTTIME)|number_format:"2"} {$LASTBLOCKSBYTIME.Total} - {($LASTBLOCKSBYTIME.Total / ($FIRSTBLOCKFOUND / $ESTTIME) * 100)|number_format:"2"} % + {IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / ($FIRSTBLOCKFOUND / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.Total / ($FIRSTBLOCKFOUND / 0.00) * 100)|number_format:"2"} %{/if} last hour {(3600 / $ESTTIME)|number_format:"2"} {$LASTBLOCKSBYTIME.1HourTotal} - {($LASTBLOCKSBYTIME.1HourTotal / (3600 / $ESTTIME) * 100)|number_format:"2"} % + {IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.1HourTotal / (3600 / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.1HourTotal / (3600 / 0.00) * 100)|number_format:"2"} %{/if} last day {(86400 / $ESTTIME)|number_format:"2"} {$LASTBLOCKSBYTIME.24HourTotal} - {($LASTBLOCKSBYTIME.24HourTotal / (86400 / $ESTTIME) * 100)|number_format:"2"} % + {IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / (86400 / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.Total / (86400 / 0.00) * 100)|number_format:"2"} %{/if} last week {(604800 / $ESTTIME)|number_format:"2"} {$LASTBLOCKSBYTIME.7DaysTotal} - {($LASTBLOCKSBYTIME.7DaysTotal / (604800 / $ESTTIME) * 100)|number_format:"2"} % + {IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / (604800 / $ESTTIME) * 100)|number_format:"2"} %{else} {($LASTBLOCKSBYTIME.Total / (604800 / 0.00) * 100)|number_format:"2"} %{/if} last month {(419200 / $ESTTIME)|number_format:"2"} {$LASTBLOCKSBYTIME.4WeeksTotal} - {($LASTBLOCKSBYTIME.4WeeksTotal / (2419200 / $ESTTIME) * 100)|number_format:"2"} % + {IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / (2419200 / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.Total / (2419200 / 0.00) * 100)|number_format:"2"} %{/if} last year {(29030400 / $ESTTIME)|number_format:"2"} {$LASTBLOCKSBYTIME.12MonthTotal} - {($LASTBLOCKSBYTIME.12MonthTotal / (29030400 / $ESTTIME) * 100)|number_format:"2"} % + {IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / (29030400 / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.Total / (29030400 / 0.00) * 100)|number_format:"2"} %{/if} {if !$GLOBAL.website.api.disabled}
  • These stats are also available in JSON format HERE
  • {/if} diff --git a/public/templates/mpos/statistics/pool/general_stats.tpl b/public/templates/mpos/statistics/pool/general_stats.tpl index c1649a59..e9faa13a 100644 --- a/public/templates/mpos/statistics/pool/general_stats.tpl +++ b/public/templates/mpos/statistics/pool/general_stats.tpl @@ -60,45 +60,45 @@ - Est. Shares - Shares found + Est. Blocks + Blocks found Luck - since Pool Start + since 1st Block {($FIRSTBLOCKFOUND / $ESTTIME)|number_format:"2"} {$LASTBLOCKSBYTIME.Total} - {($LASTBLOCKSBYTIME.Total / ($FIRSTBLOCKFOUND / $ESTTIME) * 100)|number_format:"2"} % + {IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / ($FIRSTBLOCKFOUND / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.Total / ($FIRSTBLOCKFOUND / 0.00) * 100)|number_format:"2"} %{/if} last hour {(3600 / $ESTTIME)|number_format:"2"} {$LASTBLOCKSBYTIME.1HourTotal} - {($LASTBLOCKSBYTIME.1HourTotal / (3600 / $ESTTIME) * 100)|number_format:"2"} % + {IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.1HourTotal / (3600 / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.1HourTotal / (3600 / 0.00) * 100)|number_format:"2"} %{/if} last day {(86400 / $ESTTIME)|number_format:"2"} {$LASTBLOCKSBYTIME.24HourTotal} - {($LASTBLOCKSBYTIME.24HourTotal / (86400 / $ESTTIME) * 100)|number_format:"2"} % + {IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / (86400 / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.Total / (86400 / 0.00) * 100)|number_format:"2"} %{/if} last week {(604800 / $ESTTIME)|number_format:"2"} {$LASTBLOCKSBYTIME.7DaysTotal} - {($LASTBLOCKSBYTIME.7DaysTotal / (604800 / $ESTTIME) * 100)|number_format:"2"} % + {IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / (604800 / $ESTTIME) * 100)|number_format:"2"} %{else} {($LASTBLOCKSBYTIME.Total / (604800 / 0.00) * 100)|number_format:"2"} %{/if} last month {(419200 / $ESTTIME)|number_format:"2"} {$LASTBLOCKSBYTIME.4WeeksTotal} - {($LASTBLOCKSBYTIME.4WeeksTotal / (2419200 / $ESTTIME) * 100)|number_format:"2"} % + {IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / (2419200 / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.Total / (2419200 / 0.00) * 100)|number_format:"2"} %{/if} last year {(29030400 / $ESTTIME)|number_format:"2"} {$LASTBLOCKSBYTIME.12MonthTotal} - {($LASTBLOCKSBYTIME.12MonthTotal / (29030400 / $ESTTIME) * 100)|number_format:"2"} % + {IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / (29030400 / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.Total / (29030400 / 0.00) * 100)|number_format:"2"} %{/if} From 9fa40eaf45ebf710aebfd39590f5c7a35e0db2cc Mon Sep 17 00:00:00 2001 From: root Date: Thu, 7 Nov 2013 12:14:37 +0100 Subject: [PATCH 3/8] [FEATURE] added block finding rate - HINT new config setting cointarget --- public/include/config/global.inc.dist.php | 14 ++++++++++++ .../include/pages/statistics/blocks.inc.php | 8 +++++-- .../statistics/blocks/block_overview_time.tpl | 22 ++++++++++++++++++- .../statistics/blocks/block_shares_graph.tpl | 12 ++++++++++ .../statistics/blocks/block_shares_time.tpl | 13 ----------- .../mpos/statistics/blocks/default.tpl | 2 +- 6 files changed, 54 insertions(+), 17 deletions(-) diff --git a/public/include/config/global.inc.dist.php b/public/include/config/global.inc.dist.php index 4a139582..b98dafc8 100644 --- a/public/include/config/global.inc.dist.php +++ b/public/include/config/global.inc.dist.php @@ -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'] = '12'; + /** * Default transaction fee to apply to user transactions * diff --git a/public/include/pages/statistics/blocks.inc.php b/public/include/pages/statistics/blocks.inc.php index d77663b4..ef697dc7 100644 --- a/public/include/pages/statistics/blocks.inc.php +++ b/public/include/pages/statistics/blocks.inc.php @@ -70,12 +70,16 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) { } $iHours = 24; + $now = new DateTime( "now" ); $aPoolStatistics = $statistics->getPoolStatsHours($iHours); - + $iFirstBlockFound = $statistics->getFirstBlockFound(); + $iTimeSinceFirstBlockFound = ($now->getTimestamp() - $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); diff --git a/public/templates/mpos/statistics/blocks/block_overview_time.tpl b/public/templates/mpos/statistics/blocks/block_overview_time.tpl index 7b793a8b..bb8af5da 100644 --- a/public/templates/mpos/statistics/blocks/block_overview_time.tpl +++ b/public/templates/mpos/statistics/blocks/block_overview_time.tpl @@ -4,42 +4,62 @@ + Gen Found Valid Orphan + Rate All Time + {($FIRSTBLOCKFOUND / $COINGENTIME)} {$LASTBLOCKSBYTIME.Total} {$LASTBLOCKSBYTIME.TotalValid} {$LASTBLOCKSBYTIME.TotalOrphan} + {($LASTBLOCKSBYTIME.Total|default:"0.00" / (3600 / $COINGENTIME) * 100)|number_format:"2"} % Last Hour + {(3600 / $COINGENTIME)} {$LASTBLOCKSBYTIME.1HourTotal} {$LASTBLOCKSBYTIME.1HourValid} {$LASTBLOCKSBYTIME.1HourOrphan} + {($LASTBLOCKSBYTIME.1HourTotal|default:"0.00" / (3600 / $COINGENTIME) * 100)|number_format:"2"} % Last 24 Hours + {(86400 / $COINGENTIME)} {$LASTBLOCKSBYTIME.24HourTotal} {$LASTBLOCKSBYTIME.24HourValid} {$LASTBLOCKSBYTIME.24HourOrphan} + {($LASTBLOCKSBYTIME.24HourTotal|default:"0.00" / (86400 / $COINGENTIME) * 100)|number_format:"2"} % Last 7 Days + {(604800 / $COINGENTIME)} {$LASTBLOCKSBYTIME.7DaysTotal} {$LASTBLOCKSBYTIME.7DaysValid} {$LASTBLOCKSBYTIME.7DaysOrphan} + {($LASTBLOCKSBYTIME.7DaysTotal|default:"0.00" / (604800 / $COINGENTIME) * 100)|number_format:"2"} % Last 4 Weeks + {(2419200 / $COINGENTIME)} {$LASTBLOCKSBYTIME.4WeeksTotal} {$LASTBLOCKSBYTIME.4WeeksValid} {$LASTBLOCKSBYTIME.4WeeksOrphan} + {($LASTBLOCKSBYTIME.4WeeksTotal|default:"0.00" / (2419200 / $COINGENTIME) * 100)|number_format:"2"} % + + + Last 12 Month + {(29030400 / $COINGENTIME)} + {$LASTBLOCKSBYTIME.12MonthTotal} + {$LASTBLOCKSBYTIME.12MonthValid} + {$LASTBLOCKSBYTIME.12MonthOrphan} + {($LASTBLOCKSBYTIME.12MonthTotal|default:"0.00" / (29030400 / $COINGENTIME) * 100)|number_format:"2"} % - + \ No newline at end of file diff --git a/public/templates/mpos/statistics/blocks/block_shares_graph.tpl b/public/templates/mpos/statistics/blocks/block_shares_graph.tpl index fb27a2b9..cacbc2cf 100644 --- a/public/templates/mpos/statistics/blocks/block_shares_graph.tpl +++ b/public/templates/mpos/statistics/blocks/block_shares_graph.tpl @@ -36,6 +36,18 @@ {/if} + + + + + + + +
    + + + +

    The graph above illustrates N shares to find a block vs. E Shares expected to find a block based on diff --git a/public/templates/mpos/statistics/blocks/block_shares_time.tpl b/public/templates/mpos/statistics/blocks/block_shares_time.tpl index 3add8da4..e73a7565 100644 --- a/public/templates/mpos/statistics/blocks/block_shares_time.tpl +++ b/public/templates/mpos/statistics/blocks/block_shares_time.tpl @@ -24,17 +24,4 @@ - - - - - - - - -
    - - - -
    diff --git a/public/templates/mpos/statistics/blocks/default.tpl b/public/templates/mpos/statistics/blocks/default.tpl index 2882fdb0..5137defd 100644 --- a/public/templates/mpos/statistics/blocks/default.tpl +++ b/public/templates/mpos/statistics/blocks/default.tpl @@ -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"} From baa3c8ff3eb6ddff6b02fd54e912de3b4219c29a Mon Sep 17 00:00:00 2001 From: root Date: Thu, 7 Nov 2013 12:19:59 +0100 Subject: [PATCH 4/8] [UPDATE] removed unused stuff --- public/include/config/global.inc.dist.php | 2 +- .../mmcFE/statistics/pool/default.tpl | 45 +---------------- .../statistics/blocks/block_overview_time.tpl | 2 +- .../mpos/statistics/pool/general_stats.tpl | 49 ------------------- 4 files changed, 3 insertions(+), 95 deletions(-) diff --git a/public/include/config/global.inc.dist.php b/public/include/config/global.inc.dist.php index b98dafc8..b6814772 100644 --- a/public/include/config/global.inc.dist.php +++ b/public/include/config/global.inc.dist.php @@ -164,7 +164,7 @@ $config['currency'] = 'LTC'; * Bitcoin: 10 minutes = 600 seconds * **/ -$config['cointarget'] = '12'; +$config['cointarget'] = '150'; /** * Default transaction fee to apply to user transactions diff --git a/public/templates/mmcFE/statistics/pool/default.tpl b/public/templates/mmcFE/statistics/pool/default.tpl index 0f8bc582..6f5aeb23 100644 --- a/public/templates/mmcFE/statistics/pool/default.tpl +++ b/public/templates/mmcFE/statistics/pool/default.tpl @@ -51,50 +51,7 @@ {assign var=estshares value=(pow(2, (32 - $GLOBAL.config.target_bits)) * $DIFFICULTY) / pow(2, ($GLOBAL.config.targetdiff - 16))} {$estshares|number_format:"0"} (done: {(100 / $estshares * $GLOBAL.roundshares.valid)|number_format:"2"} %) - - - - Est. Blocks - Blocks found - Luck - - - since 1st Block - {($FIRSTBLOCKFOUND / $ESTTIME)|number_format:"2"} - {$LASTBLOCKSBYTIME.Total} - {IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / ($FIRSTBLOCKFOUND / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.Total / ($FIRSTBLOCKFOUND / 0.00) * 100)|number_format:"2"} %{/if} - - - last hour - {(3600 / $ESTTIME)|number_format:"2"} - {$LASTBLOCKSBYTIME.1HourTotal} - {IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.1HourTotal / (3600 / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.1HourTotal / (3600 / 0.00) * 100)|number_format:"2"} %{/if} - - - last day - {(86400 / $ESTTIME)|number_format:"2"} - {$LASTBLOCKSBYTIME.24HourTotal} - {IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / (86400 / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.Total / (86400 / 0.00) * 100)|number_format:"2"} %{/if} - - - last week - {(604800 / $ESTTIME)|number_format:"2"} - {$LASTBLOCKSBYTIME.7DaysTotal} - {IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / (604800 / $ESTTIME) * 100)|number_format:"2"} %{else} {($LASTBLOCKSBYTIME.Total / (604800 / 0.00) * 100)|number_format:"2"} %{/if} - - - last month - {(419200 / $ESTTIME)|number_format:"2"} - {$LASTBLOCKSBYTIME.4WeeksTotal} - {IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / (2419200 / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.Total / (2419200 / 0.00) * 100)|number_format:"2"} %{/if} - - - last year - {(29030400 / $ESTTIME)|number_format:"2"} - {$LASTBLOCKSBYTIME.12MonthTotal} - {IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / (29030400 / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.Total / (29030400 / 0.00) * 100)|number_format:"2"} %{/if} - - + {if !$GLOBAL.website.api.disabled}

  • These stats are also available in JSON format HERE
  • {/if} {include file="global/block_footer.tpl"} diff --git a/public/templates/mpos/statistics/blocks/block_overview_time.tpl b/public/templates/mpos/statistics/blocks/block_overview_time.tpl index bb8af5da..da8ad42d 100644 --- a/public/templates/mpos/statistics/blocks/block_overview_time.tpl +++ b/public/templates/mpos/statistics/blocks/block_overview_time.tpl @@ -14,7 +14,7 @@ All Time - {($FIRSTBLOCKFOUND / $COINGENTIME)} + {($FIRSTBLOCKFOUND / $COINGENTIME)|number_format:"0"} {$LASTBLOCKSBYTIME.Total} {$LASTBLOCKSBYTIME.TotalValid} {$LASTBLOCKSBYTIME.TotalOrphan} diff --git a/public/templates/mpos/statistics/pool/general_stats.tpl b/public/templates/mpos/statistics/pool/general_stats.tpl index e9faa13a..0cad6b31 100644 --- a/public/templates/mpos/statistics/pool/general_stats.tpl +++ b/public/templates/mpos/statistics/pool/general_stats.tpl @@ -53,55 +53,6 @@
    - -

    Pool Luck

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Est. BlocksBlocks foundLuck
    since 1st Block - {($FIRSTBLOCKFOUND / $ESTTIME)|number_format:"2"}{$LASTBLOCKSBYTIME.Total}{IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / ($FIRSTBLOCKFOUND / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.Total / ($FIRSTBLOCKFOUND / 0.00) * 100)|number_format:"2"} %{/if}
    last hour - {(3600 / $ESTTIME)|number_format:"2"}{$LASTBLOCKSBYTIME.1HourTotal}{IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.1HourTotal / (3600 / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.1HourTotal / (3600 / 0.00) * 100)|number_format:"2"} %{/if}
    last day - {(86400 / $ESTTIME)|number_format:"2"}{$LASTBLOCKSBYTIME.24HourTotal}{IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / (86400 / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.Total / (86400 / 0.00) * 100)|number_format:"2"} %{/if}
    last week - {(604800 / $ESTTIME)|number_format:"2"}{$LASTBLOCKSBYTIME.7DaysTotal}{IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / (604800 / $ESTTIME) * 100)|number_format:"2"} %{else} {($LASTBLOCKSBYTIME.Total / (604800 / 0.00) * 100)|number_format:"2"} %{/if}
    last month - {(419200 / $ESTTIME)|number_format:"2"}{$LASTBLOCKSBYTIME.4WeeksTotal}{IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / (2419200 / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.Total / (2419200 / 0.00) * 100)|number_format:"2"} %{/if}
    last year - {(29030400 / $ESTTIME)|number_format:"2"}{$LASTBLOCKSBYTIME.12MonthTotal}{IF $ESTTIME > 0}{($LASTBLOCKSBYTIME.Total / (29030400 / $ESTTIME) * 100)|number_format:"2"} %{else}{($LASTBLOCKSBYTIME.Total / (29030400 / 0.00) * 100)|number_format:"2"} %{/if}