What is SegWit (segregated witness)?

The 2017 Bitcoin upgrade that moved signature data out of the main transaction body, fixing transaction malleability and effectively raising block capacity.

Not yet verifiedHow we verify

3 min read

In this entry

The 2017 Bitcoin upgrade that moved signature data out of the main transaction body, fixing transaction malleability and effectively raising block capacity.

BIP-141 replaced the one-megabyte block size limit with a four-million weight-unit limit, counting witness data at a quarter weight (source: BIP-141). Legacy addresses still work and always will, so adoption was opt-in and took years.

The upgrade is usually remembered for the capacity increase, which was the contentious part at the time. The more consequential change was fixing malleability, because that is what made payment channels practical and therefore made the lightning network possible.

How it works

  1. Witness data is separated. Signatures move out of the part of the transaction that determines its identifier and into a witness section.
  2. The identifier stops being malleable. Previously a third party could alter a signature's encoding, changing the transaction id without changing what the transaction did. That broke any protocol that referenced an unconfirmed transaction by its identifier.
  3. Capacity is measured in weight units. The one-megabyte limit became a four-million weight-unit limit, with witness data counted at a quarter of its raw size (source: BIP-141). Effective capacity rose without a hard block size increase.
  4. Fees follow the same weighting. Because charges are per virtual byte, spending from a SegWit address costs less than spending the same value from a legacy address. See sat vb.
  5. It was a soft fork. Old nodes still accept the new blocks, so nobody was forced to upgrade. See soft fork.

Addresses beginning "bc1q" are SegWit and "bc1p" are taproot, which builds on the same foundation. Older addresses beginning "1" are legacy and "3" are usually script addresses, which may wrap SegWit.

Example

Illustrative fee comparison for the same transfer at 20 sat/vB.

Address typeApproximate sizeFee at 20 sat/vB
Legacy (1 input, 2 outputs)226 vB4,520 sats
SegWit (1 input, 2 outputs)141 vB2,820 sats

Illustrative sizes; exact figures depend on script structure.

The same value moves in both cases. The SegWit transaction costs roughly 38% less because its witness data counts at a quarter weight. An exchange still paying out from legacy outputs therefore pays more in fees than it needs to, and where that cost is passed through as a flat withdrawal fee, customers pay it.

Why it matters when you buy

Two practical points. Withdrawing to a SegWit address costs less to spend later, so it is worth generating one rather than accepting an older default. And some exchange withdrawal forms still reject "bc1" addresses, which is a venue limitation rather than a problem with your wallet. The fee comparison covers withdrawal charges and moving crypto off an exchange covers the transfer.

sat vb — the fee rate weighting affects; taproot — the upgrade built on top; lightning network — enabled by the malleability fix; soft fork — how it was deployed; transaction id — what malleability used to change; network fee — what you actually pay.

Questions

Do I have to use SegWit?

No. Legacy addresses remain valid permanently. Using SegWit lowers the fee to spend your coins later, which is why most modern wallets default to it.

Why does my exchange reject bc1 addresses?

Because support was never added. It is a venue limitation, not a fault in your wallet. Withdraw to a different address type from the same wallet as a workaround.

Did SegWit increase the block size?

Not directly. It replaced the size limit with a weight limit that counts witness data at a quarter, which raised effective capacity without changing the one-megabyte rule that old nodes enforce.