Bitcoin Forum
November 23, 2017, 07:11:29 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 »  All
  Print  
Author Topic: How is it insured that only 21 mil bitcoins will ever be minted  (Read 1375 times)
alexeft
Legendary
*
Offline Offline

Activity: 784


View Profile
January 15, 2013, 02:06:44 PM
 #1

Hi people,

I'm new to the world of bitcoin and very enthusiastic I must say.

I wanted to ask how it is insured that only 21 million bitcoins will ever be minted?

Thanks in advance.
1511464289
Hero Member
*
Offline Offline

Posts: 1511464289

View Profile Personal Message (Offline)

Ignore
1511464289
Reply with quote  #2

1511464289
Report to moderator
1511464289
Hero Member
*
Offline Offline

Posts: 1511464289

View Profile Personal Message (Offline)

Ignore
1511464289
Reply with quote  #2

1511464289
Report to moderator
1511464289
Hero Member
*
Offline Offline

Posts: 1511464289

View Profile Personal Message (Offline)

Ignore
1511464289
Reply with quote  #2

1511464289
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
January 15, 2013, 02:28:37 PM
 #2

Hi people,

I'm new to the world of bitcoin and very enthusiastic I must say.

I wanted to ask how it is insured that only 21 million bitcoins will ever be minted?

Thanks in advance.

Bitcoin is a distributed consensus system.  Every node (regardless of they are a miner or not) validates transactions, and blocks against certain rules.  It is this set of rules which "make" Bitcoin.  One of the rules concerns the amount of the mining subsidy.  It began at 50 BTC per block and is reduced by half every 210,000 blocks.  If a miner was to not reduce the subsidy (or increase it, or violate any other protocol rule) the block would be rejected by all other nodes as invalid.  Since miners only get "paid" when others build upon their block, other good miners will also reject that block and continue to build on the longest "legit" chain.

It is important to note even a majority (51%) or super majority of miners can't change this behavior as blocks are validated not just by miners but by all nodes.  It is unlikely for this reason that the core protocol rules will ever be changed.  Any such change would result in an incompatible fork of the Bitcoin project and the "original" would always exist.
alexeft
Legendary
*
Offline Offline

Activity: 784


View Profile
January 15, 2013, 02:42:29 PM
 #3

Hi people,

I'm new to the world of bitcoin and very enthusiastic I must say.

I wanted to ask how it is insured that only 21 million bitcoins will ever be minted?

Thanks in advance.

Bitcoin is a distributed consensus system.  Every node (regardless of they are a miner or not) validates transactions, and blocks against certain rules.  It is this set of rules which "make" Bitcoin.  One of the rules concerns the amount of the mining subsidy.  It began at 50 BTC per block and is reduced by half every 210,000 blocks.  If a miner was to not reduce the subsidy (or increase it, or violate any other protocol rule) the block would be rejected by all other nodes as invalid.  Since miners only get "paid" when others build upon their block, other good miners will also reject that block and continue to build on the longest "legit" chain.

It is important to note even a majority (51%) or super majority of miners can't change this behavior as blocks are validated not just by miners but by all nodes.  It is unlikely for this reason that the core protocol rules will ever be changed.  Any such change would result in an incompatible fork of the Bitcoin project and the "original" would always exist.



Ok, so, the only way for a solved block to be recognized as legitimate is to have consensus. All other cases lead to forks of the original bitcoin and the decision of which one to follow lies with the participants, correct? If so, how can I make sure at any given time that I am on the original block chain?

Thanks again for your answers.
serp
Sr. Member
****
Offline Offline

Activity: 245


@serp


View Profile WWW
January 15, 2013, 02:50:04 PM
 #4

Ok, so, the only way for a solved block to be recognized as legitimate is to have consensus. All other cases lead to forks of the original bitcoin and the decision of which one to follow lies with the participants, correct? If so, how can I make sure at any given time that I am on the original block chain?

Thanks again for your answers.

By using a wallet/software that follows the rules of the consensus.  It will reject transactions which don't follow the rules. 

DannyHamilton
Legendary
*
Offline Offline

Activity: 1988



View Profile
January 15, 2013, 02:50:38 PM
 #5

. . . Ok, so, the only way for a solved block to be recognized as legitimate is to have consensus. All other cases lead to forks of the original bitcoin and the decision of which one to follow lies with the participants, correct? If so, how can I make sure at any given time that I am on the original block chain? . . .
Use software that enforces the appropriate consensus.  If the software that you use to manage your bitcoin enforces all the "original" protocol rules of bitcoin, then it will not accept transactions or blocks from any software that doesn't enforce the same rules.  Therefore it will be impossible for you to acquire a different blockchain.

alexeft
Legendary
*
Offline Offline

Activity: 784


View Profile
January 15, 2013, 03:03:50 PM
 #6

. . . Ok, so, the only way for a solved block to be recognized as legitimate is to have consensus. All other cases lead to forks of the original bitcoin and the decision of which one to follow lies with the participants, correct? If so, how can I make sure at any given time that I am on the original block chain? . . .
Use software that enforces the appropriate consensus.  If the software that you use to manage your bitcoin enforces all the "original" protocol rules of bitcoin, then it will not accept transactions or blocks from any software that doesn't enforce the same rules.  Therefore it will be impossible for you to acquire a different blockchain.

Ok, but, how is one supposed to know that his/her wallet software follows the rules unless he/she is a programmer and reads the code before compiling every new version?
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
January 15, 2013, 03:08:55 PM
 #7

. . . Ok, so, the only way for a solved block to be recognized as legitimate is to have consensus. All other cases lead to forks of the original bitcoin and the decision of which one to follow lies with the participants, correct? If so, how can I make sure at any given time that I am on the original block chain? . . .
Use software that enforces the appropriate consensus.  If the software that you use to manage your bitcoin enforces all the "original" protocol rules of bitcoin, then it will not accept transactions or blocks from any software that doesn't enforce the same rules.  Therefore it will be impossible for you to acquire a different blockchain.

Ok, but, how is one supposed to know that his/her wallet software follows the rules unless he/she is a programmer and reads the code before compiling every new version?

Same as any other software.  For example how can you ensure TOR really keeps your activities anonymous and doesn't just pretend to and then broadcast everything in plain text directly to the destination?  How can you ensure your encryption tool is really using AES as it advertises and not some backdoored government code which can be trivially bypassed by the state?

In any (open source) project you can:
a) write the code yourself.
b) validate the existing code yourself.
c) pay someone to validate the code.
d) trust the community of people (consisting of a,b,c above) to sound the alarm if software is released which is flawed (either accidentally or maliciously).
alexeft
Legendary
*
Offline Offline

Activity: 784


View Profile
January 15, 2013, 03:18:08 PM
 #8

. . . Ok, so, the only way for a solved block to be recognized as legitimate is to have consensus. All other cases lead to forks of the original bitcoin and the decision of which one to follow lies with the participants, correct? If so, how can I make sure at any given time that I am on the original block chain? . . .
Use software that enforces the appropriate consensus.  If the software that you use to manage your bitcoin enforces all the "original" protocol rules of bitcoin, then it will not accept transactions or blocks from any software that doesn't enforce the same rules.  Therefore it will be impossible for you to acquire a different blockchain.

Ok, but, how is one supposed to know that his/her wallet software follows the rules unless he/she is a programmer and reads the code before compiling every new version?

Same as any other software.  For example how can you ensure TOR really keeps your activities anonymous and doesn't just pretend to and then broadcast everything in plain text directly to the destination?  How can you ensure your encryption tool is really using AES as it advertises and not some backdoored government code which can be trivially bypassed by the state?

In any (open source) project you can:
a) write the code yourself.
b) validate the existing code yourself.
c) pay someone to validate the code.
d) trust the community of people consisting of (a,b,c above) to sound the alarm if software is released which is flawed (either accidentally or maliciously).


I understand. The full responsibility of bitcoin lies with the community.

Edit: Also, the choice of wallet software is a very important one, not only to my own interest, but to the interest of the community as well.

Thanks again.
twolifeinexile
Full Member
***
Offline Offline

Activity: 154



View Profile
January 15, 2013, 04:00:42 PM
 #9

What if the community later found 21m is really not enough?

Quote

I understand. The full responsibility of bitcoin lies with the community.

Edit: Also, the choice of wallet software is a very important one, not only to my own interest, but to the interest of the community as well.

Thanks again.
DannyHamilton
Legendary
*
Offline Offline

Activity: 1988



View Profile
January 15, 2013, 04:24:39 PM
 #10

What if the community later found 21m is really not enough?
Well, first you have to realize that 1 BTC is really an abstraction.  It is a name created for 100,000,000 units.  So in reality the bitcoin system supports 2,100,000,000,000,000 (2.1 quadrillion) units (a unit commonly referred to as a "Satoshi").

It seems unlikely that 2.1 quadrillion won't be enough, but if the entire community agreed that more units were needed, the protocol could be changed and everyone could update to software that allowed the mining of additional units.

Note that the ENTIRE COMMUNITY would have to agree.  If any subset of the community chose not to switch to the new software that allows additional units, then the blockchain would split.  Those on the old blockchain would continue to call their system Bitcoin.  Those on the modified protocol could choose to also try to call their system Bitcoin (creating a lot of confusion for users of each system) or they could come up with a new name for their system and it would no longer be Bitcoin.

Gabi
Legendary
*
Offline Offline

Activity: 1078


If you want to walk on water, get out of the boat


View Profile
January 15, 2013, 04:57:55 PM
 #11

Quote
Ok, but, how is one supposed to know that his/her wallet software follows the rules unless he/she is a programmer and reads the code before compiling every new version?
In the same way you know that your operative system is not stealing your credit cards and banking data
RyNinDaCleM
Legendary
*
Offline Offline

Activity: 2282


Legen -wait for it- dary


View Profile
January 16, 2013, 04:55:41 AM
 #12


It seems unlikely that 2.1 quadrillion won't be enough, but if the entire community agreed that more units were needed, the protocol could be changed and everyone could update to software that allowed the mining of additional units.


Now, correct me if I'm wrong, but I understand that more decimal places would be added, and not more subsidy.

DannyHamilton
Legendary
*
Offline Offline

Activity: 1988



View Profile
January 16, 2013, 05:15:02 AM
 #13

It seems unlikely that 2.1 quadrillion won't be enough, but if the entire community agreed that more units were needed, the protocol could be changed and everyone could update to software that allowed the mining of additional units.
Now, correct me if I'm wrong, but I understand that more decimal places would be added, and not more subsidy.
Both have been suggested.  Your suggestion is more likely, but even that suggestion won't likely be implemented until/unless it becomes obvious to everyone that it is necessary.

RyNinDaCleM
Legendary
*
Offline Offline

Activity: 2282


Legen -wait for it- dary


View Profile
January 16, 2013, 05:20:20 AM
 #14

It seems unlikely that 2.1 quadrillion won't be enough, but if the entire community agreed that more units were needed, the protocol could be changed and everyone could update to software that allowed the mining of additional units.
Now, correct me if I'm wrong, but I understand that more decimal places would be added, and not more subsidy.
Both have been suggested.  Your suggestion is more likely, but even that suggestion won't likely be implemented until/unless it becomes obvious to everyone that it is necessary.

Of course! But neither is likely since 2.1quadrillion *should* be plenty.

hexed
Jr. Member
*
Offline Offline

Activity: 44


View Profile
January 17, 2013, 05:47:39 PM
 #15

From what I understand, as we go along block halving will continue to occur to the point where we will never see EVERY BTC capable of being made.  It's like dividing a number in half over and over.. you never get to 0.  You can get close but never there.  At some point, if the network is every THAT big that the payouts for processing fees will be a bigger payout than BTC rewarding.
DannyHamilton
Legendary
*
Offline Offline

Activity: 1988



View Profile
January 17, 2013, 06:44:09 PM
 #16

From what I understand, as we go along block halving will continue to occur to the point where we will never see EVERY BTC capable of being made.  It's like dividing a number in half over and over.. you never get to 0.  You can get close but never there.  At some point, if the network is every THAT big that the payouts for processing fees will be a bigger payout than BTC rewarding.
The protocol only works with integers, so once you get to 1 Satoshi (often seen by us humans as 0.00000001 BTC) for the block reward, the next halving makes it 0 (can't be 0.5, that's not an integer).

More specifically, the protocol doesn't use long division to "divide in half", it uses a technique called "right shift" where all the values of a binary number are shifted to the right one position, a zero is added to the left side to take the place of the digit shifted away from there, and the digit that is shifted off the right side is tossed out.  I can't help you much more than that if you don't understand binary, but if you do, the following might help:

1011 0101 = 181
shift all the digits to the right, hack off the 1 on the right and add a 0 to the left and you get . . .

0101 1010 = 90
notice that since we are using right-shift and integers, it truncates the decimal rather than rounding up
shift again and we get . . .

0010 1101 = 45
Keep going and the next few are:

0001 0110 = 22
0000 1011 = 11
0000 0101 = 5
0000 0010 = 2
The next shift gives us . . .

0000 0001 = 1
And I think you can see that when we shift one more time, the result will be 0 (not 0.5).

0000 0000 = 0

Here is the current (25 BTC) block reward as the protocol sees it:
1001 0101 0000 0010 1111 1001 0000 0000

Zebulon Pike
Jr. Member
*
Offline Offline

Activity: 32


View Profile
January 17, 2013, 08:43:48 PM
 #17

From what I understand, as we go along block halving will continue to occur to the point where we will never see EVERY BTC capable of being made.  It's like dividing a number in half over and over.. you never get to 0.  You can get close but never there.  At some point, if the network is every THAT big that the payouts for processing fees will be a bigger payout than BTC rewarding.
The protocol only works with integers, so once you get to 1 Satoshi (often seen by us humans as 0.00000001 BTC) for the block reward, the next halving makes it 0 (can't be 0.5, that's not an integer).

More specifically, the protocol doesn't use long division to "divide in half", it uses a technique called "right shift" where all the values of a binary number are shifted to the right one position, a zero is added to the left side to take the place of the digit shifted away from there, and the digit that is shifted off the right side is tossed out.  I can't help you much more than that if you don't understand binary, but if you do, the following might help:

1011 0101 = 181
shift all the digits to the right, hack off the 1 on the right and add a 0 to the left and you get . . .

0101 1010 = 90
notice that since we are using right-shift and integers, it truncates the decimal rather than rounding up
shift again and we get . . .

0010 1101 = 45
Keep going and the next few are:

0001 0110 = 22
0000 1011 = 11
0000 0101 = 5
0000 0010 = 2
The next shift gives us . . .

0000 0001 = 1
And I think you can see that when we shift one more time, the result will be 0 (not 0.5).

0000 0000 = 0

Here is the current (25 BTC) block reward as the protocol sees it:
1001 0101 0000 0010 1111 1001 0000 0000


I didn't know that, thanks a lot for explaining it so succinctly and clearly.  Really interesting the way that technique works.

employee at CBT Nuggets
DannyHamilton
Legendary
*
Offline Offline

Activity: 1988



View Profile
January 17, 2013, 10:06:38 PM
 #18

. . . I didn't know that, thanks a lot for explaining it so succinctly and clearly.  Really interesting the way that technique works.
You're welcome.  For those who are interested, the code that does this can be found here:

Code:
int64 static GetBlockValue(int nHeight, int64 nFees)
{
    int64 nSubsidy = 50 * COIN;

    // Subsidy is cut in half every 210000 blocks, which will occur approximately every 4 years
    nSubsidy >>= (nHeight / 210000);

    return nSubsidy + nFees;
}

The operation that performs the right shift is the ">>="
It takes the subsidy initially valued at (50 * COIN) and shifts it (nHeight/210000) times.

nHeight is the current block number.
nFees is the total of all the transaction fees for all the transactions in the block.
COIN is a defined constant defined here:

Code:
static const int64 COIN = 100000000;

Interesting that 100000000 is a defined constant (COIN), but 210000 is not.  Seems like that ought to be a defined constant as well.


DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
January 17, 2013, 10:47:24 PM
 #19

Make a pull.  I do know someone has been working to replace a lot of the literals with constants.

210,000, 2016, and 50 should likely all be constants.
DannyHamilton
Legendary
*
Offline Offline

Activity: 1988



View Profile
January 17, 2013, 10:51:46 PM
 #20

Make a pull . . .
Good idea. I haven't done that in a while.

Glad to hear that these literals are being replaced with constants.

Pages: [1] 2 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!