What is a Bitcoin fork?steemCreated with Sketch.

in #bitcoin7 years ago

BITCOIN FORK

The word fork in Bitcoin has a different and more complex meaning from the usual software development one. One might think that this is simple to introduce new features in the protocol — just release a new version of the software, and tell all nodes to upgrade. In reality, it's just impossible to assume that every node would upgrade. Some nodes in the network would fail to get the new software or fail to get it in time. We can differentiate between two types of changes: those that would cause a so-called hard fork and those that would cause a soft fork.

A hard fork in Bitcoin is needed to introduce new features into the Bitcoin protocol that were previously considered invalid. That is, the new version of the software would recognize blocks as valid that the old software would reject. Hard forks make the block chain split, and branches will never join together again. Every node in the network will be either on one or the other side of it based on which version of the protocol it is running. ![1-n7OYX0O6C0d3wx400ddQtA.png]()

A soft fork avoids the permanent split that a hard fork introduces, and is applicable only when adding features that make validation rules stricter. The nodes running the new software will be enforcing some new, tighter, set of rules. Provided that the majority of nodes switch over to the new software, these nodes will be able to enforce the new rules. An example of a change that was made via soft fork is pay-to-script-hash. Pay-to-script-hash was not present in the first version of the Bitcoin protocol. This is a soft fork because the old nodes would still be able to verify a valid pay-to-script-hash transaction. As interpreted by the old nodes, the script is simple — it hashes one data value and checks if the hash matches the value specified in the output script. Old nodes don't know to do the additional step of verifying that value itself runs a valid script. We rely on new nodes to enforce the new rules, i.e that the script actually redeems this transaction. Finally, in the future new cryptographic schemes or extra metadata in the coinbase parameter with a particular meaning could be introduced via a soft fork.

TL;DR: Soft forks are forward-compatible (old nodes will accept blocks created by new nodes). Only miners will have to upgrade, otherwise they risk ending up on the wrong side of the fork and losing money. Users and merchants can keep running older nodes, which will accept the newer blocks. Hard forks are not forward-compatible (old nodes may not accept blocks created by new nodes). With a hard fork, everyone (miners, users, and merchants) will need to upgrade to the new code.

Sort:  

Really great post !!

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 57850.91
ETH 2358.42
USDT 1.00
SBD 2.43