Soft Fork

Soft Fork

In blockchain technology, a soft fork is a change to the software protocol where only previously valid transaction blocks are made invalid. A soft fork can also occur at times due to a temporary divergence in the blockchain when miners using non-upgraded nodes violate a new consensus rule their nodes don’t know about. Soft forks don't require any nodes to upgrade to maintain consensus, since all blocks with the new soft forked-in rules also follow the old rules, therefore old clients accept them. If users upgrade to a post-soft fork client and for some reason a majority of miners switch back to the pre-soft fork client, the post-soft fork client users would break consensus as soon as a block came along that didn't follow their clients' new rules. This kind of fork requires only a majority of the miners upgrading to enforce the new rules, as opposed to a hard fork that requires all nodes to upgrade and agree on the new version. Soft forks cannot be reversed without a hard fork since a soft fork by definition only allows the set of valid blocks to be a proper subset of what was valid pre-fork.

What Is a Soft Fork?

In blockchain technology, a soft fork is a change to the software protocol where only previously valid transaction blocks are made invalid. Because old nodes will recognize the new blocks as valid, a soft fork is backwards-compatible. This kind of fork requires only a majority of the miners upgrading to enforce the new rules, as opposed to a hard fork that requires all nodes to upgrade and agree on the new version.

Understanding Soft Forks Usage

New transaction types can often be added as soft forks, requiring only that the participants (e.g. sender and receiver) and miners understand the new transaction type. This is done by having the new transaction appear to older clients as a "pay-to-anybody" transaction (of a special form) and getting the miners to agree to reject blocks including these transactions unless the transaction validates under the new rules. This is how pay-to-script hash (P2SH) was added to bitcoin.

Soft Fork

Image by Sabrina Jiang © Investopedia 2020

A soft fork can also occur at times due to a temporary divergence in the blockchain when miners using non-upgraded nodes violate a new consensus rule their nodes don’t know about. 

Soft forks don't require any nodes to upgrade to maintain consensus, since all blocks with the new soft forked-in rules also follow the old rules, therefore old clients accept them. Soft forks cannot be reversed without a hard fork since a soft fork by definition only allows the set of valid blocks to be a proper subset of what was valid pre-fork. If users upgrade to a post-soft fork client and for some reason a majority of miners switch back to the pre-soft fork client, the post-soft fork client users would break consensus as soon as a block came along that didn't follow their clients' new rules. In order for a soft fork to work, a majority of the mining power needs to be running a client recognizing the fork. The more miners that accept the new rules, the more secure the network is post-fork. If you have 3/4 of miners recognizing the fork, 1/4 blocks created aren't guaranteed to follow the new rules. These 1/4 blocks will be valid to old nodes that aren't aware of the new rules, but they will be ignored by new nodes.

Soft forks have been used on the bitcoin and ethereum blockchains, among others, to implement new and upgraded functionalities that are backward compatible.

Related terms:

Bitcoin

Bitcoin is a digital or virtual currency created in 2009 that uses peer-to-peer technology to facilitate instant payments. read more

Blockchain : What You Need to Know

A guide to help you understand what blockchain is and how it can be used by industries. You've probably encountered a definition like this: “blockchain is a distributed, decentralized, public ledger." But blockchain is easier to understand than it sounds. read more

Ethereum

Ethereum is a blockchain-based software platform for creating and using smart contracts and distributed apps; the cryptocurrency Ether was created for it. read more

Hard Fork (Blockchain)

A hard fork is a radical change to the protocol of a blockchain network that makes previously invalid blocks/transactions valid—or vice-versa. read more

Master Node

Master nodes are full nodes that verify new blocks of transactions in a cryptocurrency as well as perform some roles in the governance of the blockchain. read more

On-Chain Governance

On-chain governance is a governance system for blockchain in which rules are hardcoded into protocol.  read more

Orphan Block (Cryptocurrency)

Orphan blocks are valid blocks that are rejected from the blockchain due to a time lag in being accepted into the blockchain. read more

Proof of Work (PoW)

Proof of work describes the process that allows the bitcoin network to remain robust by making the process of mining, or recording transactions, difficult. read more