What Is SegWit (Segregated Witness)?
SegWit is the process by which the block size limit on a blockchain is increased by removing signature data from bitcoin transactions. When certain parts of a transaction are removed, this frees up space or capacity to add more transactions to the chain.
Segregate means to separate, and witnesses are the transaction signatures. Hence, segregated witness, in short, means to separate transaction signatures.
- SegWit is an action pertaining to Bitcoin that is designed to help increase the block size limit on a blockchain.
- SegWit helps increase the block size limit by pulling signature data from Bitcoin transactions.
- The term SegWit refers to segregate, or separate, and to witnesses, which are the transaction signatures.
Understanding SegWit (Segregated Witness)
The bitcoin blockchain consists of multiple systems distributed across a peer-to-peer network. These systems are called nodes and serve as the administrators of bitcoin transactions. All transactions made in bitcoin are duplicated across these nodes, making it virtually impossible to hack into and corrupt a transaction.
The transaction data that is shared across the multiple nodes consists of two components—inputs and outputs. There could be one or multiple inputs and outputs involved in a transaction. The output is the public address of the recipient. The input is the public address of the sender. The sender needs the recipient’s public address in order to send funds to them. The majority of space in a transaction consists of a signature, a part of the input, which verifies that the sender has the required funds to make a payment. So in effect, a bitcoin moves from inputs to outputs for each transaction transmitted. Once each of the nodes has verified the transaction as valid, the transaction is included in a block that is added to the chain or the general ledger for public access.
The concept of SegWit was formulated by bitcoin developer Pieter Wuille.
Bitcoin Platform Challenges
One of the problems that the bitcoin platform faced in the past is that, as more and more transactions are being conducted, more blocks have to be added to the chain. Blocks are generated every 10 minutes and are constrained to a maximum size of one megabyte (MB). Due to this constraint, only a certain number of transactions can be added to a block. The weight of the transactions, represented by the blocks, is weighing down the network and causing delays in processing and verifying transactions, in some cases, taking hours to confirm a transaction as valid. Imagine all bitcoin transactions that have been carried out since the inception of bitcoin in 2009 sitting on the blockchain and still piling up. In the long term, the system would not be sustainable if a radical change was not made.
On a basic level, SegWit is a process that changes the way data are stored, therefore helping the Bitcoin network to run faster and more smoothly.
SegWit Proposed as a Solution
Bitcoin developer Dr. Pieter Wuille suggests that to solve this problem, the digital signature needs to be segregated from the transaction data. This process is known as Segregated Witness or SegWit. Digital signature accounts for 65% of the space in a given transaction. SegWit attempts to ignore the data attached to a signature by stripping off the signature from within the input and moving it to a structure towards the end of a transaction. This would increase the one MB limit for block sizes to a little under four MB. In addition to slightly increasing the capacity size of blocks, SegWit also solves the problem where a receiver could intercept and modify the sender’s transaction ID in a bid to get more coins from the sender. Since the digital signature would be detached from the input, the unscrupulous party would have no way of changing the transaction ID without also nullifying the digital signature.