Skip to main content
Skip to main content
Polkadot logo

Fork

A split in a blockchain's protocol, often leading to a new chain.

What is a fork in blockchain?

A fork occurs when a blockchain diverges into two separate paths, creating different versions of the chain. This can happen for various reasons, from temporary network disagreements to intentional protocol changes. The term "fork" comes from the visual representation of how the chain splits, like a fork in a road where one path becomes two.

Not all forks are created equal. Some are temporary and resolve naturally within minutes, while others are permanent chain splits that create entirely new blockchains with their own communities, tokens, and futures. Understanding the difference between these types is crucial for anyone working with blockchain technology.

Types of forks:

  • Temporary forks: Occur naturally when validators produce competing blocks simultaneously, resolving quickly as the network converges on one canonical chain
  • Soft forks: Protocol changes that are backward-compatible, allowing upgraded and non-upgraded nodes to coexist
  • Hard forks: Protocol changes that break backward compatibility, requiring all nodes to upgrade or be left on the old chain

Why do forks happen?

Forks in blockchain technology occur for several reasons, both intentional and unintentional:

Unintentional (temporary) forks: Network latency can cause multiple validators to produce valid blocks at nearly the same time. When this happens, different parts of the network temporarily see different versions of the chain. These forks resolve naturally as the consensus mechanism determines which chain to follow, typically within seconds or minutes.

Intentional forks: When blockchain networks need software upgrades to implement new features, fix security issues, or change fundamental rules, they often require forks. These intentional forks allow network participants to coordinate changes to the blockchain protocol. Sometimes forks also result from fundamental disagreements about a blockchain's direction, creating competing chains when communities can't reach consensus on issues like block size limits or governance changes.

Hard forks vs soft forks

Hard forks introduce changes that are not backward-compatible with the old protocol. All network participants must upgrade to continue participating in the network. If some nodes refuse to upgrade, they remain on the old chain, creating a permanent chain split.

Famous hard fork examples include:

  • Bitcoin Cash: Split from Bitcoin in 2017 over disagreements about block size limits and scaling approaches
  • Ethereum Classic: Created after The DAO hack in 2016, when the Ethereum community disagreed on whether to reverse the theft through a hard fork
  • Bitcoin Gold: Another Bitcoin fork focused on changing the mining algorithm

The challenges with hard forks:

  • Require coordination across the entire network
  • Risk fragmenting the community and splitting liquidity
  • Force node operators to choose which chain to support
  • Can create confusion about which chain is "legitimate"

Soft forks introduce changes that are backward-compatible. Upgraded nodes can still interact with non-upgraded nodes, though the non-upgraded nodes may not see or understand new features. Soft forks are generally less disruptive but also more limited in the types of changes they can implement.

How Polkadot avoids disruptive forks

Polkadot was designed to eliminate the need for hard forks through its forkless upgrade mechanism. Instead of requiring network-wide coordination and manual software upgrades, Polkadot can evolve continuously through onchain governance.

When protocol changes are needed, they're proposed through Polkadot's OpenGov system. Once approved by the community, the upgrade is scheduled and executed automatically by the network itself. All upgrade logic is written in WebAssembly (Wasm), stored directly onchain, and executed by all nodes simultaneously. This ensures the entire network transitions together without manual intervention or risk of permanent chain splits.

Benefits of avoiding hard forks:

  • No community fragmentation or competing chains
  • Faster iteration and innovation cycles
  • Reduced coordination overhead for node operators
  • Users don't need to take any action during upgrades
  • Network stays unified with single source of truth
  • Minimizes security risks associated with fork transitions

While Polkadot avoids disruptive hard forks for upgrades, temporary forks can still occur naturally during block production when multiple validators produce blocks simultaneously. GRANDPA's finality mechanism quickly resolves these by finalizing one canonical chain, ensuring temporary forks don't cause lasting issues.

Related Terms

Hard fork

A permanent blockchain split requiring all users to upgrade to stay in sync.

Soft fork

A blockchain protocol change, backward-compatible with previous versions.

xs