Читать книгу Cryptocurrency All-in-One For Dummies - Peter Kent, Kiana Danial - Страница 42

Hard forks and soft forks

Оглавление

Two types of forks can happen in a cryptocurrency: a hard fork and a soft fork.

Most cryptocurrencies consist of two big pieces: the protocol (set of rules) and the blockchain (which stores all the transactions that have ever happened). If a segment of the crypto community decides to create its own new rules, it starts by copying the original protocol code and then goes about making changes to it (assuming the cryptocurrency is completely open source). After the developers have implemented their desired changes, they define a point at which their fork will become active. More specifically, they choose a block number to start the forking. For example, as you can see in Figure 2-1, the community can say that the new protocol will go live when block 999 is published to the cryptocurrency blockchain.


© John Wiley & Sons, Inc.

FIGURE 2-1: An example of a hard fork.

When the currency reaches that block number, the community splits in two. Some people decide to support the original set of rules, while others support the new fork. Each group then starts adding new blocks to the fork it supports. At this point, both blockchains are incompatible with each other, and a hard fork has occurred. In a hard fork, the nodes essentially go through a contentious divorce and don’t ever interact with each other again. They don’t even acknowledge the nodes or transactions on the old blockchain. See Book 2, Chapter 5 for more about correcting actions with a hard fork on a blockchain like Ethereum. (And if you’re curious about forking in the context of cryptocurrency mining, flip to Book 6, Chapter 8.)

On the other hand, a soft fork is the type of breakup where you remain friends with your ex. If the developers decide to fork the cryptocurrency and make the changes compatible with the old one, then the situation is called a soft fork. You can see the subtle difference in the example shown in Figure 2-2.


© John Wiley & Sons, Inc.

FIGURE 2-2: An example of a soft fork.

Say the soft fork is set to happen at block 700. The majority of the community may support the stronger chain of blocks following both the new and old rules. If the two sides reach a consensus after a while, the new rules are upgraded across the network. Any non-upgraded nodes (that is, stubborn geeks) who are still mining are essentially wasting their time. The community comes back together softly, and everyone lives happily ever after — until the next major argument, of course.

Cryptocurrency All-in-One For Dummies

Подняться наверх