BOMBARCHIVE
Explore

A living reference collection. Written in the wiki, preserved in Git.

The archiveBitcoin

Old revision: Segregated Witness

archive: connect SegWit and Taproot inscription substrate

Segregated Witness (SegWit) is the Bitcoin soft fork that introduced a separate witness serialization, a witness-aware transaction identifier, block weight, versioned witness programs, and a witness commitment anchored through the coinbase transaction. Its mainnet consensus rules became active at block 481,824 on 24 August 2017.

The idea

Pieter Wuille presented “Segregated witness and its impact on scalability” at the Scaling Bitcoin Hong Kong workshop on 7 December 2015. In the contemporary transcript he separated transaction effects from the signatures that prove authorization, described a soft-fork route for moving those signatures into a new witness structure, and proposed discounting witness bytes in the block resource calculation. Scaling Bitcoin transcript — contemporary first-party presentation

BIP 141, by Eric Lombrozo, Johnson Lau, and Pieter Wuille, was assigned on 21 December 2015. It defines the witness structure and consensus-layer changes. BIP 141 — standards record

What changed

txid and wtxid

BIP 141 keeps the legacy txid definition over the non-witness serialization and adds a wtxid over a serialization that includes witness data. For a transaction with no witness programs, the two identifiers are equal. BIP 141 — standards record

This addresses unwanted third-party transaction malleability for spends using SegWit correctly. That is narrower than saying a transaction can never be changed: participant-authorized changes and sighash choices remain separate questions.

Witness programs

SegWit gives a scriptPubKey or P2SH redeemScript a new meaning when it is a version byte followed by a 2-to-40-byte program. Version 0 defines P2WPKH and P2WSH. Versions 1 through 16 were deliberately left without further interpretation so later soft forks could assign new rules to them. BIP 141 — standards record

That reserved-version design became important later. Taproot uses witness version 1 rather than inventing an unrelated transaction family.

Block weight

SegWit replaced the old one-number block-size rule with a 4,000,000 weight-unit limit. BIP 141 defines block weight as:

base size × 3 + total size

Because total size already contains the base bytes once, non-witness bytes effectively count four weight units each while witness bytes count one. BIP 141 — standards record

This is the “witness discount.” It is not free storage. Witness data still consumes block weight and remains subject to Bitcoin's active consensus and script rules.

Witness commitment

A block containing witness data commits to the witness transaction identifiers through a witness Merkle root. BIP 141 places the commitment in an OP_RETURN output of the coinbase transaction and combines that root with a 32-byte reserved value from the coinbase input's witness. The coinbase's own wtxid is treated as all zeroes for this calculation. BIP 141 — standards record

This is the soft-fork trick in concrete form: upgraded nodes enforce a new commitment while the legacy block header format remains unchanged.

New signature digest for witness v0

BIP 143 defines the signature-hash algorithm used by version 0 witness programs. Among other changes, it commits to the value of the output being spent and permits reusable intermediate hashes that avoid the older quadratic hashing pattern for large transactions. BIP 143 — standards record

SegWit is therefore not merely a relocation of signatures. It also creates a versioned execution surface where new signature semantics can be introduced for users who opt into new output types.

Deployment and activation

Bitcoin Core 0.13.1 was released on 27 October 2016 with the mainnet activation parameters for SegWit. Its release notes describe BIP 9 signaling on bit 1, with a 95% threshold over a 2,016-block retarget period and a further retarget period between lock-in and activation. Bitcoin Core 0.13.1 — contemporary first-party release · BIP 9 — standards record

The eventual 2017 activation path had additional machinery around that original deployment.

  • BIP 148, assigned 12 March 2017, specified that participating nodes would reject non-SegWit-signaling blocks from 1 August while the existing SegWit deployment remained neither locked in nor active. BIP 148 — standards record
  • BIP 91, assigned 22 May 2017, specified a lower-threshold signaling deployment whose active state required blocks to signal the existing SegWit bit. Its stated purpose was to cause the original BIP 9 SegWit deployment to reach activation without redefining SegWit itself. BIP 91 — standards record
  • Contemporary reporting records BIP 141 locking in on 9 August 2017 after the signaling threshold had become inevitable the day before. Contemporary secondary chronology
  • SegWit's rules became active from block 481,824 on 24 August 2017. Current Bitcoin Core preserves 481824 as mainnet SegwitHeight; a contemporary activation report records the civil-date milestone. Bitcoin Core chain parameters — primary software record · Contemporary activation report

The archive keeps causation modest here. BIP 91 and BIP 148 are direct records of different attempts to force or coordinate signaling around the already-deployed BIP 141 rules. The fact that SegWit ultimately activated through the original BIP 9 state machine should not be rewritten into a claim that the surrounding activation conflict was irrelevant.

Software support was not the same as consensus activation

Activation meant upgraded nodes began enforcing the new rules. It did not mean every wallet immediately created native SegWit outputs.

Bitcoin Core 0.16.0 later described itself as introducing full SegWit support in the wallet and user interfaces, including address-type selection and Bech32 support. Bitcoin Core 0.16.0 release notes — first-party software record

Consensus availability, node deployment, wallet creation support, and actual transaction usage therefore belong on different historical clocks.

Why Ordinals cares

Inscriptions do not use SegWit version 0. Their reveal transactions use Taproot script-path spends, and Taproot is a later witness-version upgrade.

The dependency chain is nevertheless real:

  1. SegWit introduced the witness serialization and versioned witness-program framework.
  2. Taproot assigned new meaning to witness version 1 and introduced Tapscript/script-path spending.
  3. Ordinals inscriptions place their envelope and body inside that Taproot reveal witness.
  4. Those witness bytes consume Bitcoin block weight at witness weight rather than non-witness weight.

The weight distinction is economically important to inscription practice, but it should not become “Ordinals exploit free space.” An inscription reveal pays fees for a transaction whose witness bytes consume block weight under exactly the resource rule SegWit introduced.

Open research

Open question
Pin the first mainnet transaction that actually spent a SegWit output after block 481,824 and preserve the transaction, output type, and confirmation height as a chain artifact rather than relying on later explorer summaries.
Open question
Build an adoption timeline that separates consensus activation, node support, P2SH-wrapped SegWit, native Bech32 wallet support, and real transaction share instead of using “SegWit adoption” as one number.
Open question
Preserve the most consequential primary activation discussions around BIP 148, BIP 91, and SegWit2x without allowing later political retellings to overwrite what each proposal actually specified at the time.