Difficulty adjustment
In plain words
Every 2,016 blocks (about two weeks) Bitcoin makes mining harder or easier so that a block still arrives about every ten minutes on average.
Short definition
How hard it is to find a block; adjusts every 2,016 blocks to keep ~10-minute blocks.
The rule
At each multiple of 2,016 blocks every node compares how long the last period took with the intended two weeks (2,016 × 10 minutes) and scales the target accordingly. The change is clamped to a factor of four in either direction.
If hashrate grows, blocks come faster and the next adjustment raises difficulty; if miners switch off (as after China's 2021 mining ban), blocks slow down until difficulty drops. This feedback loop keeps the issuance schedule predictable.
See also
- HashrateHashrate is how many guesses per second all Bitcoin miners make together. More hashrate means more energy protecting the network.
- MiningMining is the work that adds new blocks to Bitcoin. Miners run special computers (ASICs) that guess numbers; the winner of each round earns the block subsidy and the fees.
- BlockA block is a batch of Bitcoin transactions added to the chain about every ten minutes. The miner who finds it collects the new coins and the fees.
- HalvingEvery 210,000 blocks, roughly every four years, the number of new bitcoins paid to miners per block is cut in half. This is how Bitcoin's supply is capped at 21 million.
References
- Bitcoin Core source: pow.cpp github.com
- Bitcoin Wiki: Difficulty en.bitcoin.it