Fork (blockchain)

From Decrypted - Decrypting the Cryptocurrency World
Jump to navigation Jump to search

In cryptocurrencies, a fork is defined variously as

  • "what happens when a blockchain diverges into two potential paths forward"[1]
  • "a change in protocol"[2] or
  • a situation that "occurs when two or more blocks have the same block height"[3][lower-alpha 1]

Forks are related to the fact that different parties need to use common rules to maintain the history of the blockchain.[1] Forks (in the sense of protocol changes) have been used in order to add new features to a blockchain, to reverse the effects of hacking or catastrophic bugs on a blockchain as was the case with the bitcoin fork on 6 August 2010[5] or the fork between Ethereum and Ethereum Classic. Notably, blockchain forks have been widely discussed in the context of the bitcoin scalability problem.

Types of forks[edit | edit source]

Forks are further classified as accidental or intentional. Accidental fork happens when two or more miners find a block at nearly the same time. The fork is resolved when subsequent block(s) are added and one of the chains becomes longer than the alternative(s). The network abandons the blocks that are not in the longest chain (they are called orphaned blocks).[1] A block containing invalid transactions is similarly abandoned.[1]

Intentional forks that modify the rules of a blockchain can be classified as follows:[1]

Hard fork[edit | edit source]

A hard fork is a rule change such that the software validating according to the old rules will see the blocks produced according to the new rules as invalid. In case of a hard fork, all nodes meant to work in accordance with the new rules need to upgrade their software.[1]

If one group of nodes continues to use the old software while the other nodes use the new software, a split can occur. For example, Ethereum has hard-forked to "make whole" the investors in The DAO, which had been hacked by exploiting a vulnerability in its code.[6] In this case, the fork resulted in a split creating Ethereum and Ethereum Classic chains. In 2014 the Nxt community was asked to consider a hard fork that would have led to a rollback of the blockchain records to mitigate the effects of a theft of 50 million NXT from a major cryptocurrency exchange. The hard fork proposal was rejected, and some of the funds were recovered after negotiations and ransom payment.[7]

Alternatively, to prevent a permanent split, a majority of nodes using the new software may return to the old rules, as was the case of bitcoin split on 12 March 2013.[8]

Soft fork[edit | edit source]

In contrast to a hard fork, a soft fork is a change of rules that creates blocks recognized as valid by the old software, i.e. it is backwards-compatible.[1] As for a hard fork, a soft fork can also split the blockchain when non-upgraded software creates blocks not considered valid by the new rules.[1]

User activated[edit | edit source]

A user activated soft fork (UASF) is a contentious concept of enforcing a soft fork rule change without the majority support of miners.[1]

See also[edit | edit source]

Notes[edit | edit source]

  1. Alternatively, this situation is called a blockchain split[4] or a blockchain divergence. If permanent, it is also referred to as a cryptocurrency split.

References[edit | edit source]

  1. 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 Amy Castor (27 March 2017). "A Short Guide to Bitcoin Forks". CoinDesk. Retrieved 1 July 2017. 
  2. Tarr, Andrew (July 19, 2017). "UASF vs. UAHF, Explained". CoinTelegraph. Retrieved 22 March 2018. 
  3. Antonopoulos, Andreas (2017). Mastering Bitcoin: Programming the Open Blockchain (2 ed.). USA: O' Reilly media, inc. p. Glossary. ISBN 978-1491954386. 
  4. Thieme, Nick (4 August 2017). "Bitcoin Has Split Into Two Cryptocurrencies. What, Exactly, Does That Mean?". Slate. Retrieved 8 March 2018. 
  5. Sawyer, Matt (26 February 2013). "The Beginners Guide To Bitcoin – Everything You Need To Know". Monetarism. Archived from the original on 2014-04-09. 
  6. Coppola, Frances (21 July 2016). "A Painful Lesson For The Ethereum Community". Forbes. 
  7. Gillespie, Clay Michael (15 August 2014). "Official NXT Decision: No Blockchain Rollback". Cryptocoin News. Retrieved 13 November 2016. 
  8. Lee, Timothy (12 March 2013). "Major glitch in Bitcoin network sparks sell-off; price temporarily falls 23%". Arstechnica. Archived from the original on 2013-04-22.