Bitcoin Forum
June 16, 2024, 05:34:39 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [17] 18 19 20 21 »  All
  Print  
Author Topic: old thread - deleted  (Read 26052 times)
mercSuey
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250


View Profile
July 31, 2013, 10:00:29 PM
 #321

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.
Petr1fied
Hero Member
*****
Offline Offline

Activity: 630
Merit: 502


View Profile
July 31, 2013, 10:12:43 PM
 #322

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
DimaziK
Full Member
***
Offline Offline

Activity: 131
Merit: 100


View Profile
July 31, 2013, 10:54:21 PM
 #323

Developers! When there will be a reduction of an award for the block?
2Kool4Skewl
Sr. Member
****
Offline Offline

Activity: 644
Merit: 250



View Profile WWW
July 31, 2013, 11:04:43 PM
 #324

The code should have been:

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 if(nHeight>333334) nSubsidy = 0.01

I agree with mercSuey about how this should be fixed.

"New fix:
55K blocks @ 10 = 550,000 (up to block 55,000)
40k blocks @ 5 = 200,000 (up to block 95,000)
750K coins"


                      ▄████████▄
                  ▄████████████████▄
             ▄██████████████████████████▄
      ▄███████████████████████████████████████▄
 ███████████████████████████████████████████████████
█████████████████████████████████████████████████████
█████████████████████████████████████████████████████
█████████████████████████████████████████████████████
█████████████████████████████████████████████████████
█████████████████████████████████████████████████████
█████████████████████████████████████████████████████
█████████████████████████████████████████████████████
 ███████████████████████████████████████████████████
 ███████████████████████████████████████████████████
 ███████████████████████████████████████████████████
  █████████████████████████████████████████████████
   ███████████████████████████████████████████████
   ███████████████████████████████████████████████
    █████████████████████████████████████████████
     ███████████████████████████████████████████
      █████████████████████████████████████████
       ███████████████████████████████████████
        █████████████████████████████████████
         ███████████████████████████████████
          █████████████████████████████████
           ▀█████████████████████████████▀
             ▀█████████████████████████▀
               ▀█████████████████████▀
                 ▀█████████████████▀
                   ▀█████████████▀
                      ▀███████▀
TRUSTEE 
2Kool4Skewl
Sr. Member
****
Offline Offline

Activity: 644
Merit: 250



View Profile WWW
July 31, 2013, 11:07:09 PM
 #325

Oh wait... Petr1fied already posted the correct code.  lol Smiley


                      ▄████████▄
                  ▄████████████████▄
             ▄██████████████████████████▄
      ▄███████████████████████████████████████▄
 ███████████████████████████████████████████████████
█████████████████████████████████████████████████████
█████████████████████████████████████████████████████
█████████████████████████████████████████████████████
█████████████████████████████████████████████████████
█████████████████████████████████████████████████████
█████████████████████████████████████████████████████
█████████████████████████████████████████████████████
 ███████████████████████████████████████████████████
 ███████████████████████████████████████████████████
 ███████████████████████████████████████████████████
  █████████████████████████████████████████████████
   ███████████████████████████████████████████████
   ███████████████████████████████████████████████
    █████████████████████████████████████████████
     ███████████████████████████████████████████
      █████████████████████████████████████████
       ███████████████████████████████████████
        █████████████████████████████████████
         ███████████████████████████████████
          █████████████████████████████████
           ▀█████████████████████████████▀
             ▀█████████████████████████▀
               ▀█████████████████████▀
                 ▀█████████████████▀
                   ▀█████████████▀
                      ▀███████▀
TRUSTEE 
DimaziK
Full Member
***
Offline Offline

Activity: 131
Merit: 100


View Profile
July 31, 2013, 11:07:40 PM
 #326

"New fix:
51K blocks @ 10 = 510,000 (up to block 51,000)
48k blocks @ 5 = 240,000 (up to block 99,000)
750K coins"
2Kool4Skewl
Sr. Member
****
Offline Offline

Activity: 644
Merit: 250



View Profile WWW
July 31, 2013, 11:09:02 PM
 #327

"New fix:
51K blocks @ 10 = 510,000 (up to block 51,000)
48k blocks @ 5 = 240,000 (up to block 99,000)
750K coins"

Only, 1k more blocks?  That doesn't give me enough time to get more CGB!  Cheesy


                      ▄████████▄
                  ▄████████████████▄
             ▄██████████████████████████▄
      ▄███████████████████████████████████████▄
 ███████████████████████████████████████████████████
█████████████████████████████████████████████████████
█████████████████████████████████████████████████████
█████████████████████████████████████████████████████
█████████████████████████████████████████████████████
█████████████████████████████████████████████████████
█████████████████████████████████████████████████████
█████████████████████████████████████████████████████
 ███████████████████████████████████████████████████
 ███████████████████████████████████████████████████
 ███████████████████████████████████████████████████
  █████████████████████████████████████████████████
   ███████████████████████████████████████████████
   ███████████████████████████████████████████████
    █████████████████████████████████████████████
     ███████████████████████████████████████████
      █████████████████████████████████████████
       ███████████████████████████████████████
        █████████████████████████████████████
         ███████████████████████████████████
          █████████████████████████████████
           ▀█████████████████████████████▀
             ▀█████████████████████████▀
               ▀█████████████████████▀
                 ▀█████████████████▀
                   ▀█████████████▀
                      ▀███████▀
TRUSTEE 
mercSuey
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250


View Profile
July 31, 2013, 11:42:19 PM
 #328

I posted above guys, block reward will half at block 55000 to give pool ops and exchanges, etc enough time to update client.  But instead of block rewards halving again at block 100,000, it will have at 95000.  So at the second halving of block rewards there will be 750K total coins just as with the previous halving schedule.

New fix:
55K blocks @ 10 = 550,000 (up to block 55,000)
40k blocks @ 5 = 200,000 (up to block 95,000)
750K total coins at block 95000

All is well that ends well...
sharkbyte093
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250



View Profile
July 31, 2013, 11:57:54 PM
 #329

Quote
I was a little bored today, ended up messing around with photoshop & a modeling program. Came up with this:



I'm not sure if you're looking for a new logo, but if you are, I can fiddle a bit more when I've got some free time.

Repost from other CGB thread.

mercSuey
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250


View Profile
August 01, 2013, 12:26:15 AM
 #330

Quote
I was a little bored today, ended up messing around with photoshop & a modeling program. Came up with this:



I'm not sure if you're looking for a new logo, but if you are, I can fiddle a bit more when I've got some free time.

Repost from other CGB thread.

Can you make the C larger just a tad?  You picked the right color, that's the main color of the CGB website in development.  Wink
sharkbyte093
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250



View Profile
August 01, 2013, 01:29:29 AM
 #331

As requested:

Enlarged C:



Inverted Colors:


Ghepetto
Sr. Member
****
Offline Offline

Activity: 285
Merit: 255



View Profile
August 01, 2013, 01:36:49 AM
 #332

As requested:

Enlarged C:



Inverted Colors:




love the concept but the image needs to be sharpened up imho, ice is sharp

--------------------Bagholder Extraordinaire--------------------
mercSuey
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250


View Profile
August 01, 2013, 06:40:18 AM
 #333

As requested:

Enlarged C:



Inverted Colors:




love the concept but the image needs to be sharpened up imho, ice is sharp

yeah, I think you're trying to go with the frost texture but it's just quite not working...how about a polished/shiny texture?  Looking good so far!
mercSuey
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250


View Profile
August 01, 2013, 06:44:56 AM
 #334

As requested:

Enlarged C:



Inverted Colors:




love the concept but the image needs to be sharpened up imho, ice is sharp

yeah, I think you're trying to go with the frost texture but it's just quite not working...how about a polished/shiny texture?  Looking good so far!

We have outsourced some of our logo/design work but more options is good!  By the way, client update imminent.
mercSuey
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250


View Profile
August 01, 2013, 06:59:26 AM
 #335

Client update.  Posting this here until Elambert wakes up and updates main page:

Binaries 1.1.4.9

Blockchain hard fork at 55000

Windows: https://docs.google.com/file/d/0B_N4P72HWplSV3BpR0NYb1FvTlE/edit?usp=sharing

Linux 64: https://docs.google.com/file/d/0B_N4P72HWplSLXdyN2xPSDI3azQ/edit?usp=sharing

Linux 32: https://docs.google.com/file/d/0B_N4P72HWplSaFdhNG9DTUlkNzA/edit?usp=sharing
elambert (OP)
Legendary
*
Offline Offline

Activity: 1696
Merit: 1008



View Profile
August 01, 2013, 09:56:51 AM
 #336


August 1, 2013 Update:

Yesterday was truly an interesting day for CGB and the crypto community! The subsidy halving set to take place at 50k blocks did not occur due to an oversight in the code. The CGB team has responded, identified the issue and made the necessary corrections. The subsidy halving will now take place at block 55k. It is imperative that everyone download the latest client BEFORE block 55k. We apologize for the inconvenience and appreciate your continued support. Please be prepared for some additional major announcements coming for CGB!                                                                   

Please download the updated client on OP.
elambert (OP)
Legendary
*
Offline Offline

Activity: 1696
Merit: 1008



View Profile
August 01, 2013, 01:25:14 PM
 #337


August 1, 2013 Update:

Yesterday was truly an interesting day for CGB and the crypto community! The subsidy halving set to take place at 50k blocks did not occur due to an oversight in the code. The CGB team has responded, identified the issue and made the necessary corrections. The subsidy halving will now take place at block 55k. It is imperative that everyone download the latest client BEFORE block 55k. We apologize for the inconvenience and appreciate your continued support. Please be prepared for some additional major announcements coming for CGB!                                                                   

Please download the updated client on OP.

Mac wallet also updated on OP. Thank you Maxpower!!!
BTCat
Legendary
*
Offline Offline

Activity: 1960
Merit: 1010



View Profile
August 01, 2013, 01:25:53 PM
 #338

Why not make a bullion like the silver/gold bullions, it's different from all the other coins and can easier look more interesting. Shiny glimmer that represents a high value.

Elambert posted this earlier (for website example) which could be awesome:

http://commons.wikimedia.org/wiki/File:Johnson_Matthey_500_grammes_silver_bullion.jpg

The above posted blue/white logo does not look representable and recognizable at all. It's too simplistic with just a C in it and does not shine.
BTCat
Legendary
*
Offline Offline

Activity: 1960
Merit: 1010



View Profile
August 01, 2013, 08:21:12 PM
 #339

Everyone here please take a moment to vote for CGB in the poll as favorite coin. Right now there is 10 votes which is already above average for the new coins but if we can get a real big number together it will sure draw some extra attention  Cheesy

https://bitcointalk.org/index.php?topic=264016.0
Lauda
Legendary
*
Offline Offline

Activity: 2674
Merit: 2965


Terminated.


View Profile WWW
August 01, 2013, 08:23:04 PM
 #340

Wow the new logo that someone posted above is impressive!

"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"
😼 Bitcoin Core (onion)
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [17] 18 19 20 21 »  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!