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
- Bitcoin hashrateHashrate is how many guesses per second all Bitcoin miners make together. More hashrate means more energy protecting the network.
- Bitcoin miningBitcoin mining is finding a valid Proof of work for the next block. Miners who succeed earn the block subsidy (currently 3.125 BTC per block in this Halving era) plus transaction fees. Difficulty retargets every 2,016 blocks so blocks stay about ten minutes apart; live hashrate and difficulty are in the infobox and on [[/mining-power|mining power]].
- 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