Although we say that the blockchain is highly secured, we can't actually say that it's totally perfect, as nothing in this world is perfect. For this reason, once in a while, small modifications are made on the blockchain with the intention of bringing the system closer to perfection.
The cryptocurrency blockchains are decentralized system, which means that every user or shareholder in a cryptocurrency's community has a say/vote in whatever changes that needs to be made. Since we all have different mindsets and way of thinking, just as our faces are different, it's not unexpected that some members of the community may not be comfortable with changes that are to be made.
In today's lecture, professor @awesononso while teaching on the topic "Blockchain Forks" has explained to us the concept of forks and how it is used in resolving this kind of disputes when they arise. Below is my response to the assignment he gave after the class.
Question 1: WHAT IS A FORK? (IN YOUR OWN WORDS)
No system built by man can ever be completely perfect, not even the highly secured blockchain technology. Although at the time when a technology is newly introduced, it might seem so perfect, with time (as man advances) it's flaws becomes so visible. Since man can't ever achieve perfection in his creation, the best man can do is to keep improving on the technology that they have already introduced.
But not everyone like change. In centralized systems changes can be easily enforced, as the whole decision making process is done by a person or a group of person. In decentralized systems like the blockchain where every cryptocurrency holder in the blockchain has a say in what happens in the system is very hard to enforce these changes, as there must be certain persons who may not agree with these change.
The blockchain network is an open sourced software, which means that it's available to everyone, and anyone can propose a modification on the blockchains protocol. When changes are made to the software protocol of any blockchain, we say that fork have taken place.
Whenever a fork occurs, the blockchain becomes misaligned, if all the miners of that blockchain reaches to a unified decision to completely abandon the old blockchain path for the newly found one, then with time, the blockchain will realign, and the community will go on enjoying the new features of the blockchain.
If on the other hand, there wasn't a unified decision, and a part decides to continue with the old blockchain path, while the other miners the newly found blockchain path, it will create two versions of the same blockchain.
Therefore, I define fork as a change in the software protocol of any blockchain which causes a split in the network. This split can result to just a simple modification of the blockchain, or to the creation of two versions of the blockchain.
Basically, there are two types of fork: Soft fork and Hard Fork.
Question 2: EXPLAIN IN DETAILS WHAT A HARD FORK IS WITH EXAMPLES (CAN BE OF ANY BLOCKCHAIN).
Hard fork is a type of fork which occurs when a change in the blockchain protocol is so radical to the extent that the newly created blockchain protocol is incompatible with the old blockchain protocol. It is not backwards compatible. This splitting of a blockchain leads to the creation of two new blockchains.
This change in the blockchain protocol can be as an intentional one, but regardless of what caused the change, if some miners in the blockchain who don't approve of the changes made in the blockchain continue mining with the old blockchain protocol, while the other miners who approve of the newly found blockchain continue with the new blockchain protocol, it will lead to the creation of two new blockchains (the new version and the old version), from that old one.
It's worth noting that those who decides to continue with the new blockchain will have the same number of coins they had in the original blockchain, before the change in the protocol occurred. This is because although they are now different blockchains, they still share a common origin.
Nonetheless, from the point of splitting (or post-fork), the old blockchain version will continue running with the old protocol, while the new blockchain will run with the modified protocol.
Those users who decides to follow the new protocol will require to upgrade their software so as to be able to verify and validate transactions in the new blockchain, as hard fork is not backwards compatible.
Ethereum Classic and Ethereum
We all know about the event that happened in 2016. On that date, a hacker was able to steal $3.6 million worth of ether from the Ethereum platform. When this happened, a meeting was held in the Ethereum community to device a means of replace the $3.6 million that was stolen.
Majority of the community approved of the idea of forking the block chain and then continuing with the newly formed blockchain, while ignoring the old one. But there were some set of users who disagreed and wanted to continue operating with the old version.
In a bid to resolve the situation, a consensus was reached, and those who wanted to continue with the new blockchain continued with it, calling its cryptocurrency "Ethereum", while those who wanted to continue with the original version did so, calling its cryptocurrency "Ethereum Classic".
To confirm this, if you visit the ethereum and ethereum classic block explorer, you will see that both blockchains share the same origin. For instance, they both have the same Genesis Block 0 with the same hash: 0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3
as shown in the screenshot below.
The also share records of previous transaction before the split. Example Block 100r both Ethereum and Ethereum classic is the same, with hash.
But after the split their records changes. Every consequent transactions records are not longer shared. For instance, the hash for Block 10,000,000 is for Ethereum Classic is 0x83bd7d679c4045bc71cba8ed60d2c9263a5e2ef101b1f3b36dd77c5007b53088.
While the hash for block 10,000,000 for Ethereum is 0xaa20f7bde5be60603f11a45fc4923aab7552be775403fc00c2e6b805e6297dbe as shown below
Question 3: EXPLAIN IN DETAILS WHAT A SOFT FORK IS WITH EXAMPLES (CAN BE OF ANY BLOCKCHAIN)
A soft fork is the type of fork which is used to make small modifications (like adding of new features and functions) in the blockchain. Although there is a change in the blockchain's protocol, it nodes are still compatible with the original version.
For soft fork to actually work, majority (not necessarily all) of the miners in the blockchain must agree to upgrade to the new protocol. Those users who didn't upgrade to the new software can still be able to validate and verify transactions in the blockchain. The reason for this is because soft fork is backwards compatible unlike hard fork.
It's important to note that after soft fork have taken place, the miners must update their systems so that their nodes can be able to validate new transactions. This is because, although the nodes from the new version can recognise the previous blocks, the nodes of the older version can not be able to validate new transactions on the new blockchain protocol. Updating of nodes is similar to what we do whenever we want to update any of our softwares.
Although the old version is still compatible with the new network and can recognize new blocks, it has some little limitation. One of the them is that the functionality of the user who haven't upgraded is affected.
For instance, let say that the block size which was formerly 1200KB became 800KB in the upgraded version, those participants who haven't upgraded will still be seeing the incoming new transactions as valid, but when they try to mine a new block, the network will reject their mining.
This is because, the new protocol rule is that the minmum size for each block is 800KB, thus new blocks will have a size of 800KB. But since their protocol will be requesting that the minimum size for the block be 1200KB, it won't accept the 800KB block. Thus, ever user who want to keep mining in the platform will need to upgrade their software to the new protocol, or riskhaving their functionality reduced.
The most popular soft fork in the world of blockchains is SegWit which is a soft fork of the Bitcoin blockchain. Those who proposed "SegWit", suggested that there was no wisdom in constantly increasing the size of a Bitcoin's block, as each increase will result to the need for more hardwares to run a node. They suggested that it was best the size of Bitcoin's block be pegged at one megabyte just as Satoshi Nakamoto suggested in 2010.
In a bid to modify the blockchain so that it's maximum block size is 1MB, while still keeping to the goals of Satoshi Nakamoto, they group created SegWit. Segwit is basically a change in Bitcoin's blockchain protocol, which involved removing (i.e segregating) "witness" data from the input list.
This "witness data" just as it's name implies, is only needed to verify the validity of a transaction, but when it comes to determining transaction effects, it's not needed. Thus, the removal doesn't necessarily affect the status of a transaction. The removal of this data considerably reduced the size of bitcoin block.
Although this modification is a good one, there were some participants in the Bitcoin blockchain who disagreed with the Segwit idea. The believed that reducing the block size will considerable reduce the number of transactions that are carried out in the blockchain per second, and for a cryptocurrency intending to be remain the dominating cryptocurrencies in the world, this ain't a good idea.
Since, soft fork doesn't require the approval of every participant rather just that of the majority, the majority in support of Segwit still went ahead to modify the blockchain protocol. Those who are not in support of Segwit and have refused to upgrade can still verify the transactions in the blockchain, but their functionality is considerably reduced. For instance, they cant mine till they upgrade their node.
Question 4: WHAT ARE THE DIFFERENCES BETWEEN HARD FORKS AND SOFT FORKS?
Although both hard fork and soft fork both cause a split in the block chain, they are different. Below are some of the differences between them.
|Hard Fork||Soft Fork|
|Leads to the creation of a new blockchain||Modifies an already existing blockchain|
|Backwards incompatible||Backward Compatible|
|Requires the approval of all||Requires the approval of majority.|
|There is repetition of blocks in both the new and the old version||There is no repetition of blocks, as no new block chain is created.|
|Must upgrade software immediately after fork before you can verify transaction||Don't need to upgrade immediately after fork in other to verify transaction in the blockchain|
|Result to the creation of a new cryptocurrency||Doesn't result to the Creation of a new cryptocurrency|
Question 5: EXPLAIN THE FOLLOWING BITCOIN FORKS AND EXPLORE THE BLOCKCHAIN WHERE NECESSARY. INDICATE IF THEY ARE HARD FORKS OR SOFT FORKS; BITCOIN CASH AND SEGREGATED WITNESSES
I will start with Segregated Witnesses before proceeding to Bitcoin Cash.
The proposal of Segregated Witness or "SegWit" lead to the forking of the Bitcoin blockchain. Those who proposed "SegWit", suggested that there was no wisdom in constantly increasing the size of a Bitcoin's block, as each increase will result to the need for more hardwares to run a node. They believed that it was best that the block size be pegged at 1MB per block.
Note:- The idea of SegWit is not to create a new blockchain or a new cryptocurrency, but rather to make slight modification in Bitcoin's Blockchain Protocol. To achieve this, the best approach is "Soft Fork".
Since, soft fork doesn't require the approval of every participant rather just that of the majority, the majority in support of Segwit still went ahead to modify the blockchain protocol.
Those who are not in support of SegWit and have refused to upgrade can still verify transactions in the blockchain, as soft fork is backward compatible. The only limitation they have is that their functionality is considerably reduced. For instance, they cant mine a block in the block chain, untill they upgrade their node.
The cryptocurrency, Bitcoin Cash was created when Bitcoin was hard forked in 2017. Earlier, while explaining soft fork using Bitcoin, I mentioned that some Bitcoin users did not agree to the SegWit idea. They were of the opinion that reducing the block size will considerable reduce the number of transactions that are carried out in the blockchain per second, and for a cryptocurrency intending to be remain the dominating cryptocurrencies in the world, this ain't a good idea.
So, while a majority of the developers went ahead to modified the blockchain's protocol; those who opposed the SegWit idea, hard forked Bitcoin and created a new version of Bitcoin by making small modifications to the Bitcoin's source code. This hard fork resulted to the Bitcoin blockchain splitting into two: Bitcoin and Bitcoin Cash.
Some of the small modifications that makes the new blockchain different from the main Blockchain are:
The transfer fee in the Bitcoin Cash block chain is less than the transfer fee in the Bitcoin blockchain. This means that transactions in Bitcoin Cash will cost you less than transactions in Bitcoin.
Transfer speed of Bitcoin Cash is faster than that of Bitcoin transaction. You don't need to wait for up to 10 minutes for your transaction to be verified, as is the case in Bitcoin Transaction.
Bitcoin Cash handles a higher number of transaction per second than Bitcoin.
Since Bitcoin Cash was created by hard forking Bitcoin, it not a surprise that both blockchains have the same origin. They have the same zero block, and the same record of history up to the time of the split.
Below is a screenshot showing the hash for Block 0 for both BTC and BCH is:
000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, and was mined exactly at "2009-01-03 19:15"
But after the split in 2017, the hash value for new blocks were not the same in both blockchain.
For instance, Block 691867 has different has values and time of mining in both Bitcoin and Bitcoin Cash Blockchain.
For Bitcoin, it's 0000000000000000000c315d1b6143b982d26c5007d190437f54fc77b72c9f91, at 2021-07-20 13:18, as shown in the screenshot below.
For Bitcoin Cash, it's 00000000000000000203fa15f9049b198c205a236f1927f57d879b661ddfc623, at 2021-06-12 12:41, as shown in the screenshot below.
Question 6: WRITE ON THE STEEM AND HIVE HARD FORK AND SHOW SIMILARITIES IN THEIR GENESIS BLOCKS(Provide screenshots).
Steem hard fork, just like most blockchain hard fork happened as a result of a disagreement between the participants of the platform (the new steemit team, and the witnesses). When Justin Sun, the founder of TRON came into Steemit team, he suggested the integration of TRX into the Steem blockchain.
As expected, some participants (steem witness), many of them "whales", were not pleased with the idea suggested by the new steemit. The declared their independent from steemit, and performed a hard fork on the steem blockchain.
The steem witnesses copied the open source software of the Steem blockchain, and then created the [Hive]( Blockchain]. This lead to the creation of new cryptocurrency, Hive.
You will notice that the two platforms are identical. This is because they only made slight modifications to the software, changing SBD to HBD, Steem to Hive, Steem Power to Hive Power and lots more. They also change the platforms color from light green to red.
Apart from these slight modifications, every other previous data or history in the blockchain remained the same. For instance: both blockchain has the same Genesis Block
To check The Genesis block of Steem blockchain, visit https://steemworld.org
The Genesis Block for Steem blockchain is referred to as Block 1, and it's features is as follows:
The block ID of the Steem Genesis block is 0000000109833ce528d5bbfb3f6225b39ee10086, and it was created on 24th March,2016 at 17:05 (UTC+1) name of it's witness is @initminer as shown in the screenshot below.
To check The Genesis block of the Hive blockchain, visit https://hiveblocks.com/
The Genesis Block for the HIVE blockchain is referred to as Block 1, and it's features is as follows:
Hive Genesis block was created on 24th March,2016 at 16:05 (UTC), name of it's witness is @initminer, same as Steem, as shown in the screenshot below.
In addition to this, after the hard fork occurred, everyone who had an account on steemit platform would find out that they already have the same account on hive, with the same username, reputation, password, and so on. Also the will find that the exact number of currencies, steem, SBD, and steem power they had on steemit was duplicated on their Hive account as Hive, HBD and Give power respectively.
Below is a screenshot showing my Hive account, number of articles on my blog and my reputation as at the time the hard fork happened.
Blockchains are decentralized systems. This implies that no single person has total control over what happens in the platform. Since this is so, it is understandable why disputes that can lead to the splitting of the blockchain keep arising in several blockchains, as we all don't think in the same way.
Whether the need for change result to just modification of the blockchain protocol without introducing a new blockchain or cryptocurrency (as in the case of soft fork), or to a creation of a new blockchain as well as cryptocurrency (as in the case of hard fork), it still for the best, as both forks leads to the general advancement of blockchain technology.
Thank you so much professor @awesononso for the amazing lesson.