What is a Bitcoin fork?

Bitcoin forks already occur quite regularly. A by-product of distributed consensus, forks occur whenever two miners find a block almost at the same time. Ambiguity is resolved when the following blocks are added to one, making it the longest string, while the other block is “orphaned” (or dropped) by the network. But the forks can also be introduced voluntarily on the network. This occurs when developers seek to change the rules used by the software to decide whether a transaction is valid or not. When a block contains invalid transactions, this block is ignored by the network and the minor who found that this block was losing a block reward. As such, miners generally wish to exploit only valid blocks and build on the longest chain. The forks can be temporary and last a few minutes, or constitute a permanent split in the network, creating two different versions of the blockchain. When this happens, two different digital currencies are also created. There are a few reasons why a fork can happen. For example, when a digital currency protocol change is proposed, users must demonstrate that they support the new version and upgrade – in the same way that users regularly update applications on their computers. . In order for these changes to be approved, many people must agree, just as changes to mobile phone networks require many phone companies.

Hard fork

What is it? A hard fork is a software upgrade that introduces a new rule to the network that isn’t compatible with the older software. You can think of a hard fork as an expansion of the rules. (A new rule that allows block size to be 2MB instead of 1MB would require a hard fork).

What happens? Nodes that continue running the old version of the software will see the new transactions as invalid. So, to switch over to the new chain and to continue to mine valid blocks, all of the nodes in the network need to upgrade to the new rules.

What can go wrong? The problem comes when some sort of political impasse arises, and a portion of the community decides to stick by the old rules no matter what. The hash rate, or network computing power, behind the old chain is irrelevant. What matters is that its data (and ruleset) is still perceived to have value, meaning miners still want to mine a chain and developers still want to support it.

The ethereum DAO hard fork was a perfect case study of how a community can split over rules. Now, we have two blockchains using a variant of the software – ethereum and ethereum classic, both of which boast a different ethos and a different currency.

 

Soft fork

What is it? A soft fork, by contrast, is any change that’s backward compatible. Say, instead of 1MB blocks, a new rule might only allow 500K blocks.

What happens? Non-upgraded nodes will still see the new transactions as valid (500k is less than 1MB in this example). However, if non-upgraded nodes continue to mine blocks, the blocks they mine will be rejected by the upgraded nodes. This is why soft forks need a majority of hash power in the network.

What can go wrong? When a soft fork is supported by only a minority of hash power in the network, it could become the shortest chain and get orphaned by the network. Or, it can act like a hard fork, and one chain can splinter off.

Leave a Reply

Your email address will not be published. Required fields are marked *