Overview

11 Bitcoin upgrades

Bitcoin upgrades revolve around changing the network’s consensus rules, which this chapter frames as “forks.” Because each node is sovereign and users choose the software they run, coordinating changes is delicate: differing rules across nodes can cause temporary or lasting chain splits. The chapter establishes the core mental model—what counts as consensus vs. non-consensus changes, how nodes validate blocks, and why safe rollout matters—then centers the guiding principle that the economic majority of users ultimately determines the rules while miners are incentivized to follow them.

Two fork types define upgrade dynamics. A hard fork relaxes rules so New blocks may be invalid to Old nodes; without deliberate incompatibility (“wipe-out protection”), the New branch risks being reorganized away if Old regains hash rate. A soft fork tightens rules so New blocks remain valid to Old nodes, but Old can still produce blocks invalid to New; in a split, the Old branch risks wipe-out as adoption grows. Chain splits create two spendable UTXO sets and expose users to transaction replay, which replay protection (for example, altered signature hashing rules) prevents by making transactions valid on only one branch.

Deployments have evolved to minimize split risk. Early miner-activated soft forks used coinbase text signaling (BIP16), then block-version thresholds (BIP34/66/65), and later version-bits (BIP9) with staged states (DEFINED → STARTED → LOCKED_IN → ACTIVE, or FAILED). This enabled parallel proposals (e.g., CSV) but also revealed a drawback: BIP9 effectively grants small miner minorities a veto, as seen in SegWit’s stalled signaling until BIP91 coordination nudged activation. The experience revitalized user-activated soft forks (UASF), which put enforcement in users’ hands and, in emerging hybrid approaches, guarantee activation after a deadline if miners do not cooperate. The overarching lesson is to upgrade cautiously, prefer designs that avoid prolonged splits, and respect that users—through the software they choose—collectively set Bitcoin’s rules.

  Your new message will be accepted by Bitcoin New and ignored by Bitcoin Old.
kill message.png
  Qi gets a transaction twice. First during transaction propagation, second during block propagation.
qi gets the transaction twice.png
  Compact blocks in action. Rashid sends just the necessary data to Qi.
compact blocks.png
  Your node running Bitcoin New is a loser against the Bitcoin Old nodes. Bitcoin Old will discard all your blocks that violate the ≤ 4,000,000 WU rule.
hard fork single new node.png
  A majority of the hash rate runs Bitcoin New. It seems to have caused a permanent chain split.
hard fork majority new node.png
  The New chain is wiped out because the Old chain becomes stronger.
hard fork new chain reorg.png
  Bitcoin Cash protects against wipe-out by requiring the first block after the chain split to be >1MB.
bitcoin cash hard fork.png
  An Old miner regards a segwit output as anyone can spend and adds a transaction that spends it as such to the block.
spend segwit as anyone can spend.png
  The soft fork may cause a chain split if the Old nodes produce a block that New miners don’t accept.
soft fork single new node.png
  As people adopt Bitcoin New, your branch will cause a reorg for Bitcoin Old nodes.
soft fork majority new node.png
  After a chain split you effectively have two versions of your UTXOs.
utxos in chain split before book purchase.png
  Your transaction to the book store is valid on both the Old branch and the New branch.
old new utxo sets.png
  Transaction replay causes you to pay in both currencies
utxos in chain split.png
  With replay protection, a transaction is only valid on one of the branches.
bitcoin cash replay protection.png
16. A miner signals support for pay-to-script-hash by writing "/P2SH/" in the coinbase’s signature script.
17  The block header contains a block version. The first blocks used version 1.
header version 1.png
  BIP34 requires that all blocks contain the block height in the coinbase.
height in coinbase.png
   Miners that run the soft fork signal support for it by increasing their block version.
header version 2.png
relative hash rate 75.png
relative hash rate 95.png
  The Old nodes could cause a chain split, but it probably won’t last for long.
soft fork bip34 chain split.png
  The block version is treated differently. Each of the right 29 bits can signal for different proposals.
version bits.png
  State transitions happens every 2016 blocks.
bip9 states.png
  BIP9 deployment of csv. It went well.
bip9 relative lock time states.png
  The segwit deployment didn’t proceed as anticipated.
bip9 segwit stuck started.png
  BIP91 updates its state every 336 blocks instead of the usual 2016. This went fast.
bip91 states.png
  Segwit finally activates thanks to BIP91.
bip9 segwit active.png
   Users start rejecting big blocks. They see no new valid blocks, but plenty invalid (too big) blocks.
uasf start.png
  One miner decides to go with the users' will and only build small blocks. That miner will be able to pay the bills.
uasf single miner.png
  A few more miners realize that it’s more profitable to work on the users' branch.
uasf more miners.png
  The users' branch is stronger and wipes out the big blocks branch.
uasf wipeout miners.png
 Hard and soft forks compared.
summary hard vs soft fork.png
  . BIP9 states
bip9 states.png
   User-activated soft fork states
uasf states.png
  Some blocks are only valid on Old nodes and some blocks are only valid on New nodes.
ex hard soft fork.png

 Recap

In this chapter you learned that

  • We don’t want a blockchain split when deploying a fork, because that would cause disruption in the Bitcoin economy.
  • A hard fork is a consensus rule change that requires every miner to upgrade. Otherwise the blockchain will split.
  • A soft fork is a consensus rule change that doesn’t require simultaneous upgrade of the whole network.
  • A hard fork will lead to a blockchain split if a majority runs the New software, which will cause confusion among users and miners.
  • During a blockchain split due to a hard fork you want wipe-out protection to make sure the New branch isn’t deleted by old nodes.
  • In a blockchain split, you want replay protection to let you select what branch you want your transactions applied to.
  • A miner-activated soft fork, for example one using BIP9 for deployment, lets miners deploy a non-controversial soft fork.
  • A user-activated soft fork lets users enforce deployment of a soft fork. If a hash-rate majority eventually follows, the soft fork succeeds without a lasting blockchain split.

FAQ

What does “fork” mean in this chapter’s context?A fork is a change to Bitcoin’s consensus rules—the rules that define valid blocks and the valid blockchain. This is different from forking source code or changing node policy (like relay or fee policies), which do not change consensus.
How do hard forks and soft forks differ?A hard fork relaxes rules, so some blocks valid to New nodes can be invalid to Old nodes; the Old branch can’t be wiped out, but the New one can be reorged unless protected. A soft fork tightens rules, so New blocks remain valid to Old nodes; in a split, the Old branch risks being wiped out.
Do all Bitcoin software changes create a fork?No. Only changes that alter consensus rules are forks. Non-consensus changes—like UI tweaks or network optimizations (for example, compact blocks)—don’t split consensus and remain compatible across nodes.
What is a chain split and why can it happen?A split occurs when groups of nodes enforce different consensus rules and thus follow different valid blocks. This produces two branches and two versions of each UTXO, causing operational and market confusion until one branch is reorganized away or both persist as separate coins.
What is wipe-out protection in a hard fork?If the New chain remains compatible with Old rules, the Old branch can outcompete and reorg it. Wipe-out protection makes the New branch intentionally incompatible (for example, requiring a post-split block that violates Old rules), preventing reorg by Old nodes. Bitcoin Cash used such protection.
What is transaction replay and how is it prevented?After a split, the same transaction may be valid on both branches, unintentionally spending funds twice. Replay protection changes the transaction format or signatures so a transaction is valid on only one branch (e.g., a new SIGHASH type like FORKID).
How have soft forks been deployed historically?Early methods included coinbase signaling (BIP16) and incremented block versions with thresholds (BIP34/66/65). BIP9 introduced “version bits,” enabling multiple simultaneous deployments with states (DEFINED → STARTED → LOCKED_IN → ACTIVE, or FAILED) and a 95% signaling threshold per period.
What happened during SegWit’s deployment and how was it resolved?SegWit signaling stalled under BIP9, effectively giving a minority veto. A user-activated soft fork (BIP148) was proposed, and BIP91 (miner-enforced, lower threshold) bridged the gap by requiring SegWit signaling, leading to SegWit lock-in and activation. Lesson: BIP9 can be blocked by a small minority of hash rate.
What is a user-activated soft fork (UASF) and why does it matter?In a UASF, users (the economic majority running full nodes) begin enforcing new rules at a preset time or height. Miners must follow to have their blocks accepted (and paid), emphasizing that users collectively define the rules by the software they run.
How can users and operators upgrade safely?Run well-reviewed software, monitor deployment states and activation timelines, and avoid high-risk windows around activation if uncertain. In any split, assume replay risk until proven otherwise; use wallets or techniques that provide replay protection when spending on a specific branch.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Grokking Bitcoin ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Grokking Bitcoin ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Grokking Bitcoin ebook for free