2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								<pre>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  BIP: 99
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  Title: Motivation and deployment of consensus rule changes ([soft/hard]forks)
							 
						 
					
						
							
								
									
										
										
										
											2015-11-10 15:19:01 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  Author: Jorge Timón <jtimon@jtimon.cc>
							 
						 
					
						
							
								
									
										
										
										
											2016-11-30 09:47:31 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  Comments-Summary: No comments yet.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0099
							 
						 
					
						
							
								
									
										
										
										
											2020-04-30 09:29:35 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  Status: Rejected
							 
						 
					
						
							
								
									
										
										
										
											2016-02-03 07:02:36 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  Type: Informational
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								  Created: 2015-06-20
							 
						 
					
						
							
								
									
										
										
										
											2016-11-30 09:47:31 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  License: PD
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								  Post-History: http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-June/008936.html
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								</pre>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								==Abstract==
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								This BIP attempts to create a taxonomy of the different types of
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								consensus forks and proposes a deployment mechanism for each of them.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								==Motivation==
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								The security assumptions of p2p consensus-based systems like Bitcoin are
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 12:45:35 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								not always well-understood, and the best upgrade mechanisms to the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								consensus validation rules may vary depending on the type of change being deployed.
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								Discussing such changes without a uniform view on the deployment
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								paths often leads to misunderstandings and unnecessarily delays the
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 18:35:39 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								deployment of changes.
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-28 14:32:58 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								==Definitions==
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-09-04 15:15:08 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								;Software fork
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 12:45:35 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								: A copy of an existing project. In free software, this can be done without the permission of the original project's maintainers.
							 
						 
					
						
							
								
									
										
										
										
											2015-09-04 15:15:08 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								;Consensus fork
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 12:45:35 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								: A divergence in the implementation of the verification consensus rules can impede the expected eventual convergence of the network in a single chain that has the most proof of work and also satisfies the rules. This can be intentional or be caused by a bug in consensus validation reimplementations.
							 
						 
					
						
							
								
									
										
										
										
											2015-09-04 15:15:08 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								;Softfork
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 12:45:35 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								: A consensus fork wherein everything that was previously invalid remains invalid while blocks that would have previously considered valid become invalid. A hashrate majority of miners can impose the new rules. They have some deployment advantages like backward compatibility.
							 
						 
					
						
							
								
									
										
										
										
											2015-09-04 15:15:08 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								;Hardfork
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 12:45:35 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								: A consensus fork that makes previously invalid blocks valid. Hardforks require all users to upgrade.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								;Libconsensus
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								: a theoretical piece of software that contains the specifications that define the validity of a block for a given state and chain parameters (ie it may act differently on, for example, regtest).
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								;Libbitcoinconsensus
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 18:35:39 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								: the existing implementation is a library that is compiled by default with Bitcoin Core master and exposes a single C function named bitcoinconsensus_verify_script(). Although it has a deterministic build and implements the most complex rules (most of the cryptography, which is itself heavily based on libsecp256k1 after #REPLACE_libsecp256k1_PR), it is still not a complete specification of the consensus rules. Since libconsensus doesn't manage the current state but only the validation of the next block given that state, it is known that this long effort of encapsulation and decoupling will eventually finish, and that the person who moves the last line
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								==Taxonomy of consensus forks==
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								===Accidental consensus fork===
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Software forks are very different in nature from consensus rules forks. No software
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								maintainer has special powers over consensus rules changes. There's
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								many good reasons (experimentation, lack of features, independent
							 
						 
					
						
							
								
									
										
										
										
											2015-11-05 23:01:56 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								development, diversity, etc) to fork the Bitcoin Core software and it's good
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								that there's many alternative implementations of the protocol (forks
							 
						 
					
						
							
								
									
										
										
										
											2015-11-05 23:01:56 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								of Bitcoin Core or written from scratch).
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-05-01 06:54:05 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								But sometimes a bug in the reimplementation of the consensus
							 
						 
					
						
							
								
									
										
										
										
											2015-08-28 14:32:58 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								validation rules can prevent users of alternative implementation from
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								following the longest (most work) valid chain. This can result in
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								those users losing coins or being defrauded, making reimplementations
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								of the consensus validation rules very risky. Note that a natural
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								language specification of those rules doesn't help since the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								consensus is not determined by such specification but by the software
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								that the majority of the network runs. That's why "the implementation
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								is the specification".
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-11-05 23:01:56 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								But Bitcoin Core contains many more things than just consensus
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								validation and it would be unreasonable for all alternative
							 
						 
					
						
							
								
									
										
										
										
											2015-11-05 23:01:56 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								implementations to depend on it. Bitcoin Core should not be the
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								specification. That's why the consensus validation is being separated
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								into a libbitcoinconsensus library with a C API easily accessible from
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								any language. This makes alternative implementations much more secure
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								without burdening them with specific design choices made by Bitcoin
							 
						 
					
						
							
								
									
										
										
										
											2015-11-05 23:01:56 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Core. It is to be noted that sharing the same code for consensus
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								validation doesn't prevent alternative implementations from
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								independently changing their consensus rules: they can always fork
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 18:35:39 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								the libbitcoinconsensus project (once it is in a separate repository).
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Hopefully libbitcoinconsensus will remove this type of consensus fork
							 
						 
					
						
							
								
									
										
										
										
											2015-11-05 23:01:56 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								which - being accidental - obviously doesn't need a deployment plan.
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								====11/12 March 2013 Chain Fork====
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 18:35:39 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								There is a precedent of an accidental consensus fork at height 225430.
							 
						 
					
						
							
								
									
										
										
										
											2025-04-30 18:36:45 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Without entering into much detail (see <ref name="bip-50">https://github.com/bitcoin/bips/blob/master/bip-0050.mediawiki</ref>), the situation was different from
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								what's being described from the alternative implementation risks (today alternative implementation
							 
						 
					
						
							
								
									
										
										
										
											2015-11-05 23:01:56 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								still usually rely in different degrees on Bitcoin Core trusted proxies, which
							 
						 
					
						
							
								
									
										
										
										
											2015-11-10 15:19:01 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								is very reasonable considering the lack of a complete libconsensus).
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								The two conflicting consensus validation implementations were two
							 
						 
					
						
							
								
									
										
										
										
											2015-11-05 23:01:56 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								different versions of Bitcoin Core (Bitcoin-qt at the time): 0.8
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								against all versions prior to it. Most miners had been fast on
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								upgrading to 0.8 and they were also fast on downgrading to 0.7 as an
							 
						 
					
						
							
								
									
										
										
										
											2015-11-10 15:19:01 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								emergency when they were asked to by the developers community.
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-11-05 23:01:56 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								A short summary would be that BDB was being
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								abandoned in favor of levelDB, and - at the same time - the miner's
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								policy block size limit was being lift (it was not a consensus rule,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								not even enforced via softfork). Even after testing, a case where
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								levelDB couldn't correctly validate certain bigger blocks only appeared after
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								deployment in production. Fortunately this was handled very well and
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								rapidly by the whole worldwide community and nobody is unhappy about
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								the solution.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								But there's some philosophical disagreements on the terms of what the
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 18:35:39 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								solution was: we can add a pedantic note on that.
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								If "the implementation is the specification", then those
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								levelDB-specific limitations were part of the consensus rules.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Then additional rules were necessary and any alternative
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								implementation (including 0.8) would have to implement it. Then a
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								planned consensus fork to migrate all Bitcoin-qt 0.7- users could
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								remove those additional consensus restrictions.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Had libconsensus being implemented without depending on levelDB,
							 
						 
					
						
							
								
									
										
										
										
											2015-11-10 15:19:01 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								those additional restrictions wouldn't have been part of "the specification"
							 
						 
					
						
							
								
									
										
										
										
											2024-10-20 09:00:08 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								and this would just have been a bug in the
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								consensus rules, just a consensus-critical bug in a set of
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								implementations, concretely all satoshi-bitcoin-0.7-or-less (which
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								happened to be a huge super majority of the users), but other
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								implementations (like libbitcoin) would be free from such bug and
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								implementing the correct libconsensus specification. But since the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								buggy implementation was a super-majority, the solution would have
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								been to instantly (from a specific block) change the rules to not let
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								the super-majority deviate from the specification and then have
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								another consensus fork to remove them. Two theoretical consensus forks
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								instead of one but the first one deployed practically for free. The
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								practical result would have been identical and only the definitions
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								change. This means discussing something that went uncontroversially
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 18:35:39 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								well further is "philosophical bike-shed" (TM).
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								===Unilateral softforks===
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								If it is in their best interest of miners to softfork it should be
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								assumed that they may likely enforce it. In some cases, even against the will of a
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								super-majority of users. This is practically an attack on the network
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								and the only solution is to carefully design the incentives so that
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								the case is simply impossible. If that fails, miners should still
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								consider the risk of motivating a schism hardfork before attempting
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								such a consensus fork. A deployment plan for this case is also
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								unnecessary.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 13:19:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								===Schism hardforks===
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Fundamental disagreements and controversies are part of social
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								systems, like the one defined as the human participants in the Bitcoin
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								network. Without judging the motivation of the rule discrepancies or
							 
						 
					
						
							
								
									
										
										
										
											2025-04-30 18:36:45 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								what rules were in place first, we're defining schism<ref name="schism">https://en.wikipedia.org/wiki/Schism</ref> hardforks as
							 
						 
					
						
							
								
									
										
										
										
											2025-04-17 15:46:10 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								those in which - for whatever reason - users are consciously going to validate 2
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 13:19:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								different sets of consensus rules. Since they will validate different
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								rulesets, they will end up following 2 different chains for at least
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								some time, maybe forever.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-04-30 18:36:45 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								One possible result observed in the past
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 13:19:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								is that one of the chains rapidly disappears, but nothing indicates
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								that this must always be the case.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-04-17 15:46:10 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								While 2 chains coexist, they can be considered two different
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 13:19:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								currencies.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								We could say that bitcoin becomes bitcoinA and bitcoinB. The implications for market
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 18:35:39 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								capitalization are completely unpredictable,
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 13:19:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 18:35:39 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								maybe mc(bitcoinA) = mc(bitcoinB) = mc(old_bitcoin),
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 13:19:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 18:35:39 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								maybe mc(bitcoinA) + mc(bitcoinB) = mc(old_bitcoin),
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 13:19:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								maybe mc(bitcoinA) + mc(bitcoinB) = 1000 * mc(old_bitcoin),
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 13:19:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								maybe mc(bitcoinA) + mc(bitcoinB) = 0,
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 13:19:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 18:35:39 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								...
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 13:19:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Schism hardforks have been compared to one type of altcoins called
							 
						 
					
						
							
								
									
										
										
										
											2025-04-30 18:36:45 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								"spinoffs"<ref name="spinoffs">https://bitcointalk.org/index.php?topic=563972.0</ref> that distribute all or part of its initial seigniorage to
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 13:19:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								bitcoin owners at a given block height.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								This is very disruptive and hopefully will never be needed. But if
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								it's needed the best deployment path is just to activate the rule
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								changes after certain block height in the future. On the other hand,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								it is healthy decentralization-wise that many independent software
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								projects are ready to deploy a schism hardfork.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 13:19:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								In all of the following examples there's clearly a confrontation that
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								is being resolved using an intentional consensus hardfork.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								====ASIC-reset hardfork====
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Imagine ASIC production has been consolidated to a single company and
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								distribution is simply not happening: the company is keeping them to
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mine itself. For that or another reason, a single entity controls
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								40%+ of the hashrate and there's no hope for an spontaneous
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								improvement in decentralization. Such an untenable centralization could
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								be fixed (with great risks) by switching the hash function used in the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								proof of work, effectively "pressing the restart button" on the ASIC
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 12:45:35 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								market. The next function should be simple to implement in ASIC as
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								well so that the market can more easily develop as a healthy and
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								competitive one (as opposed to what the "ASIC-hard" proponents would
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								want), but that's another story...]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Since in this case the confrontation is clearly against the current
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								miners any notion of "miners' voting" is utterly irrelevant.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								====Anti-Block-creator hardfork====
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								There's less extreme cases where changing the pow function would not
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								be necessary. For example, let's imagine a bright future where
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								commoditized ASICs are running in millions home-heaters all over the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								world, but the block size has been completely removed and the network has devolved to a
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								very centralized system where only 2 big pools have the resources to
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								fully validate full blocks and create block templates with competitive levels of
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								transaction fees. In that case, changing the pow function would be a
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								terrible waste and a risk that could be avoided. A hardfork restoring
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								a block size limit could help fixing this situation. Please don't
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								take it as an argument for or against raising the block size limit:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								it's just an example. But in this case, again, those 2 big pools
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								would probably be against the fork and, again, their voting is
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								irrelevant.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Like in the previous example, miners are expected to oppose and they
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								have to be ignored.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								====Anti-cabal hardfork====
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 12:45:35 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Let's imagine BIP66 had a crypto backdoor
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								that nobody noticed and allows an evil developer cabal to steal
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								everyone's coins. The users and non-evil developers could join, fork
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								libconsensus and use the forked version in their respective bitcoin
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 18:35:39 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								implementations.
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 12:45:35 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Should miner's "vote" be required to express their consent? What if some miners
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								are part of the cabal? In the unlikely event that most miners are
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								part of such an evil cabal, changing the pow function may be
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								required. In other cases, mining "vote" doesn't have much value
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								either since this kind of hardfork would not qualify as
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								uncontroversial anyway.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								===Uncontroversial consensus upgrades===
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-11-05 23:01:56 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								"Uncontroversial" is something tough to define in this context. What
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								if a single user decides he won't upgrade no matter what and
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								he doesn't even attempt to explain his decision? Obviously, such
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								a user should be just ignored. But what if the circumstances are
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								slightly different? What if they're 2, 10 users? where's the line.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								It is possible that we can never have a better definition than "I know
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								it when I see it" [citation needed].
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								====Uncontroversial softforks====
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								If a majority of miners adopts a softfork, users will follow that
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								chain, even without understanding the new rules. For them is like
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if blocks are created in a certain way or certain valid transactions
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								are being rejected by miners for some reason. For old nodes it just
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								looks like the new rules are policy rules rather than consensus rules.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								This greatly reduces the deployment risks, making softforks the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								preferred consensus rules upgrade mechanism.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								The first precedent of a softfork was the introduction of P2SH
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								documented in BIP16. There were competing proposals, but BIP12 had
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								clear disadvantage and  BIP17 was considered a less tested but
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								functionally equivalent version by most of the reviewers. Although it
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								was later discovered that BIP16 had unnecessary limitations and BIP17
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								is now considered superior, this probably still qualified for our
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								vague concept of "uncontroversial".
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								At the time, there was no "mining voting" implementation and it was
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								simply deployed using the timestamp of the blocks at some time in the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								future as the activation trigger. This can't guarantee the assumption
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								that most miners have upgraded before enforcing the new rules and
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								that's why the voting mechanism and first used for BIP30 and BIP66.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								The current voting threshold for softfork enforcement is 95%. There's
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								also a 75% threshold for miners to activate it as a policy rule, but
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								it should be safe for miners to activate such a policy from the start
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 18:35:39 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								or later than 75%, as long as they enforce it as consensus rule after 95%.
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								The current miners' voting mechanism can be modified to allow for
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								changes to be deployed in parallel, the rejection of a concrete
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								softfork without getting locked for the deployment of the next one,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								and also a more efficient use of the version field in block
							 
						 
					
						
							
								
									
										
										
										
											2025-04-30 18:36:45 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								headers<ref name="versionbits">https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki</ref>. BIP65 is expected to be deployed with the improved
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								mechanism.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								====Uncontroversial hardforks====
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Some consensus changes require all participants to upgrade their software
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								before the new rules can be safely activated or they will face serious
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								risk of following the wrong chain and being defrauded. Even if the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								exact same mechanism used for softforks would be more risky in these
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								cases, that doesn't mean that this type of changes cannot be deployed
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								in an uncontroversial and safe manner.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								The simplest approach is to select a block height far enough in the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								future that everybody has plenty of time to change their software.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								But if you're aiming for universal adoption, that includes miners'
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								adoption, so it seems reasonable to use a mining voting on top of
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								that. In this case there's only one relevant threshold and it could
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								be different from the softfork one. Probably 100% is too strict,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								since it would allow a relatively small miner to attack the network
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								and block a consensus upgrade. Something between 99% and 95% is
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								probably a sensible choice for this parameter.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								====Uncontroversial emergency hardforks====
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Emergency forks may not have time to consult miners and have to be
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								deployed simply by choosing a block height not so far in the future.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								But emergency forks could be prepared ahead of time. For example, an
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								intermediary version of software could allow blocks
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								that are double the size of old blocks (after a certain height in the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								future) while still making miners reject bigger blocks as a softfork
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								rule. Then miners can start the regular process for uncontroversial
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								softfork (or a unilateral softfork if they're a majority) at any
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								point in the future if it is required, and both intermediary and new
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								versions would be prepared for it (which would make deployment much
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								easier). Other related consensus changes could be deployed in the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								meantime (say, quadrupling the block size) making the emergency
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								softfork unnecessary.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								==Code==
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-04-30 18:36:45 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								This BIP is complemented with a concrete code proposal<ref name="timewarp">https://github.com/jtimon/bitcoin/tree/hardfork-timewarp-0.11</ref> for an
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								uncontroversial hardfork which acts as a precedent and removes the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								perception that hardforks are impossible in Bitcoin. The deployment of
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								the proposal should not block any other potential hardforks (thus it
							 
						 
					
						
							
								
									
										
										
										
											2025-04-30 18:36:45 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								will required the version bits proposal<ref name="versionbits"/> to be implemented). The
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								change itself doesn't add much complexity to Bitcoin Core and is simple
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								enough that is trivial to apply to diverse implementations (that
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								currently can only use libbitcoinconsensus to validate script-related
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								rules). The change has been already widely tested in many altcoins.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								The chosen consensus change is the fix of the timewarp attack
							 
						 
					
						
							
								
									
										
										
										
											2025-04-30 18:36:45 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								discovered and also fixed with a simple patch<ref name"original-references">
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Original References:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								https://bitcointalk.org/index.php?topic=114751.0,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								https://bitcointalk.org/index.php?topic=43692.msg521772#msg521772;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Rebased patch:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								https://github.com/freicoin/freicoin/commit/beb2fa54745180d755949470466cbffd1cd6ff14
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								</ref>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								by @ArtForz. This
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								change has been deployed by most altcoins that made any minimally
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								meaningful change to bitcoin and thus can be considered somewhat
							 
						 
					
						
							
								
									
										
										
										
											2015-11-05 23:01:56 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								tested (in fact, most SHA256d altcoins that didn't implement it have
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								died or being forced to implement it as an emergency hardfork). When
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								deploying this change has been discussed, usually arguments in the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								lines of "if we get to the point when this matters to bitcoin, we
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								would be already in serious trouble" were used against it. This
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								shouldn't be seen as a disadvantage in this context, since it means we
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								can safely activate the fix very far away in the future (say, 4 years
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								worth of blocks).
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								==Footnotes==
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-04-30 18:36:45 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								<references />
							 
						 
					
						
							
								
									
										
										
										
											2015-06-20 23:10:46 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-11-05 23:01:56 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								==Attribution==
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 18:35:39 +03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Incorporated corrections and suggestions from: Andy Chase, Bryan Bishop,
							 
						 
					
						
							
								
									
										
										
										
											2015-11-08 13:19:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Btcdrak, Gavin Andresen, Gregory Sanders, Luke Dashjr, Marco Falke.
							 
						 
					
						
							
								
									
										
										
										
											2015-11-05 23:01:56 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								==Copyright==
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								This document is placed in the public domain.