Loading data...

SegWit

Protocol

Bitcoin upgrade separating witness data and changing block capacity accounting.

SegWit, short for Segregated Witness, is a Bitcoin protocol upgrade that separates signature-related witness data from the traditional transaction structure. It also introduced block weight as a new way to measure capacity. SegWit activated on Bitcoin in 2017 through a backward-compatible soft fork.

Before SegWit, signatures were included in the data used to calculate a transaction identifier. In some cases, a third party could alter the signature encoding without invalidating the payment, changing the transaction ID before confirmation. SegWit prevents this form of transaction malleability for transactions whose identifiers do not depend on unconfirmed legacy inputs, making chains of unconfirmed transactions more predictable.

The upgrade matters because reliable transaction identifiers support higher-layer protocols such as the Lightning Network. Payment channels depend on pre-signed transactions that may need to be broadcast later. SegWit removed a major source of uncertainty and added a versioned witness-program design that made later upgrades, including Taproot, easier to introduce.

SegWit also changed capacity accounting. Blocks are limited by weight units rather than a simple one-megabyte serialized size, and witness data receives a discount in that calculation. This can fit more transaction activity into a block. Users often pay lower fees when spending SegWit outputs because their transactions have a smaller virtual size, although network demand still determines the required fee rate.

Address formats help wallets create appropriate outputs. Nested SegWit can use addresses beginning with 3, while native SegWit commonly uses Bech32 addresses beginning with bc1q on Bitcoin mainnet. Taproot addresses begin with bc1p and use a later witness version. Address prefixes alone should not replace full recipient verification, and users must select the correct network.

Most modern wallets support SegWit, but exchanges and old software may differ. Users should confirm deposit and withdrawal support, check the address on a trusted screen, and test a small amount when compatibility is uncertain. SegWit did not create a separate coin or increase Bitcoin's supply. It refined transaction structure, security, upgradeability, and block-space efficiency under the same network rules.

Developers parsing Bitcoin transactions must account for witness serialization and distinguish transaction identifiers from witness transaction identifiers. Fee estimation should use weight or virtual bytes rather than raw serialized size alone. Incorrect assumptions can cause underpriced transactions, misleading explorer displays, or interoperability problems. Established Bitcoin libraries and test vectors are safer than custom transaction parsing.

Frequently asked questions

  • Segregated Witness moved signatures and related unlocking data into a separate witness structure, changed block accounting from bytes to weight units, and fixed transaction-ID malleability for transactions that do not depend on unconfirmed legacy inputs. It also introduced a versioned witness-program framework. These changes enabled more efficient transactions and made protocols such as the Lightning Network easier to build reliably.
  • No upgrade is mandatory merely to keep existing bitcoin. To receive using SegWit, choose a wallet that supports compatible nested addresses beginning with 3 or native SegWit addresses commonly beginning with bc1q. Taproot uses bc1p and is also a witness version. Confirm sender support and test unfamiliar services, because older software may not recognize newer formats.
  • Bitcoin measures SegWit transactions using weight, where witness data receives a lower contribution than equivalent non-witness data. Wallets charge by virtual size and fee rate, so spending SegWit outputs usually requires fewer virtual bytes than comparable legacy inputs. Actual savings depend on input and output types, transaction structure, wallet coin selection, and current demand for block space.