21 BTC

SegWit (Segregated Witness)

Updated Reviewed articleRandom article
In plain words

SegWit was a 2017 upgrade that moved signatures into a separate part of the transaction. It fixed a long-standing bug, made room for more transactions and opened the door to the Lightning Network.

Short definition

Protocol upgrades (2017 / 2021) that made transactions cheaper and more flexible.

What changed

Signatures (the “witness”) moved out of the part of the transaction that is hashed into its ID. This fixed transaction malleability: a third party could no longer change a transaction's ID before confirmation, which chains of unconfirmed transactions such as Lightning channels depend on.

Block size became block weight: up to 4,000,000 weight units, with witness bytes counted at a quarter. Old nodes still see valid blocks under 1 MB, so the change was backward-compatible (a soft fork). BIP 143 also fixed quadratic signature hashing, and BIP 173 introduced bech32 addresses starting with bc1q.

Activation

Activation was contested during the 2015–2017 block-size debate. SegWit locked in during August 2017 and activated at block 481,824 on 24 August 2017. A group that wanted bigger blocks instead split off on 1 August 2017 as Bitcoin Cash.

From the Bitcoin Museum

SegWit activates (block 481,824) (24 Aug 2017): Segregated Witness, a soft fork, activates. It fixes transaction malleability and opens the way to Lightning.

SegWit in the museum Glossary on the Learn page

See also

References

  1. BIP 141 (github.com/bitcoin/bips) github.com
  2. BIP 143 (github.com/bitcoin/bips) github.com
  3. BIP 144 (github.com/bitcoin/bips) github.com
  4. BIP 173 (github.com/bitcoin/bips) github.com
  5. Block 481,824 on mempool.space mempool.space