SegWit
A Bitcoin protocol upgrade activated in August 2017 that fixed transaction malleability and increased effective block capacity. SegWit was a prerequisite for the Lightning Network and remains a core part of Bitcoin's current protocol.
SegWit, short for Segregated Witness, is a protocol upgrade to Bitcoin that was activated in August 2017. It addressed a longstanding technical issue called transaction malleability: a vulnerability that allowed the transaction ID to be altered before confirmation, which complicated the development of second-layer payment systems. SegWit fixed this by moving the signature data (the "witness") to a separate part of the transaction structure, outside of the data used to calculate the transaction ID.
SegWit also effectively increased Bitcoin's block capacity. By relocating signature data to a separate witness area and counting it differently toward the block size limit, more transactions could fit into each block. This helped reduce fees and network congestion without raising the raw block size limit, which had been the central point of contention in Bitcoin's block size debate — a period of significant community disagreement that led to several forks. SegWit was activated as a soft fork, meaning it was backward-compatible and did not require all nodes to upgrade immediately.
One of SegWit's most significant downstream effects was enabling the Lightning Network. The transaction malleability fix was a prerequisite for the payment channels that the Lightning Network relies on. Since its activation, SegWit adoption has grown steadily, and it remains a foundational part of Bitcoin's current protocol.
Frequently asked questions
What problem did SegWit solve?
SegWit primarily fixed transaction malleability — a vulnerability where the transaction ID could be altered before the transaction was confirmed. This was a technical blocker for the Lightning Network and other second-layer protocols. SegWit also increased the effective block capacity by restructuring how transaction data is stored, allowing more transactions per block.
Was SegWit controversial?
Yes. SegWit was activated amid significant community debate about how Bitcoin should scale. Some argued for simply raising the block size limit directly; others supported SegWit's more conservative approach. The dispute led to Bitcoin Cash forking off from Bitcoin in August 2017, around the same time SegWit activated. Bitcoin's development community chose SegWit as the preferred path forward.
How is SegWit related to the Lightning Network?
The Lightning Network requires payment channels that depend on stable transaction IDs. Before SegWit, transaction malleability made it possible to alter a transaction's ID before it was confirmed, which could break channel constructions. SegWit's fix was a prerequisite for Lightning to work reliably. Without SegWit, the Lightning Network as it exists today could not have been built on Bitcoin.