Segregated Witness (SegWit) is an upgrade protocol developed in 2015. This concept was introduced to solve the scalability issues currently faced by blockchain networks.
On average statistics, the Bitcoin network verifies a new block every 10 minutes, and each block contains several transactions. In this way, the block size directly affects the number of transactions that can be confirmed in each block. Currently, the Bitcoin blockchain is capable of processing approximately 7 transactions per second.
The main idea of Segregated Witness is to reorganize block data so that signatures are no longer stored together with transaction data. In other words, the SegWit upgrade includes isolating validators (signatures) from transaction data. This enables more transactions to be stored in a single block, thereby increasing the network’s transaction throughput.
Since only about 7 transactions can be processed per second, Bitcoin transactions can sometimes take a long time to complete. Much slower than traditional payment solutions and financial networks, which can handle thousands of transactions per second.
Segregated Witness was developed and upgraded in 2015 by Bitcoin developer Pieter Wuille and other Bitcoin Core contributors. In August 2017, the Segregated Witness upgrade was implemented as a soft fork on the Bitcoin network.
Today, there are several cryptocurrency projects using the Segregated Witness protocol, including Bitcoin and Litecoin. The protocol upgrade brings many advantages, such as increased transaction speed and block capacity. Additionally, SegWit solves the so-called transaction malleability problem (discussed below).
One of the biggest advantages of Segregated Witness is the increase in block capacity. By removing signature data from transaction inputs, more transactions can be stored in a block.
A transaction consists of two main parts: input and output. Essentially, the input contains the sender's public address, and the output contains the receiver's public address. However, the sender must prove that they have transferred the funds, and a digital signature must be used.
Without Segregated Witness, signature data can occupy up to 65% of a block. Using Segregated Witness, signature data is removed from the input of the transaction. This increases the effective block size from 1 MB to approximately 4 MB.
Please note that SegWit is not just an increase in block size. Rather, it is an engineering solution to increase the effective block size without increasing the block size limit (which would require a hard fork). More specifically, the actual block size is still 1 MB, but the effective block size is limited to 4 MB.
In addition, Segregated Witness also introduces the concept of block weight. We can think of block weight as an alternative concept to block size. Essentially, block weight is a unit of measurement that includes all block data: including transaction data (1 MB) and signature data (maximum 3 MB), which are no longer part of the input fields.
In addition to being able to store more For multi-transaction blocks, Segregated Witness can also increase transaction speed because a large amount of transaction data may be stored in the blockchain. Even if the block generation time is the same, more transactions can be accommodated in the block, so the TPS will be higher.
Improving transaction speed can also help reduce transaction costs on the Bitcoin network. Before the implementation of Segwit, each transaction fee was mostly over $30. However, with the implementation of SegWit, transaction costs were significantly reduced to $1 per transaction.
Bitcoin faces Another major problem is tampering with transaction signatures. If the signature is tampered with, it could cause the transaction between the two parties to be compromised. Since the data stored on the blockchain is effectively immutable, invalid transactions are permanently stored on the blockchain.
With SegWit, the signature is no longer part of the transaction data, eliminating the possibility of changing this data. This fix supports further innovation within the blockchain community, including layer 2 protocols and smart contracts.
By fixing transaction scalability issues, it is required Develop layer 2 protocols. Simply put, a layer 2 protocol is a new platform or product built on top of a blockchain such as Bitcoin. One of the more popular layer 2 protocols is the Lightning Network, an off-chain, offline payment network.
The Lightning Network is a second-layer protocol that runs on the Bitcoin network. The main purpose of the Lightning Network is to support the confirmation of more transactions in a shorter period of time, thereby bringing faster transactions to users. Transactions are collected off-chain, effectively buffering them for final processing by the Bitcoin network.
The Lightning Network was originally developed for Bitcoin. However, several other cryptocurrency and blockchain projects are also working on implementing the technology. This will not only reduce validation time but also facilitate the development of solutions to scalability issues.
SegWit is a soft fork upgrade, which means it supports backward compatibility. In other words, Bitcoin nodes that have not updated SegWit are still able to process transactions. However, there is another implementable version of SegWit called SegWit2x (S2X), which requires a hard fork upgrade.
The main difference between SegWit and SegWit2x is that the latter will not only include changes to transaction batching, but also an increase in block size (from 1MB to 2MB). Nonetheless, larger block sizes increase the burden on node operators and miners as they have to process more data.
Another significant difference is that the SegWit proposal is supported and implemented by the Bitcoin community. This also gave rise to the concept of UASF, which stands for user-activated soft fork.
SegWit2x, on the other hand, proposes substantial changes to the basic rules governing Bitcoin. But SegWit2x was eventually suspended as developers were unable to reach a consensus on its adoption and implementation.
The difference between Nested SegWit and Native SegWit (bech32)
In short, native SegWit (also known as bech32) is an updated version of nested SegWit. bech32 addresses increase transaction speeds, provide better error detection mechanisms, and even reduce transaction fees. Additionally, bech32 addresses are in lowercase letters, making them easier to read. Please note that transactions between non-SegWit (original Bitcoin addresses, also known as Legacy), Nested SegWit and SegWit (bech32) addresses are fully compatible. But not all exchanges and crypto wallets support SegWit, so you cannot send funds directly to an address that does not support SegWit. Binance already supports SegWit addresses for depositing and withdrawing BTC. For more information, please refer to the SegWit FAQ.
The implementation of SegWit marks a major upgrade to the Bitcoin protocol. The protocol is also supported and implemented by the distributed community, which also makes it more attractive.
The launch of SegWit can effectively solve the problems related to Bitcoin and other blockchain networks, especially an important step in scalability. Through the combination of SegWit and second-layer protocols, blockchain networks can handle large volumes of transactions with greater efficiency and lower costs.
Although SegWit is a powerful and innovative solution, it is not yet fully implemented. Currently, approximately 53% of Bitcoin addresses use the SegWit protocol.