Author

Topic: 21 million coins question (programming related) (Read 501 times)

hero member
Activity: 658
Merit: 502
Doesn't use these forums that often.
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
hero member
Activity: 700
Merit: 500
full member
Activity: 157
Merit: 100
Is the 21 million coin limit hard coded into the program?

Yes, it is hard. Very hard.
legendary
Activity: 3472
Merit: 4801
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
newbie
Activity: 28
Merit: 0
That's ppcoin you're describing.

Look it up. Cheesy
newbie
Activity: 12
Merit: 0
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)
Jump to: