15 - Disagree? Grab a fork
There is a famous poem by Robert Frost that ends with the line:
“...Two roads diverged in a wood, and I—I took the one less traveled by, And that has made all the difference.”
In the poem, it is commonly believed that Frost is not only making a reference to a choice he must make while traveling but also referring to all the choices we make throughout our life. Life is really about choices–where to live, where to go to school, what to do in your free time, and so on. One choice we have not needed to make is what kind of money we use. That choice is made for us based on the country we live in. A unique feature of the blockchain and digital asset industry is that people do have a choice.
We spoke a few months ago about how most of the first digital asset alternatives were variations on bitcoin. Some slight tweaks to the Bitcoin network code and you get Litecoin. Litecoin made changes to bitcoin like increasing the speed at which a block gets created and increasing the total amount of digital assets that can be created. Within the bitcoin community there was a “divergence” of opinion about what features were most important, and a small group within that community broke off to start their own project. Within the digital asset industry what Frost calls a “divergence” we call a “fork.”
Proprietary vs Open Source Code
Blockchains are built using something called open source code. Open source databases are those whose structure is publicly available to anyone. The code itself serves as a general blueprint for how to structure software. Anyone is able to review the code and suggest changes or updates. The opposite of open source would be considered proprietary code. Proprietary code is owned and maintained by a specific company. Oracle or salesforce use their proprietary code to build and sell software. Keeping that code protected is critical to their entire business model.
Blockchain’s relying on open source code has two main advantages when thinking about upgrading the software. First, anyone with an internet connection can access the code. Everyone on the Bitcoin network is running the same code which allows each network participant to communicate. Having a code that is publicly available is important because it allows anyone to download that code and use it to connect to a blockchain network. The second advantage is that anyone can request to update the code. As we learned in Upgrades, anyone is able to suggest an upgrade to the code.
The fundamental structure of how a blockchain’s codebase is managed and changes is modeled off a development framework called open source. Open source means that the code that a program runs on is visible to the public. Open source code differs from a company like Amazon because their code is protected so that only the people authorized to access that code can do so. Amazon’s code base would be considered “proprietary.”
Soft or Hard?
When thinking about changes being made to open source code, there are two types of updates that can be made. These are known as soft or hard forks. A soft fork is a change to the code that results in the people who do not accept the change still being able to communicate with the rest of the network. A great example of this would be upgrading Microsoft Excel. Let’s say that I download the new Excel 2022, create a beautiful graph using features only enabled by the new Excel, and then send it to my friend. Unfortunately, my friend uses Excel 2017 so when she receives my Excel file and opens it, she does not see the graph as I would but rather in the format Excel 2017 allows. Excel software updates are soft forks because even though my friend can’t see the Excel file how I see it, she can still open the file and review a graph that she is able to understand. These are known as “backward compatible updates.”
On the other hand, a hard fork is the opposite. Hard forks are “non backwards compatible” which means that if I upgrade my software and someone else does not, then our computers would no longer be able to communicate. The best example of this is going from a horse to a car. as stations for cars are a new technology, but if you are still riding a horse, you are completely excluded from being able to use a gas station because they are not backwards compatible with horses.
What if I don't want to?
Blockchain upgrades, soft or hard, can be contentious. There can be disagreements throughout the community about the changes that are being made. Historically, these disagreements have been centered around ideology. We learned above that 95% of miners need to support an upgrade for it to go into effect, but there is still 5% of the miners who disagree with the upgrade. The beauty of a blockchain is that if you are a part of the dissenting minority you don’t have to follow the majority. Instead you can continue to run the pre-upgrade blockchain software.
In a soft fork upgrade, the result is much the same as before the fork. All the nodes on the network can still communicate regardless of if they upgraded or not. Hard forks on the other hand are more chaotic. If that 5% decided that they will absolutely not upgrade and continue to run the old software, the blockchain network effectively gets split in two. You will have one group of people running the pre upgrade software, and another group running the post upgrade software. The changes that were made were so drastic and impacted the fundamentals of the software that the computers running the new and old software can no longer communicate. You now have two separate networks tracking two separate sets of information. In the blockchain world, this means that you now have two different sets of ledgers and therefore two different digital assets.
One of the most controversial upgrades to bitcoin was BIP 141 which is commonly known as Segwit. The basic debate amongst the Bitcoin community was whether to increase the size of a block. Blockchain’s set a specific amount of data that can be included in a block. The block size determines how many transactions can be included in a block and therefore how quickly transactions can be processed. The larger the block size, the more transactions can be processed, but the more data that someone new to the network needs to download in order to participate. Remember that blockchains are a history of transactions over time, and that in order to participate, you need to have an entire copy of those transactions from start to finish. If you increase the block size, then it becomes harder for the average user with a simple personal computer to participate.
The great debate was to either increase the efficiency of the network and therefore exclude people from being able to easily download the entire ledger or maintain efficiency and prioritize the ability for anyone around the world to easily join the network. Ideology clashed with real world use, and it is a debate that still rages today. In the end, a group within bitcoin decided to pursue efficiency and forked the bitcoin network. They called their new network and the digital asset it tracked “Bitcoin cash.”
Upgrades happen more often than we might think and for many different reasons. Next week we will explore hacks and attacks which in some cases have causes a community to fork a network.