Hard Forks Explained
Litecoin is a distributed blockchain that is verified by all the full nodes in the Litecoin Network. Full nodes all agree to enforce a similar set of rules so as to maintain a unified version of the Litecoin "ledger." As miners successfully add a block (or record of transactions) to the Litecoin blockchain, full nodes disseminate this information to other full nodes in the network so that everyone has a copy. This is how the blockchain ledger remains unified and how everyone is held accountable.
What Kind of Rules Are There for Litecoin?
Here are some examples that Litecoin full nodes currently enforce:
- 1 mb blocks
- Scrypt Mining Algorithm
- 2.5 minute transaction times
- 84 million max supply
Now let's pretend for a moment that two alternate versions of the blockchain network exist at the same time in the Litecoin Network. How does this get resolved?
Well the first step is that miners must choose which version of the blockchain they want to extend. Miners are incentivized to build on the same version because if they don't, they won't get their block rewards. After miners choose a chain, the other full nodes in the Litecoin network collectively work together to select which of the two versions is the "real" Litecoin blockchain. This is typically determined by following the rule of the "longest chain," or the version of the Litecoin blockchain that is extended the fastest. As a side note, this isn't the only way to determine consensus.
The result of choosing one chain over the alternate version means that the other chain eventually dies because miners no longer submit their blocks to that chain. Eventually, the full nodes that downloaded the dead versions of the blockchain delete them and download the chain with consensus.
It is in this way that should anyone try to introduce an alternate version of the blockchain to the Litecoin network, they will be ignored or deleted because it won't be coherent with the unified blockchain ledger in the network.
But How Are Different Versions of the Blockchain Introduced?
There are two primary ways different versions of the Litecoin blockchain are introduced:
- When miners successfully block at the same time thereby creating two or more simultaneous versions of the blockchain. The full nodes in the Litecoin network must now work together to select one version of the blockchain over the others. This is often referred to as a
- When new protocols, or rules, are introduced into the Litecoin network through full nodes.
For the purposes of this article, we will be focusing only on the second way which can be further categorized as Hard Forks and Soft Forks.
A hard fork occurs when all of the full nodes in the Litecoin network are required to update their software to implement new consensus rules. Those who choose not to download the new software will no longer be part of the new network because their version of the blockchain doesn't match the rest of the network.
Hard forks aren't inherently bad. Sometimes they're needed to implement or upgrade the network with a new protocol. However, hard forks become a problem when not everyone in the network agrees to enforce the new rules. This means different versions of the blockchain will exist in the Litecoin network at the same time. This is problematic because if the old and new rules are somewhat similar, Litecoins can be relayed across the different blockchain networks and get lost.
Here's an example of what that might look like:
- As stated above, the current blocksize of Litecoin is 1mb. Let's call this Group A.
- A group of people want to implement 2mb blocks. Let's call this Group B.
- Now let's pretend the Litecoin community is split between Groups A and B.
- Group B's nodes can accept blocks from Group A because it accepts blocksizes up to 2mb. This means it can easily accept a 1 mb block because it doesn't break the 2mb rule.
- However, Group A's nodes can not accept Group B 's transactions (more specifically the blocks) if they submit blocks larger than 1 mb.
- It's in this way that some coins can get erroneously relayed onto another network and become permanently lost.
Fortunately, this problem can be easily solved if one party decides to implement "replay protection." This means full nodes are programmed in such a way so as not to relay transactions from or to the other network.
A soft fork means a new protocol is introduced into the Litecoin Network that fall within the scope of the old consensus rules. This type of fork is “backward compatible” meaning only mining full nodes are required to implement the new set of rules.
An example of a soft fork would be to decrease the block size from 1mb to 750 kB. This is how it would play out:
- Miners upgrade their software to enforce only submitting 750 kB blocks.
- The rest of the Litecoin Network easily accept 750 kB blocks because it doesn't go over the 1mb rule.
Forks aren't inherently a bad thing. In fact, they can be necessary to implement new code to improve Litecoin. However, there are situations where forks can be disruptive. These are known as "contentious forks" and occur when different groups of people disagree and argue on the new rules of consensus. This is harmful because it takes away resources like developers, miners if it's the same mining algo, and full nodes that were dedicated to the previous network. Contentious hard forks can be especially dangerous without strong replay protection.
Alright, that's all folks! Hopefully you found this article informative and helpful. Make sure to share with your friends and send your donations below!