diff --git a/pool/base.php b/pool/base.php index 583ebcf6..4430a175 100644 --- a/pool/base.php +++ b/pool/base.php @@ -99,7 +99,7 @@ function howlongago($sec) return $des; } # -function howmanyhrs($tot, $days = false) +function howmanyhrs($tot, $days = false, $dh = false) { $sec = round($tot); if ($sec < 60) @@ -118,10 +118,47 @@ function howmanyhrs($tot, $days = false) { $dy = floor($hr / 24); $hr -= $dy * 24; - $des = $dy.'d '.$hr.'hr '.$min.'m '.$sec.'s'; + if ($dh == true) + { + if ($min >= 30) + { + $hr++; + if ($hr > 23) + { + $dy++; + $hr -= 24; + } + } + $ds = ''; + if ($dy != 1) + $ds = 's'; + if ($hr == 0) + $des = "${dy}day$ds"; + else + { + $hs = ''; + if ($hr != 1) + $hs = 's'; + $des = "${dy}day$ds ${hr}hr$hs"; + } + } + else + $des = $dy.'d '.$hr.'hr '.$min.'m '.$sec.'s'; } else - $des = $hr.'hr '.$min.'m '.$sec.'s'; + { + if ($dh == true) + { + if ($min >= 30) + $hr++; + $hs = ''; + if ($hr != 1) + $hs = 's'; + $des = "${hr}hr$hs"; + } + else + $des = $hr.'hr '.$min.'m '.$sec.'s'; + } } } return $des; diff --git a/pool/page_payout.php b/pool/page_payout.php index b6574cea..5990b6fd 100644 --- a/pool/page_payout.php +++ b/pool/page_payout.php @@ -14,7 +14,16 @@ function dopayout($data, $user) if (isset($data['info']['currndiff'])) $nd = $data['info']['currndiff']; $nv = number_format($nd, 1); - $nvx = number_format($N*$nd, 1); + $nvx = ''.number_format($N*$nd, 1).''; + $pd = $data['info']['p_hashrate24hr']; + $hr = 'is ?'; + $hrt = '?'; + if ($pd != '?' && $pd != '' && $pd > 0) + { + $hr = 'for the last day is roughly '.siprefmt($pd,2).'Hs'; + if ($nd > 0) + $hrt = ''.howmanyhrs($nd * $N / ($pd / pow(2,32)), true, true).''; + } $pg = "

Payouts

@@ -28,7 +37,16 @@ The $n1 value the pool uses is $t times the network difficulty when the block is Transaction fees are included in the miner reward.
Pool fee is 0.9% of the total.

-How do the payments work?

+PPL${n1}S acts like the reward 'ramps up' when you first start mining.
What actually happens?


+The $n means it takes that long to reward your shares.
+The ramp isn't missing rewards, it's delaying them to reduce variance.
+Each share is rewarded in all the blocks found in the $n after the share.
+That's simply how it reduces variance. Each share's reward is averaged out over the $n after it.
+The pool hash rate $hr which means the $n 'ramp' is roughly $hrt.

+ +Continue reading below for more detail about how it works:

+ +How do the PPL${n1}S payments work?

The $n means the pool rewards $t times the expected number of shares, each time a block is found.
So each share will be paid approximately $ot of it's expected value, in each block it gets a reward,
but each share is also expected, on average, to be rewarded $t times in blocks found after the share is submitted to the pool.
@@ -48,7 +66,7 @@ A ckpool restart will also end the current shift and start a new shift.
A network difficulty change will also end the current shift and start a new shift.

So, what's the $n value?

-The current Bitcoin network value for $n1d is $nv and thus $n is $nvx
+The current Bitcoin network value for $n1d is $nv and thus $n is $nvx
Bitcoin adjusts the $n1d value every 2016 blocks, which is about every 2 weeks.

When a block is found, the reward process counts back shifts until the total share difficulty included is $n.
Since shares are summarised into shifts, it will include the full shift at the end of the range counting backwards,
diff --git a/pool/page_usperf.php b/pool/page_usperf.php index 18961794..d99591b0 100644 --- a/pool/page_usperf.php +++ b/pool/page_usperf.php @@ -1,8 +1,8 @@ =0&&fi>=0){var xs,xf;xs=(st-x0)/(x1-x0);xf=(fi-x0)/(x1-x0);gfs(c,'$fs');gbe(c,xs,0);gln(c,xs,1);gln(c,xf,1);gln(c,xf,0);gle(c);gfl(c)}}} +$g = "function exf(n,c,xn,x0,x1,y0,y1,ar){if(n==0){var i,st=-1,fi=-1;for(i=0;i=0&&fi>=0){var xs,xf;xs=(st-x0)/(x1-x0);xf=(fi-x0)/(x1-x0);gfs(c,'$fs');gbe(c,xs,0);gln(c,xs,1);gln(c,xf,1);gln(c,xf,0);gle(c);gfl(c);gfz(c,xs,1,0,2,'Last 5Nd Reward \u279c','$ff','left')}}} function gdrw(c,d,cbx){gc(c);ghrs(c);gopt(c,cbx); gfs(c,'white');gss(c,'#0000c0');glw(c,2);gbd(c); var rows=d['rows'],ymin=-1,ymax=0,xmin=-1,xmax=0,tda=[]; @@ -110,7 +110,7 @@ function dousperf($data, $user) $data = str_replace(array("\\","'"), array("\\\\","\\'"), $ans['DATA']); $data .= $fld_sep . 'cols' . $val_sep . $datacols; $pg .= "