Understanding Segregated Witness (SegWit) on Bitcoin [BTC] and Litecoin [LTC]
SegWit (Segregated Witness) came to effect on the Bitcoin Network on 23, August 2017. Pieter Wiulle was the first person to present the innovative SegWit (Segregate Witness) proposal in December 2015.
The block size of 1 MB limited the transaction speed of Bitcoin to 7 transactions per second (tps). It was as an alternative solution to increasing the Bitcoin block size to the long-standing scaling problem.
Segwit was first activated on Litecoin in April 2017, followed by Bitcoin in August same year.
The Problem of Scaling on Bitcoin
During the early phases of time after the release of Bitcoin, the block size of Bitcoin was adequate for the quantum of transactions on it. However, as Bitcoin gained traction over the years, the number of transactions also increased at a fast pace.
In a blockchain, when a transaction occurs, the miner needs to validate the transaction by putting the transaction data into the blocks they have mined. In return for confirming a transaction, the miners get a transaction fee. The blocks have a size limit of only 1 MB to avoid any denial of service (DDoS) by hackers; put, DDoS any fraudulent transaction inside the block.
However, as the number of transaction per second (tps) on the network soon became inadequate. This caused a long list of unconfirmed transactions on Bitcoin. The average time increased from 10 minutes to almost 30-40 minutes. The fees also rose considerably to a limit that it became unfeasible to use Bitcoin as a means of payment.
Understanding Bitcoin Signatures
Before digging deeper into SegWit, the intricacies of Bitcoin transactions must be revisited. There are two parts to a Bitcoin transaction:
- one the receiver’s and sender’s addresses with the associated amount,
- and the other part is comprising of the signature or the witness information.
One of the reasons owing to its slowing down is the signature data that has to be inserted into the block and takes up almost 65% space inside the block.
The signature is unique to every transaction sent even from a particular Private Address, and a new signature is generated every time a transaction is proposed to the network. The miners or nodes on the system then verify the signatures, thus confirming the transfer of the ownership of Bitcoins from the sender to the receiver.
How Does SegWit work?
With SegWit, it was proposed to remove the signature information and store it another block called an ‘extended block.’ Hence, the transaction block will consume less space, and a higher number of transactions can be included in each block.
SegWit also introduced another concept called the ‘block weight.’ It weighs the block size ‘with and without’ the address. Hence, without the witness part, the block size of Bitcoin increases four times. Nevertheless, the size of the base transaction block is still capped at 1MB.
There are several advantages to SegWit that include increasing the number of transactions in a block, lowering the transaction fee, faster confirmation of transaction due to lesser waiting time, adoption of Lightning Network(LN) and removing transaction malleability.
Nevertheless, miners are still not adopting SegWit fearing of a lower transaction fee. However, as more and more wallets include SegWit, the usage of the SegWit structure will increase, significantly increasing the volume of transactions to favor the miners.
Furthermore, Lightning Network implementation requires Segwit blocks to set up channels. Hence, it can be considered as a development phase in Bitcoin [BTC] with initial benefits.