Bitcoin Forum
July 26, 2024, 12:18:31 PM *
News: Help 1Dq create 15th anniversary forum artwork.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: 21 million coins question (programming related)  (Read 475 times)
Watermellon (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
April 07, 2013, 06:29:25 AM
 #1

Is the 21 million coin limit hard coded into the program?

Or is it just a result of the reward halving every few years?

Could someone easily change the bitcoin source code to make an inflationary coin that has no
upper bound, and the reward never halves? Or would major changes have to be made to the source?

(I know an int64 can store a number as big as 18,446,744,073,709,551,615)
Oshero
Newbie
*
Offline Offline

Activity: 28
Merit: 0



View Profile
April 07, 2013, 06:31:18 AM
 #2

That's ppcoin you're describing.

Look it up. Cheesy
DannyHamilton
Legendary
*
Offline Offline

Activity: 3472
Merit: 4757



View Profile
April 07, 2013, 04:43:26 PM
 #3

Is the 21 million coin limit hard coded into the program?

Yes.

Or is it just a result of the reward halving every few years?

Yes.

Could someone easily change the bitcoin source code to make an inflationary coin that has no
upper bound, and the reward never halves?

Yes.

Or would major changes have to be made to the source?

No. (But you would have to take into consideration the possibility that an amount could be sent/stored/received that exceeded the number of bytes that the program uses to store it).

(I know an int64 can store a number as big as 18,446,744,073,709,551,615)

That would be uint64_t

int64_t can only store a number as big as 9,223,372,036,854,775,807

Seeing as the smallest integer unit of currency represented in the source code is the Satoshi, maximum bitcoin is a bit less than 2,100,000,000,000,000
kelly153
Full Member
***
Offline Offline

Activity: 157
Merit: 100


View Profile
April 07, 2013, 04:45:52 PM
 #4

Is the 21 million coin limit hard coded into the program?

Yes, it is hard. Very hard.
maxmint
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500



View Profile
April 07, 2013, 04:47:11 PM
 #5

I started a thread about this a while ago: https://bitcointalk.org/index.php?topic=153330.0

My PGP-Key: 462D02D8
Verify my messages using keybase: https://keybase.io/maxmint
whiskers75
Hero Member
*****
Offline Offline

Activity: 658
Merit: 502


Doesn't use these forums that often.


View Profile
April 07, 2013, 04:49:42 PM
 #6

Is the 21 million coin limit hard coded into the program?

Or is it just a result of the reward halving every few years?

Could someone easily change the bitcoin source code to make an inflationary coin that has no
upper bound, and the reward never halves? Or would major changes have to be made to the source?

(I know an int64 can store a number as big as 18,446,744,073,709,551,615)

*cough* Litecoin *cough* Cheesy

Elastic.pw Elastic - The Decentralized Supercomputer
ELASTIC ANNOUNCEMENT THREAD | ELASTIC SLACK | ELASTIC FORUM
Pages: [1]
  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!