Pages:
Author

Topic: old thread - deleted - page 5. (Read 26058 times)

full member
Activity: 131
Merit: 100
July 31, 2013, 06:54:21 PM
Developers! When there will be a reduction of an award for the block?
hero member
Activity: 630
Merit: 502
July 31, 2013, 06:12:43 PM
Code:
// miner's coin base reward based on nBits
int64 GetProofOfWorkReward(unsigned int nHeight)
{
int64 nSubsidy = 0 * COIN;

if (nHeight > 0)
{
nSubsidy = 10 * COIN; // 500,000 coins
}
     else if (nHeight > 50000)
     {
nSubsidy = 5 * COIN; // 250,000 coins
}
else if (nHeight > 100000)
{
nSubsidy = 2.5 * COIN; // 125,000 coins
}
else if (nHeight > 150000)
{
nSubsidy = 1.25 * COIN; // 62,500 coins
}
else if (nHeight > 200000)
{
nSubsidy = 0.75 * COIN; // 37,500 coins
}
else if (nHeight > 250000)
{
nSubsidy = 0.375 * COIN; // 18,750 coins
}
else if (nHeight > 300000)
{
nSubsidy = 0.1875 * COIN; // 9,375 coins
}
else if (nHeight > 333334)
{
nSubsidy = 0.01 * COIN; // 5256 coins per year roughly 0.053% yearly inflation
}

     return nSubsidy;
}

That should be more like:
Code:
// miner's coin base reward based on nBits
int64 GetProofOfWorkReward(unsigned int nHeight)
{
int64 nSubsidy = 0 * COIN;

if (nHeight > 0)
{
nSubsidy = 10 * COIN; // 500,000 coins
}
            if (nHeight > 50000)
            {
nSubsidy = 5 * COIN; // 250,000 coins
}
if (nHeight > 100000)
{
nSubsidy = 2.5 * COIN; // 125,000 coins
}
if (nHeight > 150000)
{
nSubsidy = 1.25 * COIN; // 62,500 coins
}
if (nHeight > 200000)
{
nSubsidy = 0.75 * COIN; // 37,500 coins
}
if (nHeight > 250000)
{
nSubsidy = 0.375 * COIN; // 18,750 coins
}
if (nHeight > 300000)
{
nSubsidy = 0.1875 * COIN; // 9,375 coins
}
if (nHeight > 333334)
{
nSubsidy = 0.01 * COIN; // 5256 coins per year roughly 0.053% yearly inflation
}

     return nSubsidy;
}

Using else if is what caused it not to hard fork with a reduced subsidy because the first condition is always going to be true so there is never going to be an else.

Your code would work, but it's not good because you'll get a true then a true every time.  Instead is better to have first if statement as less than 50,000...then next else if as less than 100,000, etc.

I wouldn't have written it like that myself, just using the original code as a template. It may be better using something like:
Code:
// miner's coin base reward based on nBits
int64 GetProofOfWorkReward(unsigned int nHeight)
{
int64 nSubsidy = 0 * COIN;

if (nHeight > 0 && nHeight < 50000)
{
nSubsidy = 10 * COIN; // 500,000 coins
}
            else if (nHeight >= 50000 && nHeight < 100000)
            {
nSubsidy = 5 * COIN; // 250,000 coins
}
else if (nHeight >= 100000 && nHeight < 150000)
{
nSubsidy = 2.5 * COIN; // 125,000 coins
}
else if (nHeight >= 150000 && nHeight < 200000)
{
nSubsidy = 1.25 * COIN; // 62,500 coins
}
else if (nHeight >= 200000 && nHeight < 250000)
{
nSubsidy = 0.75 * COIN; // 37,500 coins
}
else if (nHeight >= 250000 && nHeight < 300000)
{
nSubsidy = 0.375 * COIN; // 18,750 coins
}
else if (nHeight >= 300000 && nHeight < 333334)
{
nSubsidy = 0.1875 * COIN; // 9,375 coins
}
else
{
nSubsidy = 0.01 * COIN; // 5256 coins per year roughly 0.053% yearly inflation
}

     return nSubsidy;
}

Obviously block 50,000 can't be used anymore but something similar to the above is specifying the exact range of the blocks so not causing a true outcome overridden by another true outcome
sr. member
Activity: 364
Merit: 250
July 31, 2013, 06:00:29 PM
Code:
// miner's coin base reward based on nBits
int64 GetProofOfWorkReward(unsigned int nHeight)
{
int64 nSubsidy = 0 * COIN;

if (nHeight > 0)
{
nSubsidy = 10 * COIN; // 500,000 coins
}
     else if (nHeight > 50000)
     {
nSubsidy = 5 * COIN; // 250,000 coins
}
else if (nHeight > 100000)
{
nSubsidy = 2.5 * COIN; // 125,000 coins
}
else if (nHeight > 150000)
{
nSubsidy = 1.25 * COIN; // 62,500 coins
}
else if (nHeight > 200000)
{
nSubsidy = 0.75 * COIN; // 37,500 coins
}
else if (nHeight > 250000)
{
nSubsidy = 0.375 * COIN; // 18,750 coins
}
else if (nHeight > 300000)
{
nSubsidy = 0.1875 * COIN; // 9,375 coins
}
else if (nHeight > 333334)
{
nSubsidy = 0.01 * COIN; // 5256 coins per year roughly 0.053% yearly inflation
}

     return nSubsidy;
}

That should be more like:
Code:
// miner's coin base reward based on nBits
int64 GetProofOfWorkReward(unsigned int nHeight)
{
int64 nSubsidy = 0 * COIN;

if (nHeight > 0)
{
nSubsidy = 10 * COIN; // 500,000 coins
}
            if (nHeight > 50000)
            {
nSubsidy = 5 * COIN; // 250,000 coins
}
if (nHeight > 100000)
{
nSubsidy = 2.5 * COIN; // 125,000 coins
}
if (nHeight > 150000)
{
nSubsidy = 1.25 * COIN; // 62,500 coins
}
if (nHeight > 200000)
{
nSubsidy = 0.75 * COIN; // 37,500 coins
}
if (nHeight > 250000)
{
nSubsidy = 0.375 * COIN; // 18,750 coins
}
if (nHeight > 300000)
{
nSubsidy = 0.1875 * COIN; // 9,375 coins
}
if (nHeight > 333334)
{
nSubsidy = 0.01 * COIN; // 5256 coins per year roughly 0.053% yearly inflation
}

     return nSubsidy;
}

Using else if is what caused it not to hard fork with a reduced subsidy because the first condition is always going to be true so there is never going to be an else.

Your code would work, but it's not good because you'll get a true then a true every time.  Instead is better to have first if statement as less than 50,000...then next else if as less than 100,000, etc.
sr. member
Activity: 364
Merit: 250
July 31, 2013, 05:58:23 PM
I did a quick look and found the bug...it's a quick and easy fix.  The dev is updating client right now.  It's looking like block reward will half at 55,000 then again at 95,000.

summary of old and new block rewards:

old:
50K blocks @ 10 = 500,000 (up to block 50,000)
50K blocks @ 5 = 250,000 (up to block 100,000)
750K coins

New fix:
55K blocks @ 10 = 550,000 (up to block 55,000)
40k blocks @ 5 = 200,000 (up to block 95,000)
750K coins
hero member
Activity: 630
Merit: 502
July 31, 2013, 05:56:23 PM
Code:
// miner's coin base reward based on nBits
int64 GetProofOfWorkReward(unsigned int nHeight)
{
int64 nSubsidy = 0 * COIN;

if (nHeight > 0)
{
nSubsidy = 10 * COIN; // 500,000 coins
}
     else if (nHeight > 50000)
     {
nSubsidy = 5 * COIN; // 250,000 coins
}
else if (nHeight > 100000)
{
nSubsidy = 2.5 * COIN; // 125,000 coins
}
else if (nHeight > 150000)
{
nSubsidy = 1.25 * COIN; // 62,500 coins
}
else if (nHeight > 200000)
{
nSubsidy = 0.75 * COIN; // 37,500 coins
}
else if (nHeight > 250000)
{
nSubsidy = 0.375 * COIN; // 18,750 coins
}
else if (nHeight > 300000)
{
nSubsidy = 0.1875 * COIN; // 9,375 coins
}
else if (nHeight > 333334)
{
nSubsidy = 0.01 * COIN; // 5256 coins per year roughly 0.053% yearly inflation
}

     return nSubsidy;
}

That should have been more like:
Code:
// miner's coin base reward based on nBits
int64 GetProofOfWorkReward(unsigned int nHeight)
{
int64 nSubsidy = 0 * COIN;

if (nHeight > 0)
{
nSubsidy = 10 * COIN; // 500,000 coins
}
            if (nHeight > 50000)
            {
nSubsidy = 5 * COIN; // 250,000 coins
}
if (nHeight > 100000)
{
nSubsidy = 2.5 * COIN; // 125,000 coins
}
if (nHeight > 150000)
{
nSubsidy = 1.25 * COIN; // 62,500 coins
}
if (nHeight > 200000)
{
nSubsidy = 0.75 * COIN; // 37,500 coins
}
if (nHeight > 250000)
{
nSubsidy = 0.375 * COIN; // 18,750 coins
}
if (nHeight > 300000)
{
nSubsidy = 0.1875 * COIN; // 9,375 coins
}
if (nHeight > 333334)
{
nSubsidy = 0.01 * COIN; // 5256 coins per year roughly 0.053% yearly inflation
}

     return nSubsidy;
}

Using else if is what caused it not to hard fork because the first condition is always going to be true so there is never going to be an else. In fact if I'm being picky it should probably also use >= because > 50000 is actually block 50,001 and above (not that it would make all that much difference on the grand scale).
sr. member
Activity: 840
Merit: 251
July 31, 2013, 05:31:31 PM
So at this rate all coins will be mined in the next 50k blocks.

Unless we fork it again and:

a) modify total coins
b) drop reward/block speed
c) some combination of the above options

I vote B.

EDIT: Not sure if there would actually be a vote, just voicing my (likely insignificant) opinion.  Cheesy
legendary
Activity: 2674
Merit: 2965
Terminated.
July 31, 2013, 05:27:24 PM
CGB bugged  Sad
sr. member
Activity: 285
Merit: 255
July 31, 2013, 05:25:07 PM
So at this rate all coins will be mined in the next 50k blocks.

Unless we fork it again and:

a) modify total coins
b) drop reward/block speed
c) some combination of the above options

hopefully not "a" I like the one mil cap.
sr. member
Activity: 271
Merit: 250
July 31, 2013, 05:21:29 PM
So at this rate all coins will be mined in the next 50k blocks.

Unless we fork it again and:

a) modify total coins
b) drop reward/block speed
c) some combination of the above options
full member
Activity: 182
Merit: 100
July 31, 2013, 05:19:29 PM
BEWARE OF CRYPTO BACKJACK

BIG FAIL AGAIN!

=> https://bitcointalksearch.org/topic/solved-beware-of-crypto-blackjack-254482 (read entry #05)

I recommend op to take the link to Crypto Black Jack from this thread (at least until all bugs are fixed)

I think my response in around 30 minutes of your initial post is pretty damned good. Perhaps you should learn to exercise a little patience before essentially labelling the site a scam everywhere you can.  Roll Eyes

I am simply warning people. Read my last post on the thread linked.
Don't roll your eyes at me. It is not my fault that you start a gambling site without testing the withdrawal scripts!

Your quick response however is something to be praised!
sr. member
Activity: 285
Merit: 255
July 31, 2013, 05:05:56 PM
So at this rate all coins will be mined in the next 50k blocks.
hero member
Activity: 630
Merit: 502
July 31, 2013, 05:04:23 PM
BEWARE OF CRYPTO BACKJACK

BIG FAIL AGAIN!

=> https://bitcointalksearch.org/topic/solved-beware-of-crypto-blackjack-254482 (read entry #05)

I recommend op to take the link to Crypto Black Jack from this thread (at least until all bugs are fixed)

I think my response in around 30 minutes of your initial post is pretty damned good. Perhaps you should learn to exercise a little patience before essentially labelling the site a scam everywhere you can.  Roll Eyes
sr. member
Activity: 271
Merit: 250
July 31, 2013, 04:56:10 PM
It appears reward did not halve after block 50,000.
full member
Activity: 131
Merit: 100
July 31, 2013, 04:42:47 PM
blok 50001 - 10 coins Huh
blok 50002 - 10 coins Huh
Why?
full member
Activity: 182
Merit: 100
July 31, 2013, 04:02:41 PM
BEWARE OF CRYPTO BACKJACK

BIG FAIL AGAIN!

=> https://bitcointalksearch.org/topic/solved-beware-of-crypto-blackjack-254482 (read entry #05)

I recommend op to take the link to Crypto Black Jack from this thread (at least until all bugs are fixed)
legendary
Activity: 1904
Merit: 1005
PGP ID: 78B7B84D
July 31, 2013, 11:34:30 AM
About 5 hrs till subsidy halves. This should have the effect of finally dropping CGB from the top 5 most profitable to mine (where it has been since it hit an exchange) or cause the price to double or most likely something between these 2 extremes! Stay tuned!

Exciting!!  Cheesy
legendary
Activity: 1696
Merit: 1008
July 31, 2013, 11:31:01 AM
About 5 hrs till subsidy halves. This should have the effect of finally dropping CGB from the top 5 most profitable to mine (where it has been since it hit an exchange) or cause the price to double or most likely something between these 2 extremes! Stay tuned!
member
Activity: 100
Merit: 10
July 31, 2013, 10:18:08 AM
5iqN125qEaGG7S2xJHK2souAN8MRdEH5kk

 Smiley
legendary
Activity: 1064
Merit: 1002
July 31, 2013, 08:55:58 AM
@Mullick you're working on both CGB and CAP at the same time?

No Elambert and satishi are doing a great job. I just like CGB and wanted to let users know why rewards are sometimes 0
legendary
Activity: 1696
Merit: 1008
Pages:
Jump to: