A complete history of Bitcoin’s consensus forks
Cover

A complete history of Bitcoin’s consensus forks

December 28, 2017

Abstract #

In this piece, we list 19 Bitcoin consensus rule changes (or 18 as an accidental one “failed”), which represents what we believe to be almost every significant such event in Bitcoin’s history. At least three of these incidents resulted in an identifiable chainsplit, lasting approximately 51, 24, and six blocks, in 2010, 2013 and 2015, respectively.

This report was originaly published in BitMEX Research blog. Later it has been updated. The updated list now includes the 2018 security incident and the 2021 Taproot activation.

Please click here to download the PDF version of first version of this report.

Contribute.

Terminology #

TermDefinition
 ChainsplitA split in the blockchain, resulting in two separate chains, with a common ancestor. This can be caused by either a hardfork, a softfork, or neither.
 Consensus rule changes
 Hardfork

A loosening of the consensus rules on block validity, such that some blocks previously considered as invalid are now considered valid.

Existing nodes are required to upgrade to follow the new hardforked chain.

 Softfork

A tightening of the consensus rules on block validity, such that some blocks previously considered as valid are now considered invalid.

Existing nodes do not necessarily need to upgrade to follow the new softforked chain.

Note: These terms are believed to have originated in April 2012 and formalized in BIP99 and BIP123.

List of Bitcoin consensus forks #

DateActivation Block NumberBIP Number or Software VersionDescriptionTypeOutcome
28 July 2010n/a10.3.5OP_RETURN disabled, fixing a critical bug which enabled anyone to spend any Bitcoin.SoftforkNo evidence of any issues during this upgrade.
31 July 2010n/a10.3.6OP_VER and OP_VERIF disabled.3SoftforkSome users had trouble upgrading and it was recommended that nodes should be shut down if they could not be upgraded.2
The addition of the OP_NOP functions.Hardfork
1 Aug 2010 n/a10.3.7Separation of the evaluation of the scriptSig and scriptPubKey. Fixing a critical bug which enabled anyone to spend any BitcoinHardforkNo evidence of any issues during this upgrade
15 Aug 201074,6380.3.10Output-value-overflow bug fix following a 184.5-billion Bitcoin spend incident. The 0.5 BTC that was the input to the transaction remains unspent to this day.SoftforkA chainsplit occurred. Around five hours after the incident, a fix was released, client 0.3.10. It is believed that 51 blocks were generated on the “bad chain” before the “good” chain retook the PoW lead.
Disabling OP_CAT, which removed a DoS vector, along with the disabling of 14 other functions.Softfork
7 Sept 2010n/a10.3.12Adding the 20,000-signature operation limit in an incorrect way. This incorrect limit still exists.SoftforkNo evidence of any issues during this upgrade.
12 Sept 201079,400n/a

Adding the 1MB blocksize limit.

The “MAX_BLOCK_SIZE = 1000000” commit occurred on 15 July 2010, which was released in the 0.3.1 rc1 version of the software on 19 July 2010. The commit enforcing the 1MB rule occurred on 7 September 2010, activating at block 79,400. On 20 September 2010, Satoshi removed this activation logic, but kept the 1MB limit.

SoftforkNo evidence of any issues during this upgrade.
15 March 2012171,193BIP30Disallow transactions with the same TXID, unless the older one was fully spent. In September 2012, the rule was applied to all blocks, apart from 91,842 and 91,880, which violate the rule.SoftforkThis was a flag-day softfork. There is no evidence of any issues.
1 April 2012173,805BIP16Pay-to-script hash (P2SH) allows transactions to be sent to a script hash (address starting with 3) instead of a public-key hash (addresses starting with 1).Softfork55% activation threshold, over blocks in the seven days prior to 1 February 2012. Miners did not upgrade fast enough, so the evaluation point was delayed until 15 March. Users running 0.6.0 rc1 who did not upgrade for the delay activated the softfork early and got stuck on block 170,060 when an invalid transaction, according to their nodes, was mined. After activation, problems were caused as the remaining 45% of miners produced invalid blocks for several months after the softfork
24 Mar 2013 227,835BIP34Requires the coinbase transaction to include the block height.Softfork95% activation threshold. A successful rollout occurred.
11 Mar 2013225,4300.8.0This was an unplanned hardfork caused by the migration from Berkeley DB to LevelDB, which accidentally removed an unknown 10,000-BDB database lock limit. This caused a chainsplit on 11 March 2013, although the software which caused the error was released 20 days earlier on 20 February 2013. The change was reverted as the Bitcoin economy and miners switched back to 0.7.2 rules.No change in the consensus rulesA chainsplit of at least 24 blocks occurred, with the 0.8.0 chain having a maximum lead of 13 blocks. A successful double spend also occurred. The original rules chain eventually re-took the PoW lead.
18 Mar 2013n/a10.8.1This was a temporary softfork, introducing a new rule requiring that no more than 4,500 TXIDs are referenced by inputs in a block. This rule is stricter than the 10,000-BDB lock limit. The rule expired on 15 May 2013, a flag-day hardfork.SoftforkThere is no evidence of any issues.
15 May 2013 or 16 Aug 2013 252,451 or earlierBIP50In August 2013, a block may have been produced that violated the original 10,000-BDB lock limit rule, which was relaxed on 15 May 2013.HardforkThere is no evidence of any issues.
4 July 2015 363,731BIP66Strict DER signature upgrade means Bitcoin is no longer dependent on OpenSSL’s signature parsing.Softfork95% threshold over a 1,000-block period. A chainsplit occurred, lasting six blocks, as some miners signaled support for BIP66 but had not upgraded and were SPY mining. The new softfork rules chain eventually took the lead.
14 Dec 2015 388,380BIP65Check Lock Time Verify enables funds to be locked until a specific time in the future. This is Bitcoin’s first new function.SoftforkSuccessful rollout using a 95% threshold.
4 July 2016 419,328BIP68
BIP112
BIP113

Relative lock-time enables a transaction output to be banned for a relative amount of time after the transaction.

CheckSequenceVerify.

Median time-past removes the incentive for a miner to use a future block timestamp to grab more transaction fees.

SoftforkSuccessful rollout using 95% versionbits signaling.
23 July 2017477,800BIP91This temporary softfork makes signaling for the SegWit upgrade mandatory.SoftforkSoftfork successfully activated with an 80% miner threshold over a 336-block period, although only a tiny minority of users enforced BIP91 rules, which have since expired. Therefore, the risk of a chainsplit was elevated in this period.
01 Aug 2017 478,479BIP148This temporary softfork makes signaling for the SegWit upgrade mandatory for a two week period following 1 August 2017.SoftforkFlag-day softfork appeared to succeed with no issues, although only a minority of users enforced BIP148 rules, which have since expired. Therefore, the risk of a chainsplit was elevated in this period.
24 Aug 2017 481,824BIP141
BIP143
BIP147
The segregated-witness (SegWit) upgrade.SoftforkRollout using 95% versionbits signaling.
14 Sep 2017n/a0.15.0Accidental critical inflation bug was added. This was fixed over a year later, on 17 Sep 2018.Accidental hardfork clientNo block was produced which exploited the bug and therefore it can be said that no hardfork occurred on the Bitcoin network.
14 Nov 2021709,632 BIP341The Taproot upgrade combines ideas such as Schnorr signatures (BIP340) and MAST (BIP114BIP117)SoftforkThis softfork activated using “Speedy Trial”, an idea proposed by Russell O’Connor to resolve a dispute on the best activation methodology. A 90% miner threshold over fixed 2,016 block windows was sucessfully used. The softfork locked-in on 12 June 2021 at block height 687,283
The year 2262 13,440,000BIP42Fixed a 21 million coin supply cap bug. The software was upgraded in April 2014 to fix this bug, but the new rule does not apply until the 23rd century.SoftforkThe softfork is not applicable yet.

(Sources: BitMEX Research, GitHub, Bitcoin blockchain)

Notes #

  1. With the exception of the 1MB blocksize limit, prior to the 2012 BIP16 softfork, there was no activation methodology, so if the fork occurred smoothly without a chainsplit, there is not necessarily a specific block height or date on which the consensus fork occurred.
  2. “If you can’t upgrade to 0.3.6 right away, it’s best to shut down your Bitcoin node until you do.” — Satoshi Nakamoto
  3. Prior to the removal of OP_VER, each software upgrade could potentially be considered a non-deterministic hardfork and these have been excluded from this list. If the definition of hardforks does include this, then it’s a somewhat pedantic definition.
  4. There are no consistent definitions used in the above table because, for example, a different definition of the date on which the fork occurred may be more relevant in each incident, depending on the circumstances.
  5. Others have mentioned that changes to the P2P protocol can also be considered hardforks if they make previous software releases unusable, since they can no longer connect to the network. Strictly speaking, however, these do not relax the rules on block validity and one could sync old nodes by setting up a relay of intermediary versions of the software. These changes are excluded from the above list.
  6. Some consider BIP90 a hardfork, but since it only relaxed rules related to softfork activations that happened in the past, it does not share many of the characteristics or risks normally associated with consensus forks. Using the same logic, the block checkpoint scheme can also be considered as softforks.
  7. In July 2010, the chain selection rule was altered to shift to most accumulated work from the number of blocks. Technically, this is not a change to block validity rules; however, this change does share some of the risks associated with consensus rule changes.

Was the 2013 incident a hardfork? #

In our view, on balance, the increase in the BDB lock limit a few months after the 11 March 2013 chainsplit was a hardfork. The rule in question was a 10,000-BDB lock limit, which was increased. The rule was relaxed on 15 May 2013 in software version 0.8.1, which was released on 18 March 2013. A block exceeding this limit may finally have been produced on 16 August 2013 so one can define the date of the hardfork to be either 15 May 2013 or 16 August 2013.

Some have argued that this may not have been a hardfork for a variety of reasons, including that this rule was “quasi-non-deterministic” or that one could manually change the BDB config settings. Indeed, due to the non-deterministic nature of the lock limit, perhaps it is theoretically possible one could have a local system set up such that the old BDB lock limit has never been breached. Therefore, one could declare that there has “never been a hardfork” in Bitcoin, following a strict definition that requires a hardfork to be deterministic or perhaps even directly related to Bitcoin data such as transactions or the block header.

When discussing this incident, Bitcoin developer Gregory Maxwell said:

Sort of a mixed bag there, you can actually take a pre BIP-50 node and fully sync the blockchain, I last did this with 0.3.24 a few months ago. It just will not reliably handle reorgs involving large blocks unless you change the BDB config too. So it’s debatable if this is a hard fork either, since it’s quasi-non-deterministic. There were prior bugs fixed where older versions would get stuck and stop syncing the chain before that too… So I think by a really strong definition of creating a blockchain which violates the rules mandated by prior versions we have never had a hardfork.

Chainsplit incident of July 2015 #

In the list of consensus rules changes above, there are three incidents that caused identifiable chainsplits. The most recent of these occurred on 4 July 2015, during the BIP66 softfork upgrade.

Immediately after the activation of BIP66, there was a six-block orphan chain created because a miner produced an invalid block that was not recognised as invalid by some other mining pools, because they were not validating new blocks.

In this case, some miners signalled support for the BIP66 softfork but hadn’t actually upgraded their nodes to validate; one could say miners were “false flagging”. If the miners had been validating blocks, they would have discovered the block was invalid and rejected it. Instead, some miners built on top of the invalid block and a chainsplit occurred.

A diagram illustrating these six blocks and the chainfork is displayed below.

Graphical illustration of the July 2015 chainsplit. (Source: Blockchain.info http://archive.is/WqGRp and http://archive.is/LHlF7)

Note: After the publication of this piece, an alternative list of consensus versions was published on the Bitcoin Wiki.
Disclaimer: Whilst many claims made in this piece are cited, we do not guarantee accuracy.  We may have made errors or accidentally omitted consensus rule changes from the list.  We welcome corrections.

Connect to our relay to leave a comment. Details.
Подключитесь к нашему релею, чтобы оставить комментарий. Подробнее.