> ## Content Index
> Fetch the complete content index at: https://cnainbridge.org/llms.txt
> Use this file to discover other available public pages before exploring further.

# Bitcoin's supply limit: how nodes enforce 21 million
- URL: https://cnainbridge.org/bitcoin-supply-validation/
- Published: 2026-11-26T10:31:19.000Z
- Updated: 2026-11-26T14:30:50.000Z
- Description: Bitcoin's cap follows from block-by-block validation. Separate the subsidy schedule, MAX_MONEY and current UTXO total before interpreting a supply figure.
- Author: Colin Hensley
- Tags: Bitcoin nodes, #troubleshooting

Bitcoin's supply limit is enforced by nodes checking each block's transactions and coinbase reward against the consensus rules. A miner can't create extra accepted bitcoin by finding a valid proof of work: the coinbase may claim only the block subsidy plus its transaction fees. Integer rounding makes the full potential subsidy schedule slightly less than 21 million BTC, and the amount people can still spend is a separate question.

I start with the validation rule when checking a supply claim. A counter labeled “circulating supply” can describe scheduled issuance without measuring accessible funds. The useful question is which quantity the counter actually calculates.

## Follow the checks that prevent extra issuance

Every ordinary transaction spends existing outputs. Bitcoin Core checks that its inputs are available and unspent, rejects duplicate inputs, and checks the permitted amount ranges. The output total can't exceed the input total. The difference becomes the transaction fee, so fees transfer existing value instead of creating new bitcoin.

The coinbase is the special first transaction in a block. It creates outputs without spending ordinary previous outputs, but its permitted amount has a separate limit. In [Core's block validation code](https://github.com/bitcoin/bitcoin/blob/v32.1/src/validation.cpp?ref=cnainbridge.org), that limit is `nFees + GetBlockSubsidy(height)`. If the coinbase output total exceeds it, Core rejects the block with `bad-cb-amount`.

The subsidy is the new issuance allowance. Fees are the already existing value left by the block's ordinary transactions. Adding those fees to the permitted coinbase payout doesn't increase the subsidy. A miner may claim less than the permitted reward; the rule is an upper bound, not a requirement to collect every satoshi.

These checks work together. Checking the coinbase alone wouldn't establish that the ordinary transactions conserved value. Core's [input and fee checks](https://github.com/bitcoin/bitcoin/blob/v32.1/src/consensus/tx%5Fverify.cpp?ref=cnainbridge.org) supply that part of the calculation, alongside its [transaction amount and duplicate-input checks](https://github.com/bitcoin/bitcoin/blob/v32.1/src/consensus/tx%5Fcheck.cpp?ref=cnainbridge.org).

## Check the one-satoshi boundary in Core's published tests

Core's [block-validation functional test](https://github.com/bitcoin/bitcoin/blob/v32.1/test/functional/feature%5Fblock.py?ref=cnainbridge.org) contains a useful paired check. It builds blocks whose coinbase claims an extra 10 satoshis, then changes the actual transaction fee. The outcome depends on the real fee, down to a single satoshi.

| Published test case                                     | Expected result               | Rule demonstrated                                                   |
| ------------------------------------------------------- | ----------------------------- | ------------------------------------------------------------------- |
| Extra coinbase payout of 10 sats; actual fee of 9 sats  | Reject with bad-cb-amount.    | The miner claims 1 satoshi more than the subsidy plus fees permits. |
| Extra coinbase payout of 10 sats; actual fee of 10 sats | Accept the constructed block. | The extra payout is funded by an existing transaction's fee.        |
| A longer candidate chain includes an excessive coinbase | Reject the invalid chain.     | More blocks don't waive the monetary checks.                        |

Those are assertions in Core's published test, using its controlled test-chain setup. Its block builder solves proof of work too. The comparison shows the decisive distinction: proof of work and transaction validity are both required. A solved block that pays too much remains invalid to a node enforcing these rules.

## Calculate the schedule in whole satoshis

Bitcoin Core represents amounts in satoshis, with 100,000,000 satoshis per BTC. The mainnet subsidy starts at 50 BTC and halves every 210,000 blocks. [Mainnet's chain parameters](https://github.com/bitcoin/bitcoin/blob/v32.1/src/kernel/chainparams.cpp?ref=cnainbridge.org) define the interval; `GetBlockSubsidy` divides the block height by that interval and right-shifts the initial integer subsidy.

For a nonnegative height, the mainnet calculation is `5,000,000,000 >> floor(height / 210,000)` satoshis, with an explicit zero return at 64 or more halvings. Right-shifting a positive integer discards fractions. Repeatedly halving a decimal BTC value without rounding to whole satoshis gives the wrong final subsidy.

| Mainnet block heights       | Subsidy per block | Interpretation                                                                            |
| --------------------------- | ----------------- | ----------------------------------------------------------------------------------------- |
| 0 through 209,999           | 50 BTC            | The schedule includes the genesis height; its output has a separate spending restriction. |
| 840,000 through 1,049,999   | 3.125 BTC         | A height-defined subsidy, excluding fees.                                                 |
| 6,720,000 through 6,929,999 | 1 satoshi         | The final positive subsidy interval.                                                      |
| 6,930,000 onward            | 0                 | No new subsidy; a coinbase can still claim available transaction fees.                    |

Summing each whole-satoshi subsidy across its interval gives **20,999,999.9769 BTC**, including the genesis subsidy. That's 0.0231 BTC below 21 million because of integer rounding. This is a calculation of the full potential schedule, not today's issued amount or a promise that every allowance becomes spendable.

The calculation agrees with [Core's subsidy-limit unit-test assertion](https://github.com/bitcoin/bitcoin/blob/v32.1/src/test/validation%5Ftests.cpp?ref=cnainbridge.org) of 2,099,999,997,690,000 satoshis. The integer subsidy already reaches zero after 33 halvings. The later 64-halving guard prevents an undefined right shift; it doesn't mean positive rewards continue that long.

“Around 2140” is a calendar estimate for the end of subsidy, not a programmed appointment. Block height controls the transition. Once the subsidy is zero, fees remain an allowed source of miner revenue, but the amount of future fees and the resulting mining economics aren't fixed by this arithmetic.

## Separate MAX\_MONEY, scheduled issuance and UTXO value

`MAX_MONEY` is exactly `21,000,000 * COIN`, and `MoneyRange` checks amounts against the permitted range. The comment in [Core's amount definitions](https://github.com/bitcoin/bitcoin/blob/v32.1/src/consensus/amount.h?ref=cnainbridge.org) explicitly says that this consensus-critical sanity check isn't the total money supply. It's also not a counter that increments until issuance stops.

The issuance bound follows from the subsidy schedule together with transaction and block validation. Raising a range constant in one copy of the software doesn't make other nodes accept an excessive coinbase. A node continuing to enforce the existing reward rule still rejects that block.

The current unspent transaction output set, or UTXO set, answers another question: how much value is recorded in outputs that haven't been spent and remain in that set. Its amount differs from the potential schedule. The genesis block's 50 BTC output never enters the normal spendable UTXO view. Core's [coin statistics accounting](https://github.com/bitcoin/bitcoin/blob/v32.1/src/index/coinstatsindex.cpp?ref=cnainbridge.org) also tracks historical duplicate-coinbase exclusions, provably unspendable scripts and unclaimed block rewards.

Lost private keys usually leave no equivalent on-chain marker. An output can remain in the UTXO set even if nobody can produce its spending authorization. UTXO membership also doesn't waive the maturity rule for coinbase outputs. Long inactivity doesn't establish that the key is lost, so subtracting an estimated lost-coin figure produces an estimate with different assumptions, not a consensus total.

## Read a local UTXO total with its block reference

If you already run a trusted local node, inspect its own method help before querying. The [node setup guide](https://cnainbridge.org/run-bitcoin-node/) covers the connection prerequisite. In the GUI Console, enter `help gettxoutsetinfo`; at the command line, use:

```
bitcoin-cli help gettxoutsetinfo
```

![Bitcoin Core Console with help gettxoutsetinfo in the input line and an empty output area](https://storage.ghost.io/c/a1/4d/a14da2a0-3ee7-4807-afb1-3b1f503a3916/content/images/2026/11/chain-bridge-bitcoin-supply-validation-inline.webp)

The Console input shows `help gettxoutsetinfo` before execution. Read the local help before requesting statistics. Select Enlarge image to read the details.

[gettxoutsetinfo](https://bitcoincore.org/en/doc/32.0.0/rpc/blockchain/gettxoutsetinfo/?ref=cnainbridge.org) returns UTXO statistics, including `total_amount`, `height` and `bestblock`. A plain `bitcoin-cli gettxoutsetinfo` requests statistics at the node's current best block. The call can take time without `coinstatsindex`; allow it to finish instead of repeatedly launching the same work.

Keep the amount together with its returned height and block hash. They identify the chain state being measured. Compare figures at the same block and check each source's methodology. For example, [Blockchain.com's circulating-supply chart](https://www.blockchain.com/explorer/charts/total-bitcoins?ref=cnainbridge.org) says it calculates from the theoretical protocol reward, which is a different basis from summing the current UTXO set.

Querying a specific historical hash or height requires `coinstatsindex`. Core also rejects that historical request with the default `hash_serialized_3` hash type or with `use_index=false`. The [current RPC implementation](https://github.com/bitcoin/bitcoin/blob/v32.1/src/rpc/blockchain.cpp?ref=cnainbridge.org) checks those combinations. For an occasional current-total check, there's no need to add an index or rebuild node data just to follow this explanation.

I would report the returned field as “UTXO value at this block,” with the block reference attached. That preserves the quantity you actually queried. It doesn't establish how many keys still exist, how many coins are available for sale or how much bitcoin people can recover.

## Judge a proposed supply change by the rules your node runs

A modified implementation can propose different monetary rules. Existing nodes don't adopt those rules merely because someone publishes code or mines a chain under them. Accepting a reward that the existing consensus rules reject requires changing validation behavior; a headcount of nodes isn't an automatic protocol vote that overrides the rejection.

When checking a supply figure, first identify whether it means the potential schedule, a theoretical issued-to-date calculation or the UTXO amount at a named block. Then check the corresponding calculation or field. The [node guides hub](https://cnainbridge.org/tag/nodes/) provides the surrounding setup and inspection tasks if you want to examine your own validated chain state.