Bitcoin Hard Fork and Soft Fork

in bitcoin •  4 months ago

Bitcoin-Hard-Fork.png

Hard fork and soft fork are alterations of the Bitcoin protocol. Types of changing software must be considered carefully according to way of alteration. While some researchers claim that soft fork is safer than hard forks, others accept hard fork is better than soft fork.

2188.jpg

Hard fork

Hard fork is a kind of alteration of Bitcoin protocol with removing rules from Bitcoin protocol. Hard fork makes previously invalid blocks or transactions valid. Because deleting some rules removes some obligations. So, some invalid blocks/transactions can be valid anymore.

This kind of alteration can be about block structure, difficulty rules. Hard fork increases number of valid blocks/transactions in Bitcoin network.

Also, hard fork is not backward compatible. Backward compatible means that after alteration of rules, old nodes (do not know about rule change) do not accept new blocks as valid. Because there is an invalidity for old nodes in the created new block.

Lets say; in a block, before rule removing, there must be A, B, C rules. Old node checks if the block is suitable for those rules. After rule alteration, C rule is deleted and old nodes do not about them. But old node still checks if a block is suitable for A, B, C rules.

But after alteration, new node has just A, B rule, not valid for C rule.

So, old node decided new node as invalid because of node does not have C. So, hard fork is not backward compatible.

Bitcoin_Split.jpg

Soft fork

Soft fork is a kind of rule alteration of Bitcoin protocol with adding new rules to Bitcoin protocol. Soft fork makes previously valid blocks or transactions invalid.

Soft fork is about adding new rules like new transaction rules. Pay-to-Script-Hash (P2SH) was a soft fork in the network with BIP16. It allowed transactions to be sent to a script hash instead of a public key hash. Soft fork increases invalid blocks.

Also, soft fork is backward compatible. It means that old nodes (do not know about rule adding) still accepts new blocks created according to new rule alteration. Lets say; before alteration, blocks/transactions must be suitable A, B rules. After adding D rule to Bitcoin network, old nodes check just A, B rules if the block/transaction is valid according to A, B rules. So, old node sees that new block/transaction is valid for A, B rule. So, soft fork is backward compatible.

On the other hand, Mike Hearn claims that backward compatibility term is used as a wrong term for this scope. He offers forwards compatibility. He thinks forward compatibility means that old software continues to accept block/transaction produced by new software.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  trending