BIP141
BIP141, formally known as Segregated Witness (SegWit), is a Bitcoin Improvement Proposal that fundamentally altered the way transaction data is stored within a Bitcoin block. Introduced in Bitcoin version 0.13.0, its primary goal was to address the issue of transaction malleability and to increase the effective block size without a hard fork. The core innovation of BIP141 is the separation of transaction signatures, known as "witness data," from the main transaction body. This witness data is then moved to a separate data structure at the end of the block. By separating this data, the original transaction ID (txid) remains unaffected by signature changes, thereby solving the malleability problem. Furthermore, this separation allows nodes to validate transactions more efficiently as they can discard the witness data after validation, reducing the storage burden. It also indirectly increased the capacity of blocks. While the nominal block size limit remains 1 megabyte, the SegWit structure allows for a greater effective capacity by treating witness data differently in the consensus rules. This was implemented through a soft fork, meaning that older nodes that do not support SegWit can still validate blocks containing SegWit transactions, although they do not gain the full benefits of the upgrade. Adoption of SegWit has been gradual, with wallets and services increasingly migrating to support it.