RhinoLearn: What is Forking?

In the cryptoverse, a fork happens when a section of a blockchain’s community decide to go in a new direction and change its rules (protocol) by modifying its code.

 

Now we know what you’re thinking here: that’s a bit like when a band splits over musical differences, right? Or when a company breaks into two smaller units because the directors have fallen out?

 

Well it’s kind of like that, but not always. Sometimes the blockchain splits in two different directions: other times, the chain simply branches into different streams which continue to work together.

 

These subtleties can be confusing, so in this edition of RhinoLearn we’re going to run through all the key points with you.

Ok, so when do blockchain forks happen?

 

Blockchains are open-source programmes. This means the code is freely available to view, and anyone can modify the code if they think it can be improved.

A fork often happens when a blockchain’s credibility or future competitiveness has been undermined, for example when:

  • The blockchain DAO has suffered a major hack (like when the Ethereum DAO was hacked in 2016).
  • Its rules, technology or codebase have been outpaced by rivals.

Sometimes, however, a group of users simply think the protocol can be made more efficient or community-friendly.

Wait, why can’t the community just update the code and move on?

 

With blockchains, it’s not quite as simple as that.

If we were talking about a conventional piece of software, like an app on your phone, the people who built the software could simply go in and update the code. Job done.

Blockchains, however, have no central authority: as you’ll probably know by now (or have guessed from the name), they consist of a set of blocks that are all chained together.

These blocks, also called nodes, are created by miners – the folks who validate transactions and update the chain. Each node in the chain relies on the rest, and they are linked together by a common set of rules, which are maintained by consensus.

So if someone wanted to go back and update a blockchain, they’d have to get every miner running the programme to switch over the updated version, in the time it takes to create a single block (in Ethereum’s case, this is about 12 seconds). This is virtually impossible to achieve.

A fork is a more practical way of achieving this objective. To create a fork, the individual or group simply copies the existing code and tweaks it. The amount of change will dictate whether the blockchain splits in two (a hard fork), or embraces the updated protocol (a soft fork). 

Soft forks vs hard forks 

 

A soft fork is usually a small change – for example, a tweak to the way fees from the blockchain are distributed. 

In this case, the blockchain splits into two separate channels – those that use the upgraded code and those still using the original – but crucially, they can work together. For this reason, a soft fork is known as backwards-compatible, which means the miners using the new code can communicate with those using the old code.

In other words, the miners can carry on working as before. Even if they don’t change their code or update their software, they can work with miners that do.

A hard fork, by contrast, is a fundamental change to the way the blockchain operates.

These changes are backwards-incompatible, which means a total split. Those miners that don’t update their software won’t be able to validate transactions or publish new blocks to the blockchain. 

So the miners have a choice: either upgrade to the new code, and use the new chain, or carry on using the old one.

Ok, can you give me some examples?

Bitcoin provides examples of both hard and soft forks.

In 2017 miners proposed a change which became known as SegWit, which made Bitcoin transactions more efficient by removing certain information from the input field. This change was significant, but not transformative: miners using the old system could work with those who adopted the new one.

However another change took place in 2017 when miners decided to change the size of each block, representing a fundamental change to the way Bitcoin operated. This created a spin-off blockchain and a new currency, known as Bitcoin Cash, which is still in use today.

So, in summary:

  • Forking happens when a section of a blockchain community decide to go in a different direction.
  • Forks can be soft and hard, depending on the amount of change required.
  • Forking is an alternative to the software upgrades you get in the real world.

Enjoyed this edition of RhinoLearn? Then check out our explainer on API trading, which introduces another complex topic from the cryptoverse and puts it into everyday terms.

Latest Posts

rhino.fi is delighted to announce that our bridge now supports inEVM. Supporting this new Layer2 rollup marks the first steps towards full integration with the Cosmos ecosystem.

Read Article

Earn 19% APY on your stablecoins