"The Secret History of Bitcoin": What exactly happened to the bitcoin hard fork panic?

Source: Hash Pie

Author: LucyCheng

As the longest chain recognized by the entire network, the upgrade of the Bitcoin consensus version has always been done through a soft fork, except for two accidents (2013 and 2015, which lasted 24 and 6 districts, respectively). Piece). Today, the Hash faction is talking about the 0.8.0 version that caused short-term panic in the community.

Original image from: icokanban

At 23:30 GMT on the evening of March 11, 2013, netizen "thermoman" stated on the bitcoin-dev IRC channel that someone found that block 225431 had been dug out in their own host, but most of them, including blockexploere The latest block height displayed by the block data website is still 225430.

In the next thirty minutes, more users found weird reports in their own Bitcoin client logs; discussions about the block height data asynchrony from all parties went viral on the IRC channel. "I have already mined the 225439 block here, but other sources are still at the block height of 225431. I want to know if something triggered it, a major reorganization or the like", Bitcoin Developer Peter Wuille said.

Message from netester amesterdamer on the Bitcointalk forum on July 20, 2014

And as Peter Wuille speculated, Bitcoinqt 0.8.0 released 20 days ago was incompatible with earlier versions, which led to the accident. It is reported that in order to reduce the synchronization time of the blockchain, this version switched its database from Berkely DB to the more efficient Level DB. What the developers didn't realize was that this operation unexpectedly changed the rules of the Bitcoin protocol.

Specifically, in the process of updating the database, a portion of the database storing a specific information item must be "locked" to prevent two simultaneous changes from happening to destroy the database mechanism. The Berkeley DB data structure used to store objects requires two locks for each update, and requires the user to set a limit on the number of locks. For Bitcoin, this value is 10,000. The problem lies here, because Level DB does not have this limitation, so when there are more than 5000 transaction transactions on block 225430, the new version of the client accepts it, but the old version cannot. The incompatibility of the two made Bitcoin split into two different chains at the time.

Changes in Bitcoin consensus rules (Source: BitMEX Research, Github)

The sudden hard fork caused a panic in the market. The price of Bitcoin dropped 24% in a short time. There was even a double-spend transaction worth $ 10,000 on OKPay. However, the situation lasted for about six hours and was reversed by community solidarity. Realizing that the situation was not good at that time, almost all major Bitcoin developers and mining pool operators immediately joined the Bitcoin Development IRC channel for discussions; the latter supported the initiative to stop mining by 0.8.0 clients, and the former was mostly large companies The deposit business was closed immediately. With the active cooperation of all relevant personnel, the blockchain supporting the 0.7.0 version was finally caught up at 06:19 on the 12th, and the two chains converged at a block height of 225454. At this point, the new chain that generated the large block was declared invalid, and miners using the new version of the client have returned to version 0.7.0 to continue mining.

For the bitcoin crisis, which only lost 24 block of bitcoin rewards and a double-spend transaction worth $ 10,000, the outside world has given a lot of positive comments, while applauding the unconditional cooperation of all members of the community and the speed of solving the problem . But on the other hand, some people feel that this operation is in a sense a blasphemy of the concept of Bitcoin decentralization, and calls it a preview of a 51% attack.

Retrospective: (17 ) Who promoted the early propaganda of Bitcoin?

Next notice: (19) Who is the super-large bitcoin mining pool whose computing power has approached 51%?

A collection of bitcoin story series you don't know, will be continuously updated, so stay tuned …