Mining difficulty sets how hard it is to produce a proof-of-work-valid block. Miners search for a block digest below a required threshold; greater computing power improves their chances. section 12.2.3
Difficulty matters for two practical reasons:
- It prevents blocks from being found so easily that many miners publish competing valid blocks at once, creating forks. section 12.2.3
- It adjusts with network conditions: if blocks arrive too quickly or too slowly, the algorithm raises or lowers the proof-of-work difficulty. section 12.2.3
- In a simplified explanation, higher difficulty means finding a digest with more leading zeros. section 12.2.3
A small threshold change
If a valid digest must begin with one zero byte, a miner is expected to try about 2^8 candidates. Requiring two zero bytes raises the expectation to about 2^16. Bitcoin adjusts difficulty toward a block every ten minutes. section 12.2.3
Figure 12.6 A fork in the blockchain: two miners publish a valid block at height 3 (meaning 3 blocks after genesis). Later, another miner mines a block at height 4 that points to the second block at height 3. As the second fork is now longer, it is the valid fork that miners should continue to extend. Note that arrows coming out of a block point to the parent block (the block they extend).
A fork diagram shows why controlling block-production difficulty matters and how accumulated work helps the network continue on one chain. section 12.2.3
