15 August 2010: 184 billion bitcoin
Block 74,638 contained a transaction with two outputs of 92,233,720,368.54 BTC each. The sum was so large it caused an integer overflow: the software's check that outputs do not exceed inputs was fooled. Roughly 184 billion coins appeared out of nothing. The flaw is catalogued as CVE-2010-5139.
The fix
Users noticed within hours ("Strange block 74638" on BitcoinTalk). A patched version, 0.3.10, made such transactions invalid. Miners switched, a new chain overtook the bad one, and the block was orphaned. The invented coins vanished with it.
11 March 2013: an accidental fork
Version 0.8 replaced its database. Older versions hit a hidden database-lock limit and rejected block 225,430, which 0.8 accepted – a chain split. Per the BIP 50 post-mortem, the pools BTC Guild and Slush downgraded to 0.7, "despite the fact that this caused them to sacrifice significant amounts of money", and the network reunited. One test double-spend occurred; it was not malicious.
What we learned
- Bugs are found because thousands of people check the chain.
- Consensus code must be changed with extreme care – a lesson behind Bitcoin's cautious development today.
- The supply rule survived its worst test.