I have been noticing on many online bitcoin districts that various users are unable to understand the concept of Segregated Witness. This post will clear up any doubts, uncertainties, and myths regarding SegWit.
So, what happens in SegWit?
SegWit is short for Segregated Witness and it’s a proposal presented by the developers of Bitcoin Core. Originally it was aimed to solve the transaction malleability, which is a well-known weak spot in the Bitcoin system. The idea behind SegWit is that the signatures in a transaction, also known as the “witness data” are skipped when calculating the transaction id.
Basically, SegWit will update the 1MB size block limit to 4-million unit block weight limit. This counts serialized
witness data and one unit and core block data as four units. This is an entirely new transaction format, meaning the block size is increased. SegWit counts each byte in a witness as 0.25 bytes towards the 1MB block limit, thus the maximum size of a block becomes just under 4MB.
It’s not that the data gets smaller, it’s just counted in a way that allows for the block limit to be increased.
The short/easy version
In simple words, signature related data is removed from bitcoin transactions, causing them to appear smaller in size. Also, making the block size smaller, further, allowing more transactions to take place.
Clearing up myths and rumors
Myth: SegWit as a soft fork is much more dangerous than a hard fork
A soft fork ensures that the backward and forward compatibility is under control. Also, when a soft fork is set up, old versions of Bitcoin software will be able to function without any faults. On the other hand, a hard fork requires every Bitcoin user to update to the new software to support the consensus rules. Any user that fails to upgrade to the new software might be under the risk of getting thrown off the Bitcoin network.
Myth: SegWit is more complicated than a super simple hard fork
Similar to a hard fork, SegWit proposes the same idea of increasing the block size limit. No doubt, it is pretty complex and introduces several changes, but it is a relatively simple conceptual change. Basically, SegWit ignores the signatures when calculating the transactions, but as a soft fork, some additional changes must be made to make SegWit transactions compatible with non-segwit nodes. These changes then have side effects which can be beneficial to Bitcoin. It also contains more functionality than a hard fork increasing the block size limit. The hard fork to increase the block size limit also appears simple, but additional changes need to be made to support the deployment and to solve the quadratic hashing issue with transactions.
Myth: Miners who don’t upgrade to segwit will be forcefully told to quit the bitcoin network
This is false since SegWit will be deployed using the BIP9 versionbits which uses a 95% threshold. A miner would not run into any trouble, as long as he follows certain rules. However, if he fails to follow these rules, he could end up with transactions including witnesses but he wouldn’t be having the witnesses nor the witness root hash in the Coinbase. This would be an invalid block that would be in the orphan pool.
What are the benefits of SegWit?
Besides the obvious benefit of having to increase the capacity, there are several other benefits that come with the introduction of SegWit. Some of those benefits are:
- Node performance is tested based on how weighting data
- Signature covers value
- Linear scaling of sighash operations
- MultiSig gets more security
- Script versioning
- Increased security to almost-full-nodes
Why hasn’t SegWit been activated yet?
If there is not enough support shown, it might result in a contentious fork. That means a part of the network switches to the new client while some remain to use the older version. This leads to two sets of cryptocurrencies with different rules, co-existing and competing for users and legitimacy.
In order to avoid such a situation, the developers of SegWit have programmed a specific rule in the software proclaiming that it will only activate once it reaches the 95% mark.
Currently, the support is hovering around 32-33%.