SegWit

Segregated Witness: a 2017 Bitcoin upgrade that moved signature data to a separate part of the transaction.

What is SegWit?

SegWit, short for Segregated Witness, is an upgrade to the Bitcoin protocol that was activated in 2017. It changed the transaction format so that signature data, called the witness, is stored separately from the rest of the transaction. This fixed a long-standing flaw and increased the number of transactions that fit in a block.

How it works

Before SegWit, signatures were part of the data used to compute a transaction's ID. A signature could be altered slightly without becoming invalid, which changed the ID of a transaction before it was confirmed. This problem, known as transaction malleability, made it risky to build transactions that depended on unconfirmed ones.

SegWit moves the witness out of the part of the transaction that determines its ID. It also replaced the old block size limit of one megabyte with a limit of four million "weight units", in which witness data counts less than other data. In practice, blocks can hold more transactions than before.

SegWit was introduced as a soft fork. Nodes that had not upgraded continued to accept the new blocks, so the network did not split.

Example

SegWit brought new address formats. Native SegWit addresses start with "bc1" and use an encoding called Bech32. A payment sent from such an address takes up less block weight than the same payment from an older address beginning with "1", so it generally costs a lower fee.

Why it matters

Background

SegWit arrived after years of dispute over how Bitcoin should scale. Those who preferred a straightforward increase in block size created Bitcoin Cash through a hard fork in 2017.

Common misunderstandings

SegWit is not a separate coin, and using it is optional. Old and new address types exist side by side, although very old wallet software may be unable to send to "bc1" addresses.

Related terms