The hardfork issue explained from scratch: Flexibility vs Immutability.

in #hardfork8 years ago


I am writing this article for a friend who has asked me the following question: "I want to understand the hard fork issue". I felt it is a question that requires a proper answer and thus decided it was best done in a short article on steemit. I look forward to your feedback and the feedback of my friend.

What is it?

First off let's explain what a hardfork technically means. According to the bitcoin wiki a hardfork is :

...is a change to the bitcoin protocol that makes previously invalid blocks/transactions valid, and therefore requires all users to upgrade.

Any blockchain follows a consensus rule. Anything -specifically every transaction and every block- is always checked for validity against these rules and any node in the network will reject anything that does not comply with the consensus rules. If nodes would accept anything that is not compliant they themselves would be rejected from the network. As a result if nodes believe that different sets of rules are valid (i.e. because some have upgraded to a new version that introduces new rules) they will accept different tx's and blocks which will result in two different blockchains. Having two different blockchains is a totally standard occurrence, since blocks can technically be mined at the same time. The longest chain always wins and as such due to game theory mechanics nodes will switch to the winning blockchain pretty quickly. Since this happens the losing chain will lose followers & value exponentially and die out very quickly. 

However this is different when the fork results from nodes having a different rule sets, since they do not see the other blockchain. This can technically lead to two version of the same blockchain existing. However because of the game theory this practically never happens very long. The incentives are too high to follow the herd and the economical punishment to the nodes that are staying on the losing chain is losing of all value (your coins will be worth nada). If you are running a full node it is simply your job to make sure you know the correct rules, else you will die. That is the beauty of game theory in blockchains. Game theory to blockchains is like physics to the universe: the fundamental laws that govern how everything works.

In short any time anything in the consensus rules are changed the result is a hardfork which practically means that every time you want to change some rules there has to be a hardfork.

The cost of hardforks

Forks provide the problem that if nodes do not upgrade they may execute transactions that are not recognized by the new chain and thus smart gamers can double spend their money, or rather spend their money in the losing chain while retaining their coins and thus for example cheat a merchant that has not upgraded to the newes rules. 

Hence it is very important to make sure 99.9% of the network upgrades every time there is a hardfork. This of course is hard to do when you have 5k+ nodes, like the bitcoin network does.

Flexibility vs Immutability

So hardforks always provide risk and cost to nodes and it is better to avoid them if possible. However  they allow the improvement of network protocol. As a result if a community is able to hardfork their blockchain, one can enhance its functionality very effectively. Graphene, which bitshares and steemit are based off, has a Distributed Proof of Stake (DPOS) consensus algorithm where 20 miners make up the core network of nodes, while all end users are light clients that do not store the blockchain. Between these miners that are called witnesses it is relatively easy to organise a fork. As a result Steem is capable to organise a hard fork within a few days and even hours if needed and thus is able to adapt their blockchain very quickly. 

The current hardfork issue in bitcoin

Bitcoin has  a rule that a block may not exceed 1MB. Since the tx volume in recent past has risen consistently it appears that we are running into a scaling issues where we might have more tx's soon than space in a block. The 1MB blocksize limit results in a cap on possible transaction volume of ca. 2-5 TPS (transactions per second)


As a result people in bitcoin have called for an increase of the blocksize limit. This has created a huge discussion that has been going on for over a year. The bitcoin core developers seem to mostly think that a hardfork is risky and that an increase in this limit is not a good idea, while many members of the community have an opposite view and think that a hardfork is needed (me included). This has led to great divide in the community with many prominent members having opposite views.  The big chinese miners however have sited with the core developers and as such it does not seem that a hardfork will happen soon. 

Ethereum: Successful hardfork executed to protect DAO hack victims

The DAO hack was the result of a faulty code of a smart contract that allowed a hacker to move funds within the  smart contract into a sub DAO. There was a security mechanism within this DAO that did not allow the attacker to withdraw these funds for a certain amount of time. Ethereum simply decided to take away all the funds from the hacker and give it back to the original investors. This was done by a fork that changed the account values and the code of the DAO. Developers provided the new code to miners and let them vote on if they support the changes or not. On a certain blocknumber the votes were tallied and either nothing would happen (the hacker would win) or all victims would get their ETH back and the hacker would be empty handed. It was up to the miners to decide.

Ethereum just executed this fork successfully this week.  Like in bitcoin there was a big debate about it. In fact the debate is still going on.

Immutable ledger or adaptable ecosystem

Just like in the bitcoin debate many people opposed the ethereum hard fork, it seems these people do not appreciate the changing of the status quo. Many are outraged how account values could simply be changed. Interestingly the same people that oppose the fork in bitcoin also are being very vocal about the hardfork in ethereum. Some view a blockchain as an immutable ledger and even if there are bugs or rules that are obviously not ideal want it to not change. 

The question remains would it really be good if we cannot correct bad rules or mistakes that have been made?

Steem: a hardfork is a non event

Have you ever heard or read about any hardfork at Steem resulting in a big deal debate? 

I have not. This is because in Steem a hardfork is a non-event. The consensus algorithm works so efficiently that hateful debates cannot even developed before the hardfork is fact. This is very important for the strength of a community in regards to adapting to future challenges. I am surprised that this has not been covered at all by the crypto media. It shows me another advantage of Steem which is the quality of content in our media coverage. To goal of pretty much any article we read in the news is to draw us in and generate impressions and clicks to links on the website that host the content. Not the content itself. On Steem however one must give the reader what he wants in order to earn his vote. This makes all the difference and changes writers from being lazy and focusing on catchy headlines to working hard for great content.

Conclusion

I personally think  hardforks are great if they can be executed successfully and with a true consensus that reflects what the community wants and what is good for the ecology of a blockchain. As such I am personally worried about the bitcoin ecosystem at the moment where an easy fix seems so difficult to execute. At the same time I am impressed with how the ethereum community reacted to the disaster of what was the DAO hack that caused 50% of ethereums value to be wiped out in the exchange markets within a tiny amount of time. 

As to the arguments of the opposition to hardforks: I think the idea that a blockchain is an immutable ledger stems from a misunderstanding of what a blockchain is. First and foremost it is a social system that is governed by what its members want and need. It combines the two most intelligent forces on this planet into one coherent system: humans and computing. It has many processes automated which creates functionalities and value propositions that have not been possible until now. One of these is an immutable ledger, that is until the consensus decides this ledger needs to be changed. This however is not a flaw, it is the core what a blockchain is designed to do. Bitcoin being the first blockchain ever cannot do this as effectively as newer versions that have been developed with many of the lessons learned from bitcoin in mind. The ethereum fork to me has shown that blockchains work as a social system by fighting of a significant attack against many of its members. 

Steem is even more impressive in the frequency it executes these forks. Very significant changes like the payout of the mining reward can be adjusted within days. This is possible because the consensus mechanism has been changed in its DPOS algorithm in a way that balances decentralization and efficiency.  

Overall I think this is such a young space that the ability to adapt vastly trumps the protection of the status quo and I hope bitcoin can adapt as well and will stick around forever. However if that is not the case, the world will carry on with one of the better solution taking its place. 


Sort:  

@btc-dialog excellent explanation. Wondering if you wouldn't mind popping over here and posting your thoughts too. Thanks!
https://steemit.com/ethereum/@bitcoinmeister/the-ethereum-classic-coin-the-free-market-s-answer-to-the-hard-fork

Thanks for the link over to my blog.

That was very informative! I was trying to get some easy reading material to understand the concept of hard fork in a simpler way. This was indeed very helpful especially in the context of Steemit. Thanks for putting this together! :)

Thank you for the detailed description what a hard fork is. Now I get the point of the discussion around this.

Reading your great article one questions popped in my mind:
I agree that due to the fact that the block chain topic is just starting to rise it is necessary to adapt somehow to the future. Hardfork I learned is one option to do this. I also see the point that having just a few numbers of "witnesses" who are running the full block chain makes it easy to organize a hardfork.
On the other hand isn't the fact that the ruleset can't be changed easily that what brings the trust of the community? If only 20 people are able to change rules, ledger and whatever it is a different trust level I have than if 5k are needed.

Or did I miss something?

Yes that is a great question. I wonder why they chose 20 and not 100 or so. They are very focused on efficiency.

The 20 get chosen out of a pool that is larger, which makes it tougher to cheat. If someone would act up he can be voted out, since there are more witnesses to be voted to be the core witnesses.

I think 20 is still a decent amount of "miners". In Bitcoin there are only 12 mining pools and 3 of them have a majority of mining power. The 5k nodes we have in Bitcoin do not actively mine blocks. They still verify Tx and keep a copy of the blockchain but they are not the nodes satoshi describes in his white paper. So steem to me seems more decentralized than Bitcoin after all. Hower this might be wrong. I just find it very risky to have 3 entities that can control the network or could be compromised by an attacker.

Here are some stats about Bitcoin miners: https://blockchain.info/pools

Hard forks keep the wheels turning! Great read.

Coin Marketplace

STEEM 0.19
TRX 0.14
JST 0.030
BTC 59715.05
ETH 3186.24
USDT 1.00
SBD 2.42