All the cryptocurrencies available in the market run on a standard set of protocols. The protocol guides how a cryptocurrency needs to be worked. However, the protocol needs to be changed when crypto needs any improvement or update. Now, Segwit is also an update made in the Bitcoin protocol in 2017.
Origin Of Segwit
In 2015, Pieter Wuille first presented the idea of Sigwit. He is a Bitcoin developer and co-founder of Blockstream (a software company that provides digital security in financial services).
According to Wuille, SegWit was the solution to the issue of transaction malleability in the Bitcoin protocol. His proposal was accepted after almost two years, and segwit was activated on August 23, 2017. Segwit was also updated in the Litecoin protocol after some time as it shares the common problem of transaction malleability with the bitcoin protocol.
What Is Segwit?
SegWit is an acronym for segregated witness. It refers to a change in the Bitcoin transaction format. SegWit allows the block size limit on a blockchain to be expanded by removing signature data from bitcoin transactions. When parts of a transaction are removed from blocks, space or capacity is freed up for more transactions to be added to the chain. Its goal was to reduce transaction latency and protect against transaction malleability by increasing block capacity. The term “transaction malleability” refers to the possibility of changing small parts of transaction data, invalidating new cryptocurrency blocks.
Storing more transactions in a block was also meant to speed up the validation process. Segwit also led to the implementation of Taproot, another upgrade to Bitcoin that allows even faster validation of transactions.
A SegWit transaction is divided into two parts:
- SegWit Transaction Part: A transaction’s witness is categorized as a SegWit transaction part.
- Non-SegWit Part of Transaction: All other parts of a transaction, excluding the witness, are categorized as Non-SegWit.
How Does It Work?
- SegWit bitcoin block size became 4 MB. The 1MB non-SegWit block consists of data such as input, output, signatures, etc.
- The SegWit block, on the other hand, is composed of a base transaction block and an extended block.
- The digital signature is moved outside of the primary transaction block in the Segwit block structure. As a result, if the signature on the transaction is changed, the transaction id is unaffected. This resolves the issue of transaction malleability.
- It reduces the amount of fundamental transaction data in the block. Because witness data can account for up to 65 percent of the transaction’s total size, putting it outside the base transaction block allows more transactions to fit into a 1MB block.
- The concern now is why the block size wasn’t increased directly to 4 MB. And the answer is that Bitcoin specifies that block sizes cannot exceed 1MB. So, the bitcoin developer comes up with a solution that does not require a hard fork. Under the current protocol, a solution consisting of a 1MB block and a 3MB “extension” is allowed. As a result, the legacy node can take 1MB blocks, whereas the SegWit node may accept 1MB extended blocks totaling 4MB. This is referred to as a soft fork. A soft fork is a change that does not result in creating a new blockchain, whereas a hard fork does.
- Another distinction between the two blocks is that SegWit blocks are measured by weight, and legacy blocks are measured by size.
Pros :
- The Bitcoin blockchain became lighter thanks to SegWit. It enables the processing of more transactions without increasing the total size of the Bitcoin blockchain.
- Faster transactions equal lower transaction costs. Thus, Segwit aided in the reduction of transaction fees.
- SegWit is a clever and straightforward solution to the Bitcoin protocol’s significant transaction malleability problem.
- Bitcoin must solve the challenge of scalability if it wants to service a network of millions of individuals. SegWit aids in the implementation of scalability schemes such as the lightning network.
Cons :
- Several hard forks have resulted from the disagreements over SegWit. The Bitcoin Cash hard fork, which occurred on August 1, 2017, was the most well-known of these forks. On November 15, 2018, Bitcoin Cash forked again, increasing the network’s block size limit from 1MB to 8MB.
- Many miners dislike SegWit. Lower fees impact their earnings, and they don’t like having to sustain the witness-data sidechain, which generates no revenue for them.
- Some Bitcoin developers believe the SegWit protocol does not go far enough to address the scalability issue. They say that only significant improvements to the Bitcoin blockchain’s size and transaction processing will enable the platform to scale.
Conclusion
Pieter Wuille introduced SegWit to address the issues surrounding transaction malleability. However, SegWit outperformed expectations regarding transaction size, malleability, and transaction fee. Bitcoin is a relatively new technology. Although it is the world’s largest cryptocurrency, some wonder if it’s still the greatest, as other blockchain initiatives continue to introduce advanced crypto technology. Some consider SegWit Bitcoin to be a good thing for the network. On the other hand, others see it as a representation of Bitcoin’s limitations.