Bitcoin Forum
November 05, 2024, 05:59:36 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 [8] 9 10 »  All
  Print  
Author Topic: Pay On Target: New High variance payout System Offered by Ozcoin  (Read 36506 times)
Nemesis
Sr. Member
****
Offline Offline

Activity: 462
Merit: 250


View Profile
December 26, 2012, 08:32:03 AM
 #141

merry christmas
Graet (OP)
VIP
Legendary
*
Offline Offline

Activity: 980
Merit: 1001



View Profile WWW
December 26, 2012, 09:43:27 AM
 #142

Hey Guys.
        So I decided to try out the new platform, been changing my difficulty around and such.  I did notice that cgminer is showing a best share of 9.1k vs ozcoins POT stats of 830.  Does the error in cgminer's 'best share' happen often, just one of those blips?  No rejected shares.

Thanks.


Hi do you have 2.10.3 version of cgminer? this version fixes the "wrong best share shown" bug Smiley

| Ozcoin Pooled Mining Pty Ltd https://ozcoin.net Double Geometric Reward System https://lc.ozcoin.net for Litecoin mining DGM| https://crowncloud.net VPS and Dedicated Servers for the BTC community
Wave
Member
**
Offline Offline

Activity: 105
Merit: 10


View Profile
December 26, 2012, 02:33:21 PM
Last edit: December 26, 2012, 03:32:36 PM by Wave
 #143

Thinking about continuing trial and lowering a=0.8 to 0.75 or 0.7 reduces variance a little and raising cap to 5*D instead of 1.5*D

feedback welcome Smiley

That is what I would like to see in POT rewards.  If my calculations are correct I think 5.6*D would be the magic number and provide a 1 BTC share for the block solve.

Edit  - As in max share block solve...

-Wave
makngeerwork
Full Member
***
Offline Offline

Activity: 141
Merit: 100

???


View Profile
December 26, 2012, 06:43:08 PM
 #144

Hey Guys.
        So I decided to try out the new platform, been changing my difficulty around and such.  I did notice that cgminer is showing a best share of 9.1k vs ozcoins POT stats of 830.  Does the error in cgminer's 'best share' happen often, just one of those blips?  No rejected shares.

Thanks.


Hi do you have 2.10.3 version of cgminer? this version fixes the "wrong best share shown" bug Smiley

Hi Graet.
     I was using  the 10.2,  your boys figured out the problem quickly, switching over to 10.3 today, Currently mining at 500 difficulty, around p2p difficulty, have been down, up, down, up.  I am used to huge variance with p2p and will keep mining until asic's show up.   Keep up the great work!

Thanks.


███    TWITTER   FLUX   WHITEPAPER  ███
███    WEBSITE   GAMING ECOSYSTEM        MEDIUM      ███
███  TELEGRAM  VALVE  UBISOFT  ██████ Origin  GAMELOFT      FACEBOOK   ███
hackjealousy
Newbie
*
Offline Offline

Activity: 53
Merit: 0



View Profile
December 26, 2012, 08:55:58 PM
 #145

Here is a small patch against cgminer-2.10.3 that shows the value of each share calculated using PPS, POT, and the latest proposed system (PPOT.)  I do not include any pool fees in the calculations so the value will be high by a few percent.

I also modified the target and share difficulty display in the "Accepted" log message.  It now shows more accuracy.  (Average target and share difficulties are kept as well.)

Cut and paste the patch below into a file, cgminer.patch .  Then:

$ tar xvf ~/Downloads/cgminer-2.10.3.tar.bz2
$ patch -p0 < cgminer.patch

Configure and build as normal.


Code:
--- cgminer-2.10.3/cgminer.c	2012-12-25 14:38:50.000000000 -0800
+++ cgminer-2.10.3-share/cgminer.c 2012-12-26 12:35:49.583369271 -0800
@@ -186,6 +186,8 @@ static struct timeval total_tv_start, to
 pthread_mutex_t control_lock;
 pthread_mutex_t stats_lock;
 
+long double g_network_difficulty = 0, g_avg_target_difficulty = 0, g_avg_share_difficulty = 0, g_total_pps = 0, g_total_pot = 0, g_total_pro_pot = 0;
+
 int hw_errors;
 int total_accepted, total_rejected, total_diff1;
 int total_getworks, total_stale, total_discarded;
@@ -1943,7 +1945,10 @@ static void curses_print_status(void)
  wclrtoeol(statuswin);
  mvwprintw(statuswin, 5, 0, " Block: %s...  Diff:%s  Started: %s  Best share: %s   ",
    current_hash, block_diff, blocktime, best_share);
- mvwhline(statuswin, 6, 0, '-', 80);
+ mvwprintw(statuswin, 6, 0, " PPS:  %3.8Lf BTC (Avg Target: %2.4Lf, Avg Share: %2.4Lf)       ", g_total_pps, g_avg_target_difficulty, g_avg_share_difficulty);
+ mvwprintw(statuswin, 7, 0, " POT:  %3.8Lf BTC, (%%%3.1Lf : %Lf BTC)       ", g_total_pot, 100.0L * g_total_pot / g_total_pps, g_total_pot - g_total_pps);
+ mvwprintw(statuswin, 8, 0, " PPOT: %3.8Lf BTC, (%%%3.1Lf : %Lf BTC)       ", g_total_pro_pot, 100.0L * g_total_pro_pot / g_total_pps, g_total_pro_pot - g_total_pps);
+ mvwhline(statuswin, 9, 0, '-', 80);
  mvwhline(statuswin, statusy - 1, 0, '-', 80);
  mvwprintw(statuswin, devcursor - 1, 1, "[P]ool management %s[S]ettings [D]isplay options [Q]uit",
  have_opencl ? "[G]PU management " : "");
@@ -2204,6 +2209,107 @@ static void reject_pool(struct pool *poo
  pool->enabled = POOL_REJECTING;
 }
 
+
+static void uncompress(uint32_t bits, uint32_t *target) {
+
+ uint32_t nb = 0, v;
+ int s = 0;
+
+ nb = ((bits >> 24) & 0xff) - 3;
+ v = bits & 0x00ffffff;
+
+ s = (nb % 4) * 8;
+ if (s == 0) {
+ s = 32;
+ nb--;
+ }
+
+ memset(target, 0, 32);
+ target[(nb >> 2) + 1] = v >> (32 - s);
+ target[nb >> 2] = v << s;
+}
+
+
+/*
+ * network difficulty, work target difficulty, share difficulty
+ */
+static long double diff1() {
+
+ static long double d1 = 0.0L;
+ static int diff1_init = 0;
+ static unsigned char diff1_8[32] = {
+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+
+ if(!diff1_init) {
+ int i;
+
+ for(i = 0; i < 32; i++) {
+ d1 *= 256;
+ d1 += diff1_8[i];
+ }
+ diff1_init = 1;
+ }
+
+ return d1;
+}
+
+
+static long double network_difficulty(const struct work *work) {
+
+ int i;
+ uint32_t bits;
+ unsigned char ntarget[32];
+ long double d = 0.0L;
+
+ bits = swab32(*((uint32_t *)(work->data + 72)));
+ uncompress(bits, (uint32_t *)ntarget);
+ for(i = 31; i >= 0; i--) {
+ d *= 256.0;
+ d += ntarget[i];
+ }
+ if(d == 0)
+ return -1;
+
+ return diff1() / d;
+}
+
+
+static long double work_target_difficulty(const struct work *work) {
+
+ int i;
+ long double d = 0.0L;
+
+ for(i = 31; i >= 0; i--) {
+ d *= 256.0;
+ d += work->target[i];
+ }
+ if(d == 0)
+ return -1;
+
+ return diff1() / d;
+}
+
+
+static long double share_difficulty(const struct work *work) {
+
+ int i;
+ long double d = 0.0L;
+
+ for(i = 31; i >= 0; i--) {
+ d *= 256.0;
+ d += work->hash[i];
+ }
+ if(d == 0)
+ return -1;
+
+ return diff1() / d;
+}
+
+
 /* Theoretically threads could race when modifying accepted and
  * rejected values but the chance of two submits completing at the
  * same time is zero so there is no point adding extra locking */
@@ -2215,6 +2321,29 @@ share_result(json_t *val, json_t *res, j
  struct cgpu_info *cgpu = thr_info[work->thr_id].cgpu;
 
  if (json_is_true(res) || (work->gbt && json_is_null(res))) {
+ long double nd, td, sd, ppsv, m, potv, ppotv, pf, ppf;
+
+ nd = network_difficulty(work);
+ td = work_target_difficulty(work);
+ sd = share_difficulty(work);
+ ppsv = 25.0L * td / nd; // BTC
+ /*
+ [(1-a)/(1-a*wd^(1-a)*X^(a-1))]*(wd*B/D)*(min(X,sd)/wd)^a
+ ((1 - a) / (1 - a(td / X)^(1 - a))) * ppsv * (min(X, sd) / td)^a
+
+ a = 0.8 = 4/5, X = 1.5D
+ */
+ m = (sd <= 1.5L * nd)? sd : 1.5L * nd;
+ pf = (1.0L / (5.0L - 4.0L * powl(1.5L * td / nd, 0.2L))) * powl(m / td, 0.8L);
+ potv = pf * ppsv;
+
+ /*
+ a = 0.75, X = 5D
+ */
+ m = (sd <= 5.0L * nd)? sd : 5.0L * nd;
+ ppf = (1.0L / (4.0L - 3.0L * powl(0.2L * td / nd, 0.25L))) * powl(m / td, 0.75L);
+ ppotv = ppf * ppsv;
+
  mutex_lock(&stats_lock);
  cgpu->accepted++;
  total_accepted++;
@@ -2222,6 +2351,14 @@ share_result(json_t *val, json_t *res, j
  cgpu->diff_accepted += work->work_difficulty;
  total_diff_accepted += work->work_difficulty;
  pool->diff_accepted += work->work_difficulty;
+
+ g_network_difficulty = nd;
+ g_avg_target_difficulty = ((total_accepted - 1) * g_avg_target_difficulty + td) / ((long double)total_accepted);
+ g_avg_share_difficulty = ((total_accepted - 1) * g_avg_share_difficulty + sd) / ((long double)total_accepted);
+ g_total_pps += ppsv;
+ g_total_pot += potv;
+ g_total_pro_pot += ppotv;
+
  mutex_unlock(&stats_lock);
 
  pool->seq_rejects = 0;
@@ -2232,12 +2369,22 @@ share_result(json_t *val, json_t *res, j
  pool->last_share_diff = work->work_difficulty;
  applog(LOG_DEBUG, "PROOF OF WORK RESULT: true (yay!!!)");
  if (!QUIET) {
- if (total_pools > 1)
- applog(LOG_NOTICE, "Accepted %s %s %d pool %d %s%s",
+ char logbuf[256];
+ unsigned int len;
+
+ if(total_pools > 1)
+ snprintf(logbuf, sizeof(logbuf), "Accepted %s %s %d pool %d %s%s",
         hashshow, cgpu->api->name, cgpu->device_id, work->pool->pool_no, resubmit ? "(resubmit)" : "", worktime);
  else
- applog(LOG_NOTICE, "Accepted %s %s %d %s%s",
+ snprintf(logbuf, sizeof(logbuf), "Accepted %s %s %d %s%s",
         hashshow, cgpu->api->name, cgpu->device_id, resubmit ? "(resubmit)" : "", worktime);
+ for(len = strlen(logbuf); len < 65; len++) {
+ logbuf[len] = ' ';
+ logbuf[len + 1] = 0;
+ }
+ snprintf(logbuf + len, sizeof(logbuf) - len, "PPS: %4.1Lf Satoshi (POT: %4.1Lf (%%%3.3Lf) PPOT: %4.1Lf (%%%3.3Lf))",
+    100000000.0L * ppsv, 100000000.0L * potv, 100.0L * pf, 100000000.0L * ppotv, 100.0L * ppf);
+ applog(LOG_NOTICE, "%s", logbuf);
  }
  sharelog("accept", work);
  if (opt_shares && total_accepted >= opt_shares) {
@@ -4484,12 +4631,19 @@ static void stratum_share_result(json_t
  uint32_t *hash32;
  char diffdisp[16];
  int intdiff;
+ long double wd, sd;
+
+ wd = work_target_difficulty(work);
+ sd = share_difficulty(work);
 
  hash32 = (uint32_t *)(work->hash);
  intdiff = floor(work->work_difficulty);
  suffix_string(sharediff, diffdisp, 0);
+ /*
  sprintf(hashshow, "%08lx Diff %s/%d%s", (unsigned long)(hash32[6]), diffdisp, intdiff,
  work->block? " BLOCK!" : "");
+ */
+ sprintf(hashshow, "%08lx Diff %3.6Lf/%3.6Lf%s", (unsigned long)(hash32[6]), sd, wd, work->block? " BLOCK!" : "");
  share_result(val, res_val, err_val, work, hashshow, false, "");
 }
 
@@ -6418,7 +6572,8 @@ int main(int argc, char *argv[])
  #endif // defined(WIN32)
 #endif
 
- devcursor = 8;
+ // devcursor = 8;
+ devcursor = 11;
  logstart = devcursor + 1;
  logcursor = logstart + 1;


philips
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500



View Profile
December 27, 2012, 08:57:22 PM
Last edit: December 27, 2012, 09:16:14 PM by philips
 #146

So what are the a and cap values right now?

Edit: Sorry, what is this latest proposed system (PPOT) ? It is about the new a = 0.75, X = 5D proposed values ?
(I see it mentioned in the patch as pro_pot )
Graet (OP)
VIP
Legendary
*
Offline Offline

Activity: 980
Merit: 1001



View Profile WWW
December 27, 2012, 09:06:54 PM
 #147

So what are the a and cap values right now?
not changed yet
a=0.8
cap=1.5D

I went back on Pot to do some testing
Highest Share: 3822430 (block)
paid 0.392286
makes my overall Pot positive Cheesy

| Ozcoin Pooled Mining Pty Ltd https://ozcoin.net Double Geometric Reward System https://lc.ozcoin.net for Litecoin mining DGM| https://crowncloud.net VPS and Dedicated Servers for the BTC community
philips
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500



View Profile
December 27, 2012, 09:23:59 PM
 #148

So what are the a and cap values right now?
not changed yet
a=0.8
cap=1.5D

I went back on Pot to do some testing
Highest Share: 3822430 (block)
paid 0.392286

makes my overall Pot positive Cheesy

Riiiight, rub it in now  Shocked
philips
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500



View Profile
December 28, 2012, 02:32:04 AM
 #149

Interesting, cgminer with hackjealousy patch:



On the left is Ozcoin where you can see a comparison between PPS, current POT and POT with a = 0.75, cap = 5D. Pool fees are not included.


Graet (OP)
VIP
Legendary
*
Offline Offline

Activity: 980
Merit: 1001



View Profile WWW
December 28, 2012, 04:24:38 AM
 #150

updated OP
changing cap to 5*D
keeping a = 0.8
reducing fee to 2%
Best wishes
Graet

| Ozcoin Pooled Mining Pty Ltd https://ozcoin.net Double Geometric Reward System https://lc.ozcoin.net for Litecoin mining DGM| https://crowncloud.net VPS and Dedicated Servers for the BTC community
-ck
Legendary
*
Offline Offline

Activity: 4284
Merit: 1645


Ruu \o/


View Profile WWW
December 28, 2012, 05:28:06 AM
 #151

Love it  Wink
* ckolivas keeps playing with manual diff settings to try and hedge his bets accordingly.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
kano
Legendary
*
Offline Offline

Activity: 4620
Merit: 1851


Linux since 1997 RedHat 4


View Profile
December 28, 2012, 06:38:35 AM
 #152

Defaults updated:
http://tradebtc.net/potcalc.php

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
philips
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500



View Profile
December 28, 2012, 06:53:17 AM
Last edit: December 29, 2012, 07:30:13 AM by philips
 #153

 Huh
I can see in cgminer shares still accepted alright by Ozcoin (POT) ...but acording to Ozcoin site my workers are dead for a while and of course no shares accepted since.

Also I can see around 300 shares accepted in DGM section on the current round although I am not on DGM.
Blaksmith
Full Member
***
Offline Offline

Activity: 189
Merit: 100



View Profile WWW
December 28, 2012, 07:07:53 AM
Last edit: December 28, 2012, 07:26:04 AM by Blaksmith
 #154

Huh
I can see in cgminer shares still accepted alright by Ozcoin (POT) ...but acording to Ozcoin site my worker are dead for a while and of course no shares accepted since.

Also I can see around 300 shares accepted in DGM section on the current round although I am not on DGM.

More work got done on the shares counting section, and a few bugs cropped up, and Wayno got them squashed. Smiley

Things should be proper now.

Edit: I just looked at things, and the "Round Shares" is, at least at this point in time, a normal thing.  You are not being paid DGM if you are not using DGM.  That same value is used for the bot in the IRC channel.  Sorry if it causes any confusion.

About your workers being dead on the site, I don't know about that one off hand.  Mine show as active, and I'm on PoT also.

"Your future is whatever you make it, so make it a good one." Dr. Emmett Brown
Donations welcome: Bitcoin: 1BLAKSMTjnME4ZJX7VzzUyEgbQYLShvqgi Catcoin: 9aw3Ttiz5yMALUm2DUj748cCHYQLatwLPz Unobtanium: uh3bjJua71jFijmz1yAB89KM8mqJEbzrek
Pool owner of: geekhash.org
philips
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500



View Profile
December 28, 2012, 07:17:31 AM
 #155

Still dead though, and sending shares...somewhere  Huh
Blaksmith
Full Member
***
Offline Offline

Activity: 189
Merit: 100



View Profile WWW
December 28, 2012, 07:35:03 AM
 #156

Still dead though, and sending shares...somewhere  Huh

Should be fixed now.  We found a break in a db sync.  All shares accounted for now.

"Your future is whatever you make it, so make it a good one." Dr. Emmett Brown
Donations welcome: Bitcoin: 1BLAKSMTjnME4ZJX7VzzUyEgbQYLShvqgi Catcoin: 9aw3Ttiz5yMALUm2DUj748cCHYQLatwLPz Unobtanium: uh3bjJua71jFijmz1yAB89KM8mqJEbzrek
Pool owner of: geekhash.org
Graet (OP)
VIP
Legendary
*
Offline Offline

Activity: 980
Merit: 1001



View Profile WWW
December 28, 2012, 07:35:21 AM
 #157

Still dead though, and sending shares...somewhere  Huh
They were cached on eu server, the db push had a hiccup when we opened port 80 for stratum mining ;/

| Ozcoin Pooled Mining Pty Ltd https://ozcoin.net Double Geometric Reward System https://lc.ozcoin.net for Litecoin mining DGM| https://crowncloud.net VPS and Dedicated Servers for the BTC community
philips
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500



View Profile
December 28, 2012, 07:42:42 AM
Last edit: December 29, 2012, 07:32:00 AM by philips
 #158

Yep, I can see them now.
1700 + shares appeared on POT status and 2800 + on DGM. All right, thanks.

Still, I was on POT the whole time, why DGM?
Blaksmith
Full Member
***
Offline Offline

Activity: 189
Merit: 100



View Profile WWW
December 28, 2012, 07:46:57 AM
 #159

Yep, I can see them now.
1700 + shares appeared on POT status and 2800 + on DGM. Al right, thanks.

Still, I was on POT the whole time, why DGM?

The "Round Shares" value is used for the bot in the IRC channel now.  You can either ignore it, or use it to your advantage while looking elsewhere on the site.  That value will show how many shares you have for this round, on either DGM, PPS, or POT.  It doesn't actually mean you are on DGM at the time any more.




"Your future is whatever you make it, so make it a good one." Dr. Emmett Brown
Donations welcome: Bitcoin: 1BLAKSMTjnME4ZJX7VzzUyEgbQYLShvqgi Catcoin: 9aw3Ttiz5yMALUm2DUj748cCHYQLatwLPz Unobtanium: uh3bjJua71jFijmz1yAB89KM8mqJEbzrek
Pool owner of: geekhash.org
philips
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500



View Profile
December 28, 2012, 07:58:31 AM
 #160

Yep, I can see them now.
1700 + shares appeared on POT status and 2800 + on DGM. Al right, thanks.

Still, I was on POT the whole time, why DGM?

The "Round Shares" value is used for the bot in the IRC channel now.  You can either ignore it, or use it to your advantage while looking elsewhere on the site.  That value will show how many shares you have for this round, on either DGM, PPS, or POT.  It doesn't actually mean you are on DGM at the time any more.

OK, got it  Smiley
Pages: « 1 2 3 4 5 6 7 [8] 9 10 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!