- SegWit was a soft fork in Bitcoin to address the scalability issue.
- Although quite popular, SegWit got significant resistance from legacy nodes.
The popularity and acceptance of Bitcoin, as an alternative payment system, has led to an increase in its value and users, but this has come at a cost. The huge network congestion increased the transaction charges, gas fees, and validation time, often frustrating the people. Sometimes the transaction costs even reached a value that was no longer practical.
Blockchain scientists and enthusiasts traced this problem to the limited block size of the Bitcoin network. All the transactions broadcasted on the network are included in the block. However, a Bitcoin block has a limited size of 1MB and is created every 10 minutes. This was not sufficient for the many transactions being requested and they ended up in long queues, taking hours to complete.
To address this scalability issue, the SegWit soft fork was proposed. A soft fork does not lead to a split in a blockchain, which is caused due to hard forks. SegWit was proposed back in 2015, as a scalability solution, to increase the block size, reduce transaction time, and a possible solution to transaction malleability.
What is SegWit?
Any transaction on Bitcoin contains two pieces of information, the first part includes the sender and receiver’s wallet address, while another includes the witness data (unlocking signature). The segregated witness fork, segregates the witness data part from the original portion, thus removing it from the main block. Now this data is not stored on the block, making it more spacious to accommodate more transactions and address the scalability.
SegWit also introduced a new concept of block weight into Bitcoin, where the weight of each block is measured in weight units (WU). A SegWit block had a limit of 4 Million WU, whereas a non-SegWit block had only a limit of 1 million WU.
The block weight was introduced as a new consensus rule to prevent any attacks. The previous consensus rule, as observed by legacy nodes who refuse to upgrade, is that any block cannot be greater in size than 1MB. The SegWit blocks could have a size range from 1MB to even 1GB, but the previous will not address scalability and the latter will open gates for attacks. Thus, to impose a limit, a new consensus was introduced in terms of block weight. This stated that the block weight for any block is 4 Million.
The block weight is defined by:
Weight = (Transaction size without the witness data)*3 + (Transaction size)
This ensures that the block, although with SegWit transactions, submitted to legacy nodes has a size of less than 1MB and is accepted by them. This is what makes it a soft fork.
Other Benefits of SegWit
This also addressed the issue of transaction malleability. Some malicious users modified the signature attached to any transaction, either using cryptographic tricks or adding extra instructions, which changed its transaction hash. Thus, due to a new hash, the malicious user can broadcast a new valid transaction that was similar to the original.
Now, if this malicious transaction is mined, the sender will find the transaction has failed and will likely attempt the transaction again. Thus, the user receives the bitcoins twice. After SegWit, the witness signature was not included in the transaction and any malicious user could not alter it, preventing any transaction malleability attacks.
SegWit also paved the way for new developments on the blockchain network such as MAST, Schnorr Signatures, and TumbleBit. It also smoothed the path for the taproot upgrade, which aimed in increasing the network’s privacy and efficiency.
Final Thoughts
Several other cryptocurrencies have also opted for SegWit, and it was Litecoin that first adopted it. However, as mentioned it’s a soft fork, and several legacy nodes opposed its adoption which resulted in hard forks in the Bitcoin network. The most significant is the Bitcoin Cash hard fork, which took place in August 2017.
Although many major Bitcoin wallets such as Trezor, Electrum, GreenBits, and Ledger Nano S, are SegWit enabled, others are yet to add SegWit support.




