Post
Topic
Board Bitcoin Discussion
Re: number of bitcoins
by
Heisenberg_Hunter
on 12/03/2020, 19:22:16 UTC
Just adding some more points to clear up the OP's questions

how can proof, in the future max number of bitcoins stay constant?
The number of bitcoins as others said were never hardcoded right from the initial satoshi code itself. But the max number of 21,000,000 was mentioned by satoshi in his metzdowd mail and the block subsidy would be halved into half every 4 years. From odolvlobo's code you can check out the halving code. This is how the code was written and the total subsidy would start from 50 and break down in half every 4 years or every 2016 blocks.

For in order to max bitcoins to stay constant at 21 million every miner should follow the Core client and they shouldn't deviate from the consensus rules. If they were to deviate it would cause a hard fork which would be obviously rejected by miner's clients.

how can proof, by change bitcoin algorithm max number of bitcoins stay constant?
If you change the algorithm and come up with your own supply they are a fork of bitcoin and the miner clients would eventually reject the transaction which is trying to spend from a forked blockchain.

...snip...
The MAX_MONEY variable is a checker so that it prevents people from doing a transaction which not more than 21 million. The MAX_MONEY was never present in the initial satoshi code and was introduced after the overflow bug which caused 184 billion bitcoin to be sent to three different addresses. More about the incident here : Strange block 74638 and overflow bug SERIOUS

I wonder if Op is trying to know whether the supply can't be alter without consensus, or if we can actually verify that extra Bitcoin hasn't been printed in some ways that is unknown to developers/community.
As I have said above, there was an overflow bug where a particular block #74638 had mined a transaction which had 184 billion bitcoin transacted between addresses. Each node verifies the transaction for integrity before they are being pushed to the mempool and added to the block. Here during this incident, the code used to check the transaction didn't check for the outputs. Read the second topic which I have posted above.

satoshi came up with the patch to fix the issue immediately on the same day : Version 0.3.10 - block 74638 overflow PATCH!