What is a Fork?

Sometime the blockchain “forks”. Lots of trader seem unaware what that means, so here is a short explanation: Basically the network disagrees about the current blockchain state, so there are multiple heads like a fork has multiple tines.

(A “fork” in software development also means to clone a codebase. This is what a pure-clone altcoin does. I am talking about something different here. Hopefully, you  do not get confused.)

A new block for the chain is forged by using the latest block, a few pending transactions, and the hash code some miner has found. Then the block is publicized to the rest of the network.

Naturally, there might be multiple miners finding the hash code at the same time. In this case the network decides on a winner and moves on. This might take a while, so a node (aka wallet) might use the wrong version for a while. Each node only sees its direct neighbors and if they report different version, it needs to use an arbitrary one to move on. Sometimes a node has to rollback, when it picked the wrong one. This rollback is the main reason that a transaction requires “confirmations”. The idea is: The longer the chain built on top of a block, the more sure we are that this block is on the right chain.

Brace Yourselves Fork Is ComingWhat happens if you are on the wrong chain? At first, others do not see your transaction. Later when your wallet does a rollback, your transaction is canceled. It is like your transaction happened in a parallel universe, but not in our universe. This is equivalent to “it never happened”.

How to forks happen? Small forks happen naturally, due to the distributed nature of a p2p network. Those are very short-lived and resolved quickly, though. Problematic forks usually happen due to outdated clients. For example, the Dogecoin 1.6 update says:

This is a mandatory update as it involves a hard fork of the network. Please make sure you are running 1.6 to ensure that you’re on the correct blockchain and not at risk of losing your DOGE

As per block 145k, the network will hardfork to adopt a new difficulty retargeting algorithm.

The developers announced that you have to upgrade to the newest version of the Dogecoin wallet by block 145000. Why? Because a mixed network of 1.6 and pre-1.6 nodes will most certainly not agree on the right blockchain. They will diverge into two network, which are constantly interfere with and confusing each other, because they use the same root nodes. What do they disagree about? The difficulty retargeting algorithm. 1.6 and pre-1.6 miners will use different difficulties for mining and block forged with the wrong difficulty is not accepted by one of the “two” networks.

(By “hard fork” they probably mean something like “deliberate fork”)

 

Advertisements

3 comments

  1. Pingback: Amagi Metals
  2. BitCoinDaddy

    Reblogged this on Empowering Times and commented:

    I hear this word being used a lot, especially as bitcoin contemplates HARD FORKING THE bitcoin blockchain’s block to 20 or 22 mega bytes.

Give some feedback

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s