Segregated Witness Simplified.

Geet Sameer
Coinmonks
5 min readMar 10, 2018

--

The Cryptocurrency world is abuzz with a new word called Segregated Witness (SegWit) since the implementation of SegWit in the Bitcoin Network in August 2017. Many cryptocurrency experts are heralding SegWit as the panacea for Bitcoin problems. As the world is going gaga over this new technology, many are left wondering what it means. This article covers everything one needs to know regarding Segregated Witness. So let’s get started.

Segregated Witness( SegWit):

Before we look at the definition of Segregated Witness, let’s go back to the Bitcoin History for a better understanding of SegWit.

Blockchain:

Bitcoin is developed in 2009 as a decentralized platform to carry out peer-peer transactions without the need of a central regulatory. All the transactions are carried on Blockchain. In simple terms, a blockchain is a network where all the bitcoin transaction data and bitcoin itself (technically speaking- there are no bitcoins, in reality, it’s all ledger balances in the blockchain network) gets stored.

Let’s understand, behind the scenes in bitcoin blockchain transaction with an example.

A wants to send 1 Bitcoin to B.

For a regular fiat currency (paper money) online transaction, A should have an account number, transaction password( or PIN) to send the money and of course money in his bank account. And also A needs B’s bank account number.

Similarly to send Bitcoins A needs an address( which is similar to the bank account), a private key(identical to transaction password or PIN) to sign the transaction data digitally, and also A needs the address of B( similar to the bank account).

So when A sends 1 Bitcoin to B, the information goes to blockchain network for verification. What information goes to the network is illustrated below for your better understanding.

Verification of transaction:

Verification of Transaction on Blockchain:

As we learned earlier bitcoin is not centrally regulated. Then Who verifies the transactions? The answer is bitcoin miners. Who are miners? Miners can be anyone. It can be you or I who verifies the bitcoin transactions using powerful computers. What do miners get in return? Miners are rewarded with Bitcoins for successful verification of each transaction.

Let’s look how the verification of the transaction is done on the blockchain.

So first the miners check whether A has sufficient funds that is 1 bitcoin( As told earlier all the information of bitcoin data and bitcoin itself is stored in Blockchain network.)

Now the question arises, how do the miners know how many bitcoins A have?

Simple. Using the digital signature on the transaction data and the Address of A, the miners run different algorithms on their computer to connect to the place where A’s bitcoins are stored in the blockchain network. If A has the required bitcoins then based on the transaction data (send 1 bitcoin to B), the bitcoin is transferred to B.

This is how a transaction is verified on the blockchain.

Now that we are clear on what constitutes a transaction and how it is verified let’s understand Segregated Witness.

What is Segregated Witness(SegWit)

SegWit is formulated by Dr. Pieter Wuille. Segregated means separation, witness means digital signature. Segregated Witness is a process by which the block size limit is increased by segregating the digital signature from the original data.

What does this imply?

As seen earlier any transaction contain digital signature plus original data that is the address of both sender and receiver and the transaction data. The segwit process separates the digital signature from data and moves it to a structure towards the end of the transaction to reduce the size of the transaction, as the digital signature occupies 65% of the transaction space.

Why SegWit:

Ok, now let’s understand why SegWit is implemented in blockchain to increase the block size.

Before we go into it, let’s understand what a block is.

For any transactions to get verified it needs to be entered into a block.

The original bitcoin block size is only 1 Mb.

The increased usage of bitcoins for payments due to its popularity has resulted in substantial transactions piling up for verification(As told earlier for any transaction to be verified, first it needs to be added to a block).

As you see A’s transaction is put in waiting line (also known as Mempool in cryptocurrency dictionary). And there is only one more transaction that can be entered into the present block. If A wants his transaction to be verified fast, he has to pay higher transaction fee than others before him in the waiting line. That way his transaction gets recorded in the block before the other two and gets verified.

These cut in lines resulted in higher transaction fees which profited the miners and exchanges with the actual bitcoin user at a loss.

To address this scalability issue, Segregated Witness process increases the block size limit(the number of transactions added to a block)without actually increasing the block size (1Mb) by removing the digital signature (which occupies 65 % of the transaction volume) and adding it to the end of the transaction.

Advantages of Segregated Witness:

  • Scalability — Increase in block size limit increases the number of transactions that get verified per second.
  • Malleability- Since the digital signature is detached from the input, the hacker can’t change the transaction without also nullifying the digital signature which makes it impossible to alter the data and steal bitcoins.

Get Best Software Deals Directly In Your Inbox

SegWit Vs. SegWit2x:

The segwit process increases the block size limit without increasing the actual size of the block (1Mb). Whereas proposed SegWit2X increases the block size from the present 1Mb to 2 Mb.

SegWit was implemented as a soft fork in the bitcoin blockchain on 24th August 2017. Proposed SegWit2x is the hard fork in the bitcoin blockchain. SegWit2x could not be implemented as there are no backers.

Platforms which adapted Segregated Witness:

Segregated Witness was implemented on 24th August 2017 in bitcoin blockchain. SegWit has also been implemented in currencies such as Litecoin, DigiByte, and Vertcoin.

Click to learn more about blockchains

--

--

Geet Sameer
Coinmonks

Triocube Inc , @HeapX. Blockchain / Wallet Developer.