TIL: What is the difference between a Bitcoin Hard Fork and a Soft Fork?

in blockchain •  7 years ago 

Bitcoin is a protocol: a set of rules everyone on the network adheres to. As Bitcoin evolves, some changes need to be made to the protocol. Sometimes the opinions differ as to what the rules should be. It may happen that different groups see a different future for Bitcoin. When this leads to two different implementations it may lead to a fork.

A fork in software development means that the source code is copied and modified by someone else. Each time the code is copied separately there will be a new branch. This would be called ‘forking’, since the same code would then develop in two parallel directions. The cryptocurrency Litecoin, for example, is a fork of Bitcoin because the Litecoin developers copied Bitcoin's code, made some changes, and launched a separate project.

What is the difference between a Bitcoin Hard Fork and a Soft Fork.png

A Bitcoin Fork

A Bitcoin fork means the blockchain is splitting into two or more directions, leaving new blocks of one chain unacceptable by the other. We end up with two different chains resulting in a fork of the Bitcoin blockchain (which is different from a fork of the software).

When we talk about a fork of the Bitcoin software there is a distinction between two types of forks: A soft fork and a hard fork. Simply put, one can say that a soft fork makes the rules stricter by adding restrictions, while a hard fork softens the rules by removing restrictions. This sounds contradictory, but let me explain how it works.

Soft Fork

A soft fork is a fork where updated versions of the protocol are backwards compatible with previous versions. A soft fork of the Bitcoin protocol makes the set of rules stricter, which means after a soft fork there is less allowed.
An example of a soft fork is when the block size was set to 1MB in 2011. Before this soft fork there was no limit. By setting the limit to 1MB, the rules have become "stricter". Blocks larger than 1 MB were no longer accepted by the new nodes. If a node does not upgrade to the new version it has no problem with the new situation, because the new rules do not conflict with the old rules. A block of 1 MB will still be accepted according to the rules of the old nodes, so updating is not necessarily required. This is a soft fork.

Hard Fork

A hard fork is a change of the protocol that is not backwards compatible with older versions of the software.
When the block size is changed from 1MB to 2MB, it eases (softens) the rules. A 2MB block will not be accepted according to the old rules, but will be accepted according to the new rules. According to the new rules there is more allowed than according to the old rules.
All nodes that are not being upgraded won't be able to follow Bitcoin's new set of rules. The new 2 MB rule conflicts with the maximum size of 1 MB according to their rules, so they won't accept the bigger blocks. This creates a blockchain that uses the old rules, and one that uses the new rules. This is a hard fork.

If the whole community agrees with an upgrade of the protocol a hard fork is no problem. The Steem blockchain has been 'hard forked' 18 times before without any problems. All witnesses agreed with the upgrades. In that case, everyone switches over to the new blockchain and the old blockchain dies.


Image source: publicdomainpictures.net

Controversial Hard Fork

However, it might happen that it is unclear which of the two blockchains is the correct one.
If there's disagreement within the community about which of the chains the correct blockchain is, it is possible that both blockchains are supported. In this case we speak of a controversial hard fork. A controversial hard fork splits Bitcoin into two tokens.

Soft forks and hard forks are regularly discussed in the Bitcoin community. Due to compatibility with older versions, a soft fork is less profound and less dangerous than a hard fork. Making adjustments to the Bitcoin protocol using a soft fork is therefore preferred.


¯\___(ツ)____/¯ Don't miss out on my next post! Follow me @penguinpablo

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

This post received a 16% upvote from @randowhale thanks to @penguinpablo! For more information, click here!

This is so helpful :) Maybe it has something to do with my love of trees..idk...but my brain keeps switching "fork" to branch LOL ;-)

Thank you @penguinpablo! upvoted & resteemed.

I'm guessing "branch" would be used if it wasn't confusing, but is not since we're actually looking at the creation of two separate "trees" so to speak.

Right on :) Thank you @the-ego-is-you!

So, if there is a disagreement about the fork, do we basically end up where ethereum and ethereum classic are now? Or was that a different thing?

That is possible. Time will tell how this will end...

great explanation here. I never knew the difference.

Wonderful explanation, thank you very much.

I never understood forks. Spoons yes. I spoon often. But seriously I really dont know the technicals of forking. Sorry I really wanted to make another joke haha. I hope someone who knows more can help with this question. I will UPVOTE and RESTEEM to get some help with the answer.

  ·  7 years ago (edited)

A soft fork means that those that did not upgrade will remain in the same chain, so it is considered more safe.

A hard fork means that those that upgrade and those that do not will be in two different chains. A new coin is created, those who had the old coin get the same amount for the new coin. If the hard fork is desgined with replay protection you can transfer both coins independently, in case there is not you can separate them but it is a bit more complex.

However, sometimes soft forks can also split the chain in concrete situations. That would be the case of UASF in case it gets the objective of 70% of nodes but less than 51% hash power.

Ok I remember now. I researched this before thanks for the perfectly stated explanation. I basically do nothing actively with coins other than store them in wallets. I am somewhat naive.

great article

Very informative! Thanks so much for in-lighting me.
I am still a newbie so this is good stuff!

Good post @penguinpablo i'm following you .please follow me and give me upvoted