Bitcoin Forum
October 21, 2017, 09:52:55 PM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: « 1 [2]  All
  Print  
Author Topic: how many bitcoins will there be ?  (Read 1581 times)
shorena
Legendary
*
Offline Offline

Activity: 1386


ALL escrow is signed! https://keybase.io/verify


View Profile WWW
September 02, 2014, 09:25:33 AM
 #21

The total amount of bitcoin is hardcoded to be less than 21 million BTC . . .

FTFY
-snip-

I was wondering when you would show up to correct all those wrong answers Wink

to "defend" my own post:

Quote
The total amount of bitcoin is hardcoded to be 21 million BTC at max.

The hardcoded limit is defined [1] as exactly 21 million in MAX_MONEY. While -due to the nature of the halfing- this might never be reached, its still the limit. Thus my wording of "almost" 21 million in the next sentence.


[1] https://github.com/bitcoin/bitcoin/blob/2e731f24b5a5c894e013a6d752f1cd409303e916/src/core.h#L21

1508622775
Hero Member
*
Offline Offline

Posts: 1508622775

View Profile Personal Message (Offline)

Ignore
1508622775
Reply with quote  #2

1508622775
Report to moderator
1508622775
Hero Member
*
Offline Offline

Posts: 1508622775

View Profile Personal Message (Offline)

Ignore
1508622775
Reply with quote  #2

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

Posts: 1508622775

View Profile Personal Message (Offline)

Ignore
1508622775
Reply with quote  #2

1508622775
Report to moderator
DannyHamilton
Legendary
*
Offline Offline

Activity: 1946



View Profile
September 02, 2014, 10:49:35 AM
 #22

The total amount of bitcoin is hardcoded to be less than 21 million BTC . . .

FTFY
-snip-

I was wondering when you would show up to correct all those wrong answers Wink

Just having some fun.  Only a few of the answers were truly wrong, such as "it would be up to the miners to prevent the new fork from developing" and "how many there are still out there to be mined I am not sure a solid answer can be given on that".

20999999.9769 is so close to 21 million, that I don't really consider it to be "wrong", although I do find it a bit annoying when people say "exactly 21 million".  Better answers are:

  • nearly 21 million
  • almost 21 million
  • approximately 21 million
  • less than 21 million
  • no more than 21 million
  • practically 21 million
  • etc.

to "defend" my own post:

Quote
The total amount of bitcoin is hardcoded to be 21 million BTC at max.

The hardcoded limit is defined [1] as exactly 21 million in MAX_MONEY.

Touché!

MAX_MONEY is defined as:
21000000 * COIN

and COIN is defined as:
100000000

This isn't used to determine how much will be created, but rather to check to see if any errors have occurred (if a transaction or a fee is larger than MAX_MONEY, then it can't possibly be valid). Given the hardcoded validation routine, your answer is correct.

While -due to the nature of the halfing- this might never be reached, its still the limit. Thus my wording of "almost" 21 million in the next sentence.

It seems odd to say something "is the limit" if it is higher than the maximum possible value.  It's a bit like saying that the limit of human lifespan is 10,000 years, just because I define MAX_LIFESPAN as 10,000 in some program.  And then saying:

"While -due the nature of actual human life- this might never be reached, it is still the limit."


Jamie_Boulder
Sr. Member
****
Offline Offline

Activity: 378


View Profile WWW
September 02, 2014, 12:29:44 PM
 #23

21m is the limit, weather we ever get there is a completely different story.

shorena
Legendary
*
Offline Offline

Activity: 1386


ALL escrow is signed! https://keybase.io/verify


View Profile WWW
September 02, 2014, 02:16:39 PM
 #24

-snip-
While -due to the nature of the halfing- this might never be reached, its still the limit. Thus my wording of "almost" 21 million in the next sentence.

It seems odd to say something "is the limit" if it is higher than the maximum possible value.  It's a bit like saying that the limit of human lifespan is 10,000 years, just because I define MAX_LIFESPAN as 10,000 in some program.  And then saying:

"While -due the nature of actual human life- this might never be reached, it is still the limit."


On the other hand the limit set by MAX_MONEY is very close to what will be available in circulation while 10,000 is far from 123 years or 130 years. I also think its fine to say there will be almost (see your own list for more) 21 million coins.

Also wouldnt it be possible to increase the precision which determines how much bitcoin (or rather satoshi in the future) will be generated.  E.g. use 128, 256, 512, etc. bit integer instead of 64 bit integer. So instead of setting the reward to zero [1] it would be fractions of a satoshi... while AFAIK we still wouldnt reach 21 million coins in finite time the difference would be infinitesimal small. I think it would require a fork though, as "old" clients wouldn know how to handle .1 satoshi.


[1] https://github.com/bitcoin/bitcoin/blob/93f97aab629d6d3b7e2c296b24fc37eef9502cd1/src/main.cpp#L1159

Wusolini
Legendary
*
Offline Offline

Activity: 1064

Ruler of the planet Bitcoin Persei 8


View Profile
September 02, 2014, 02:36:07 PM
 #25

there shall be 21 000 000 bitcoins it total but will be less due to lost passwords etc. and last bitcoin will be mined around 2140

BUY HW WALLET    |  WALLET with DAILY INTEREST     | BUY BTC using CREDITCARD   |  FREEBITco.in FAUCET (60% RCB)   |  AD PLATFORMs  Bitmedia - Mellowads  &  Adbit  |   PLAY BOMBERMAN & WIN BTC  | FREE BITCOIN LOTTO   |     PLAY GAMES & EARN BITCOINS at BITFUN
DannyHamilton
Legendary
*
Offline Offline

Activity: 1946



View Profile
September 02, 2014, 03:08:24 PM
 #26

On the other hand the limit set by MAX_MONEY is very close to what will be available in circulation while 10,000 is far from 123 years or 130 years.

Well, remember that MAX_MONEY is NOT defined as 21000000.
It is defined as 21000000 * COIN

Since COIN is defined as 100000000, that makes MAX_MONEY = 2100000000000000.

The actual number of integer units that will be created is less than 2099999997690000.

This means that MAX_MONEY is off by 2310000 (2.31 million!).

I also think its fine to say there will be almost (see your own list for more) 21 million coins.

On this we agree.

Also wouldnt it be possible to increase the precision which determines how much bitcoin (or rather satoshi in the future) will be generated.  E.g. use 128, 256, 512, etc. bit integer instead of 64 bit integer. So instead of setting the reward to zero [1] it would be fractions of a satoshi... while AFAIK we still wouldnt reach 21 million coins in finite time the difference would be infinitesimal small. I think it would require a fork though, as "old" clients wouldn know how to handle .1 satoshi.

This would be a forking change.  Not only would "old" clients not know how to handle 0.1 satoshi, but to end up with a different total, you'd have to change the defined value of COIN or in some other way alter the size of nSubsidy.  All of the block rewards would have to become a larger number of integer units and you'd have to interpret transactions in the blockchain differently depending on whether they occurred before or after the block where the new definition was first accepted.

Having a larger integer type while still storing the exact same integer in it wouldn't change the total amount of bitcoins created.

shorena
Legendary
*
Offline Offline

Activity: 1386


ALL escrow is signed! https://keybase.io/verify


View Profile WWW
September 02, 2014, 07:23:42 PM
 #27

On the other hand the limit set by MAX_MONEY is very close to what will be available in circulation while 10,000 is far from 123 years or 130 years.

Well, remember that MAX_MONEY is NOT defined as 21000000.
It is defined as 21000000 * COIN

Since COIN is defined as 100000000, that makes MAX_MONEY = 2100000000000000.

The actual number of integer units that will be created is less than 2099999997690000.

This means that MAX_MONEY is off by 2310000 (2.31 million!).

Apparently I didnt think this through, ofc with Satoshi in mind the difference is huge.

-snip-
This would be a forking change.  Not only would "old" clients not know how to handle 0.1 satoshi, but to end up with a different total, you'd have to change the defined value of COIN or in some other way alter the size of nSubsidy.  All of the block rewards would have to become a larger number of integer units and you'd have to interpret transactions in the blockchain differently depending on whether they occurred before or after the block where the new definition was first accepted.

Having a larger integer type while still storing the exact same integer in it wouldn't change the total amount of bitcoins created.

Well a larger type alone would result in plenty wasted (disk/blockchain/memory) space Wink Without a complete restart (and thus the creation of an altcoin) this would certainly result in a very messy protocol. It sounds like the kind of change where you make a little mistake and someone exploits it to actually double the amount of bitcoin is his/her wallet.

Somewhat related: I just found BIP42 [1] and the pull request [2] for it. Love it.

Quote
Although it is widely believed that Satoshi was an inflation-hating goldbug he never said this, and in fact programmed Bitcoin's money supply to grow indefinitely, forever. He modeled the monetary supply as 4 gold mines being discovered per mibillenium (1024 years), with equal intervals between them, each one being depleted over the course of 140 years.

Quote
aceat64 commented on 2 Apr
This is clearly a bug and one serious enough that I believe if we do not fix it in a timely manner it could destroy confidence in the Bitcoin network.

gmaxwell commented on 2 Apr
Timely manner? ... Well I'm absolutely confident that it will be fixed sometime in the hundreds of years required before it matters.

aceat64 commented on 2 Apr
The longer we delay, the more likely it is that a miner alive today could live until this bug occurs. This gives them a greater incentive to not implement the fix. This is particularly true for any toddlers or infants in charge of sizeable farms.

[1] https://github.com/bitcoin/bips/blob/master/bip-0042.mediawiki
[2] https://github.com/bitcoin/bitcoin/pull/3842

PublicKey
Newbie
*
Offline Offline

Activity: 3


View Profile
September 02, 2014, 08:00:22 PM
 #28

there shall be 21 000 000 bitcoins it total but will be less due to lost passwords etc. and last bitcoin will be mined around 2140

around 1% is lost 4ever :ooooo
BurtW
Legendary
*
Offline Offline

Activity: 2058

All paid signature campaigns should be banned.


View Profile WWW
September 02, 2014, 09:14:18 PM
 #29

there shall be 21 000 000 bitcoins it total but will be less due to lost passwords etc. and last bitcoin will be mined around 2140

around 1% is lost 4ever :ooooo
How do you know this?  Where did you get this number?  Do you have a reference?

Our family was terrorized by Homeland Security.  Read all about it here:  http://www.jmwagner.com/ and http://www.burtw.com/  Any donations to help us recover from the $300,000 in legal fees and forced donations to the Federal Asset Forfeiture slush fund are greatly appreciated!
minerpumpkin
Hero Member
*****
Offline Offline

Activity: 672


A pumpkin mines 27 hours a night


View Profile
September 02, 2014, 09:19:33 PM
 #30

Interstingly, wasn't there a flaw discovered earlier this year that would cause the number of Bitcoins being created with each block to re-start at 50 BTC after all 21 million coins were put into circulation or something?

██████████████████████████████████████████████
██████████████████████████████████████████████
█████                                    █████
█████                                    █████
█████                                    █████
█████           ▄█▄        ▄█▄           █████
█████          ████████████████          █████
█████           ▀████████████▀           █████
█████           ████▀    ▀████           █████
█████           ████▄    ▄████           █████
█████           ▄████████████▄           █████
█████          ████████████████          █████
█████           ▀█▀        ▀█▀           █████
█████                                    █████
█████                                    █████
█████                                    █████
██████████████████████████████████████████████
██████████████████████████████████████████████
▄██████████████████████████▄
██                        ██
██                        ██
██                        ██
██             ▄█▀███████████
██              ▀▀▀▀▀▀▀▀▀▀██▀
██                        ██
██                        ██
██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██
 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

▄██████████████████████████▄
██                        ██
██                        ██
██                        ██
██                        ██
████████████████████████████
██                        ██
██                        ██
██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██
 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▄██████████████████████████▄
██                 ▄███▀  ██
██             ▄▄██▀▀  ▄█ ██
██     ▄    ▄███▀▀  ▄███  ██
██    ██▄▄██▀▀   ▄█████   ██
██   ████▀▀  ▄▄██▀▀ ▀█    ██
██  █▀▀   ▄▄██▀           ██
██    ▄▄███▀              ██
██▄▄▄████▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██
 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

▄██████████████████████████▄
██                        ██
██  ████▄  ▄▄▄▄▄▄▄▄▄▄▄▄   ██
██     ▀█▄ ▀▀▀▀▀▀▀▀▀██    ██
██      ██         ██     ██
██       ███████████      ██
██        ▄▄     ▄▄       ██
██       ▀██▀   ▀██▀      ██
██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██
 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▄██████████████████████████▄
██                       ▄██
██                     █████
██         ▄         ███▀ ██
██       ▄███     ▄███▀   ██
██   ▄▄███▀▀███▄████▀     ██
██▄▄███▀     ▀███▀        ██
████▀                     ██
██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██
 ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

▄███████████▄  ██████████████
█           █  █            █
█           █  █            █
█           █  █            █
█           █  █            █
█           █  █            █
█           █  █            █
█           █  █            █
██████▀██████  ██████▀███████
 ▀▀▀▀▀▀▀▀▀▀▀   ▀▀▀▀▀▀▀▀▀▀▀▀▀▀
BurtW
Legendary
*
Offline Offline

Activity: 2058

All paid signature campaigns should be banned.


View Profile WWW
September 02, 2014, 09:41:22 PM
 #31

Too bad no one here will be around to see it happen.

Our family was terrorized by Homeland Security.  Read all about it here:  http://www.jmwagner.com/ and http://www.burtw.com/  Any donations to help us recover from the $300,000 in legal fees and forced donations to the Federal Asset Forfeiture slush fund are greatly appreciated!
DannyHamilton
Legendary
*
Offline Offline

Activity: 1946



View Profile
September 02, 2014, 09:47:14 PM
 #32

Interstingly, wasn't there a flaw discovered earlier this year that would cause the number of Bitcoins being created with each block to re-start at 50 BTC after all 21 million coins were put into circulation or something?

I think it was expected that it *could* reset after 256 years. 

If I understand the problem correctly, the actual behavior is undefined and left up to the hardware to handle.  The idea was that 250 years from now, a hardware manufacturer could take advantage of the problem to fork the network or cause other problems.

Regardless, the issue was resolved.  If you are still here 250 years from now, you won't have to worry about it.

bitsmichel
Sr. Member
****
Offline Offline

Activity: 434



View Profile
September 02, 2014, 09:48:40 PM
 #33

there shall be 21 000 000 bitcoins it total but will be less due to lost passwords etc. and last bitcoin will be mined around 2140

around 1% is lost 4ever :ooooo
Lost coins can be seen as profit for all other bitcoiners because the bitcoins in circulation will be more scarce.
BurtW
Legendary
*
Offline Offline

Activity: 2058

All paid signature campaigns should be banned.


View Profile WWW
September 02, 2014, 09:56:53 PM
 #34

there shall be 21 000 000 bitcoins it total but will be less due to lost passwords etc. and last bitcoin will be mined around 2140

around 1% is lost 4ever :ooooo
Lost coins can be seen as profit for all other bitcoiners because the bitcoins in circulation will be more scarce.
True, but where did the 1% number come from?  Out of PublicKey's ass?

Our family was terrorized by Homeland Security.  Read all about it here:  http://www.jmwagner.com/ and http://www.burtw.com/  Any donations to help us recover from the $300,000 in legal fees and forced donations to the Federal Asset Forfeiture slush fund are greatly appreciated!
shorena
Legendary
*
Offline Offline

Activity: 1386


ALL escrow is signed! https://keybase.io/verify


View Profile WWW
September 02, 2014, 09:58:55 PM
 #35

there shall be 21 000 000 bitcoins it total but will be less due to lost passwords etc. and last bitcoin will be mined around 2140

around 1% is lost 4ever :ooooo
How do you know this?  Where did you get this number?  Do you have a reference?

Well, technically the bitcoins are not gone, its just that noone can spend them.

Anyway there was a post about it[1] by DeathAndTaxes not so long ago. Those estimates are nowhere near 1%

Interstingly, wasn't there a flaw discovered earlier this year that would cause the number of Bitcoins being created with each block to re-start at 50 BTC after all 21 million coins were put into circulation or something?

Yep, fixed though.

-snip-
Somewhat related: I just found BIP42 [1] and the pull request [2] for it. Love it.

-snip-

[1] https://github.com/bitcoin/bips/blob/master/bip-0042.mediawiki
[2] https://github.com/bitcoin/bitcoin/pull/3842

there shall be 21 000 000 bitcoins it total but will be less due to lost passwords etc. and last bitcoin will be mined around 2140

around 1% is lost 4ever :ooooo
Lost coins can be seen as profit for all other bitcoiners because the bitcoins in circulation will be more scarce.
True, but where did the 1% number come from?  Out of PublicKey's ass?

IMHO (see above why), yes! People tend to pull percentages out of their behinds all the time.


[1] https://bitcointalk.org/index.php?topic=675321.0

Nagato4
Hero Member
*****
Offline Offline

Activity: 627



View Profile
September 03, 2014, 12:31:18 AM
 #36

there shall be 21 000 000 bitcoins it total but will be less due to lost passwords etc. and last bitcoin will be mined around 2140

around 1% is lost 4ever :ooooo
How do you know this?  Where did you get this number?  Do you have a reference?

Well, technically the bitcoins are not gone, its just that noone can spend them.

Anyway there was a post about it[1] by DeathAndTaxes not so long ago. Those estimates are nowhere near 1%

True.
The estimate made by D&T (~2745 btc) is the number of bitcoin that can never be redeemed.

On the other hand, when we use the word "gone", we usually include the coin burnt for altcoin, coin lost due to losing the wallet file or long passphrase, etc. Some even consider satoshi's bitcoin "gone", believing that he will never come back to spend it.

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!