Skip to content

SegWit & Taproot: the Soft-Fork Era

Between 2017 and 2021 Bitcoin shipped the two upgrades that define its modern shape: SegWit and Taproot. Neither added a flashy headline feature. Both were quiet, structural changes that unblocked whole categories of things built on top — Lightning, cheaper multisig, better privacy. This page is the systems-level “what and why.” The cryptographic and consensus mechanics are covered in depth elsewhere, and we link them as we go.

The problem SegWit solved (and the bonus it delivered)

Section titled “The problem SegWit solved (and the bonus it delivered)”

For years a subtle bug haunted Bitcoin: transaction malleability. A transaction’s ID is a hash of its contents — including the signature — and the signature encoding could be tweaked, by a third party, without invalidating it. Same payment, different ID. For a single on-chain payment that’s harmless. But for any protocol that references an unconfirmed transaction by its ID — exactly what payment channels need — it’s fatal: the txid you built your next transaction on could change out from under you. (Full story: transaction malleability.)

Segregated Witness (SegWit, 2017) fixed this by segregating the witness — moving the signature data out of the part of the transaction that the txid commits to. With signatures no longer inside the hashed body, the txid becomes stable before confirmation, and Lightning-style channels become safe to build. That was the real goal.

The bonus: SegWit redefined block capacity in terms of weight rather than raw bytes, and gave witness data a discount — witness bytes count as ¼ toward the limit. This effectively raised capacity without a contentious block-size increase, because the discount is itself a tightening dressed as a loosening (see the soft-fork trick below). Cheaper signatures, more transactions per block.

PRE-SEGWIT transaction SEGWIT transaction
┌──────────────────────┐ ┌──────────────────────┐
│ inputs │ │ inputs │
│ outputs │ txid │ outputs │ txid = hash of THIS only
│ signatures (in body) │ ◄─ hashes └──────────────────────┘ → stable, non-malleable
└──────────────────────┘ all of │ witness (signatures) │ ← discounted ¼ weight, NOT in txid
this └──────────────────────┘

The problem Taproot solved: privacy and efficiency

Section titled “The problem Taproot solved: privacy and efficiency”

By 2021, complex spending conditions (multisig, timelocked vaults, Lightning scripts) were common — and every one of them announced itself on-chain. A 2-of-3 multisig looked different from a plain payment, leaking information and costing extra bytes.

Taproot (2021) addressed this by combining three ideas:

  • Schnorr signatures replace ECDSA with a scheme whose signatures are linear — they can be added together. Several signers can cooperatively produce one signature that validates against one combined key (MuSig2). A 5-of-5 now looks like a single signer.
  • MAST (a Merkle tree of alternative scripts) lets you commit to many possible spending paths but reveal only the one you actually use.
  • A key-path / script-path output that, in the common case, looks like an ordinary single-key spend — and only falls back to revealing a script when a fancier condition is exercised.

The systems-level payoff: complex contracts can look identical to simple payments. That is both a privacy win (less leaks) and an efficiency win (fewer bytes, lower fees). It’s also what makes the witness cheap and roomy enough for the inscription phenomenon we cover later.

How each shipped without splitting the network

Section titled “How each shipped without splitting the network”

Here is the recurring magic: none of these upgrades forced anyone to update. Each was a soft fork — a rule change that only tightens what’s valid, so un-upgraded nodes keep accepting new blocks. The mechanism is the “anyone-can-spend” trick: a SegWit or Taproot output looks trivially spendable to an old node, while new nodes enforce the real rule (a valid witness must be present).

SAME output on the chain:
OLD node: "anyone-can-spend — looks valid, I'll accept it"
NEW node: "this is SegWit/Taproot — REQUIRES a valid witness"
→ new capability deployed, old nodes never split off

The full walkthrough — and why this only stays safe with a miner majority enforcing the new rules — is in Soft forks & anyone-can-spend.

Years are the well-known activation dates; the point is the shape of the progression, not exact blocks.

Upgrade~YearWhat it did (systems level)Deployed as
P2SH (BIP 16)~2012Let senders pay to a script hash, so the recipient carries the script’s complexity and cost. Made multisig practical.Soft fork
CLTV / CSV~2015–16Script-level timelocks — the structural beams of channels and vaults.Soft fork
SegWit (BIP 141)~2017Fixed malleability; introduced block weight + the witness discount; unblocked Lightning.Soft fork
Taproot (BIP 340–342)~2021Schnorr signatures, key aggregation, MAST — privacy + efficiency for complex contracts.Soft fork

Every row is a soft fork. That is not a coincidence; it is Bitcoin’s governing philosophy — upgrade without ever forcing a flag-day on the world.

How does this help untrusting strangers agree on one ledger? These upgrades let the rules of agreement improve over time without anyone having to agree to upgrade in lockstep. Old and new software keep sharing one chain, while the chain quietly gains a stable transaction graph (SegWit), cheaper and more private contracts (Taproot), and the headroom that layer-2 systems like Lightning need to exist at all.

  1. What exactly is transaction malleability, and why did it block layer-2 protocols that reference unconfirmed transactions?
  2. How did SegWit make the txid stable, and what bonus did the weight/witness-discount redefinition deliver?
  3. Name the three ingredients Taproot combines, and state the single systems-level payoff they produce together.
  4. Walk through the anyone-can-spend trick for a Taproot output from both an old and a new node’s view. Why was this deployable as a soft fork?
  5. Looking at the timeline, what do all four rows have in common, and what does that reveal about Bitcoin’s upgrade philosophy?