Soft-Fork is a protocol update in the Blockchain, where the new rules are stricter than the old rules.
Specifically, this is a backward-compatible change, meaning that old nodes (not upgraded) can still view the new Blocks created by the upgraded nodes as valid.
This happens as long as the new Blocks comply with both the old and new rules.
How Soft-Fork Works
Assume there are 2 groups of nodes
- Unupgraded nodes: Running the old Blockchain software and only know the old rules.
- Upgraded nodes: Running the new version of the Blockchain software with the new rules.
Operating process
- The upgraded nodes create new Blocks that follow the new rules (e.g., smaller Block size).
- Unupgraded nodes can still validate the new Blocks because they still comply with the old rules.
- However, transactions that do not follow the new rules will be rejected by the upgraded nodes.
Result
- The Blockchain network is not split.
- If the majority of miners and nodes upgrade, the new rules will gradually become the standard.
Advantages and Disadvantages of Soft-Fork
Advantages | Disadvantages |
---|---|
Backward-compatible with old nodes. | Requires consensus from the majority of miners and nodes. |
Low risk of chain split. | Old nodes may not notice the changes. |
Not all nodes need to upgrade immediately. | If the majority do not upgrade, the Soft Fork will fail. |
More flexible and safer changes. | The new rules must be stricter than the old rules. |
Examples of Soft-Fork
SegWit (Segregated Witness) – Bitcoin
- Purpose
- Increase performance and reduce transaction costs in Bitcoin.
- How it works
- SegWit separates the transaction signature (witness data) from the main part of the Block.
- Reduces the size of transaction data, allowing more transactions to be included in a Block.
- Unupgraded nodes still view SegWit Blocks as valid because the Blocks still comply with the old rules.
Block size change
- A Soft Fork can require a smaller Block size. For example:
- Old rule: Allow Blocks up to 2MB in size.
- New rule: Limit Block size to 1MB.
- Old nodes will still accept Blocks smaller than 2MB (as they are valid under the old rules), but new nodes will reject Blocks larger than 1MB.
Difference between Soft-Fork and Hard-Fork
Criteria | Soft Fork | Hard Fork |
---|---|---|
Compatibility | Backward-compatible | Not backward-compatible |
Old nodes | Old nodes continue to operate normally | Old nodes are excluded from the chain if they don't upgrade |
Rule changes | Rules become stricter | Rules are changed or expanded |
Split risk | Low | High |
Examples | SegWit (Bitcoin) | Ethereum Classic (after the DAO Hard Fork) |
When to Use Soft-Fork?
Soft Fork is suitable in the following cases:
- Changes that require increased security or feature improvements without major changes to the network.
- The network needs stability and flexibility, and does not want to risk chain splitting.
- Updates that "tighten" the rules, rather than expanding the rules.
Conclusion
Soft-Fork is a flexible and safe way to upgrade the Blockchain, as it does not require all nodes to upgrade simultaneously.
This is an effective method to implement minor changes or tighten rules in the network. However, if there is not enough consensus from miners and nodes, the Soft-Fork can fail.