SegWit

Segregated Witness, abbreviated as SegWit, is a mechanism to scale the blockchain network. This process involves the removal of signature data from Bitcoin transactions. As a result, it can increase the block size and then attach it as a separate structure at the end. The space that got freed can then accommodate more transactions into the chain. In this article, we continue exploring scaling solutions with SegWit in focus.

SegWit divides the transaction into two separate segments by removing the signature (also called witness data) from the main data. Even after removing the signature, however, the original data continues to hold the sender and the recipient’s information.

The newly created “witness” structure holds information about signatures and script. The original data occupies the same size and counted normally whereas the new “witness” structure occupies a space that is one-fourth of its real size.

Note: Before SegWit, Bitcoin’s maximum block size was 1,000,000 bytes or 1 megabyte (MB). The Bitcoin blocks did not accept any transactions after reaching this size.

Understanding Bitcoin transactions

Bitcoin ledger is a file that stores the metadata of any initiated transaction. A Bitcoin address is generated whenever a user installs a Bitcoin wallet on their computer or mobile phone. We can create more addresses whenever we are sending or receiving coins.

With time, the number of blockchain users is increasing. This, in turn, increases the number of transactions. Effectively, the process adds all these transactions to the block, which again gets added to the chain. On average in every 10 min, one block generation takes place.

As these blocks have a size constraint of 1 MB, each block can thus hold only a few transactions. Also, the heavier the transactions, the heavier is the network. This will invariably cause a network delay in transaction processing and validation.

It is important to remember that the blockchain network comprises multiple nodes that act as an admin. Each of these nodes again consists of two components:

  1. Transaction input – Bitcoin/public address of the sender
  2. Transaction output- Bitcoin/public address of the recipient

Nodes verify that incoming transactions are correct, and also validate the signatures associated with each input.

What is SegWit?

This concept of SegWit was first explained by Pieter Wuille in 2015 at the Bitcoin conference. Wuille identified the transaction malleability constraint in the Bitcoin protocol. He also suggested the necessity of digital signature removal from the transaction data. His proposal initially created a big turmoil in the Bitcoin community before the adoption of the concept on August 23, 2017, after two years of long debate.

Whenever there is a need for change or update in a cryptocurrency, the underlying protocol needs to be updated. In this way, SegWit stands out as an enhancement to the Bitcoin protocol. It not only overcame the transaction malleability problem but has also done certain improvements to the Bitcoin protocol. However, these changes are still awaiting acceptance by the entire crypto community even as they created opponent cryptocurrencies with similar base code.

Incidentally, Litecoin, whose base code is the same as of Bitcoin protocol, applied the same changes on May 10, 2017. On the other hand, Bitcoin Cash, created by a small group of mostly China-based Bitcoin miners, were unhappy with SegWit implementation plans.

Activation

Although the SegWit code release dates back to 2015, it was only on July 21, 2017, that the concept implementation took place. It happened as a software upgrade process and is usually referred to as Bitcoin Improvement Proposal (BIP) 91.

Soon 100% of Bitcoin mining pools started to provide support for SegWit. After August 21, 2017, miners started to reject blocks that do not support SegWit. Moreover, after SegWit’s activation, the Bitcoin price jumped to approx 50% of its previous week’s value.

In the following October, the network transactions using SegWit saw more acceptance from users, with the network usage rate jumping from 7% to 10%.

Benefits of SegWit

SegWit implementation applies a soft fork change into the Bitcoin transaction, which indicates that the blockchain update happened without splitting the chain. Its benefits are many.

  • Overcome certain protocol restrictions
  • Preventing transaction malleability
  • Preventing signature malleability
  • Increasing block size – SegWit has doubled the capacity of the Bitcoin network.
  • The transaction fees for spending a SegWit output is likely lower than a legacy output transaction.
Parameters Before After
Block size 1 MB 4 MB
Transactions per second (TPS) 3 TPS 7 TPS
Transaction malleability bug Broken Fixed
SegWit and the Lightning Network

Once the transaction malleability bug in the Bitcoin protocol was addressed, there comes the era for second-layer protocols. These are the protocols that are built on top of a blockchain.

One of the more popular second-layer protocols is the Lightning Network, an off-chain micropayment network. It operates on top of the Bitcoin network. The idea behind the Lightning Network is to allow the validation of more transactions in a short amount of time, resulting in faster transactions.

In the blockchain, if only two participants care about an everyday recurring transaction, it’s not necessary for all other nodes in the Bitcoin network to know about that transaction. It is instead preferable to only have the bare minimum of information on the blockchain. This, in turn, will reduce the load on the blockchain.

Lightning Network opens up off-chain micropayment channels, which creates a relationship between two parties. In this way, scalability can be achieved using a large network of micropayment channels. And it is indeed possible to create a near-infinite amount of transactions inside this network, using this concept.

Also, don’t miss out on our previous article of this series as we explore the different scaling solutions that can speed up the transactions and lead to wider cryptocurrency acceptance.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.