Content

  • What is SegWit?

  • Benefits provided by SegWit

    • Increased throughput

    • Increased transaction speed

    • Fixing Transaction Plasticity

  • SegWit и Lightning Network

  • SegWit and SegWit2x

  • Conclusion


What is SegWit?

Segregated Witness (SegWit) is a protocol update developed in 2015. This concept was presented as a solution to the scalability problems that blockchain networks have faced and continue to face.

On average, the Bitcoin network validates a new block of transactions every 10 minutes. Thus, the block size affects the number of transactions that can be confirmed in each block. Currently, the Bitcoin blockchain is capable of processing about 7 transactions per second.

The main idea of ​​SegWit is to reorganize the data in a block so that signatures are placed separately from transaction information. In other words, updating SegWit consists of separating witnesses (signatures) from transactions. This allows you to increase network throughput by increasing the number of transactions in a block.

Since Bitcoin can only provide about 7 transactions per second, the network can sometimes take a long time to process a transfer compared to traditional payment solutions and financial networks that can process thousands of transactions per second.

SegWit was developed in 2015 by Bitcoin developer Peter Will and other Bitcoin Core members. In August 2017, the update was implemented as a soft fork in the Bitcoin network.

Today, there are several cryptocurrency projects using SegWit, including Bitcoin and Litecoin. The protocol upgrade brought a number of benefits, such as increased transaction speeds and improved throughput. In addition, SegWit solves the so-called transaction plasticity error (more on this later in the article).


Benefits provided by SegWit

Increased throughput

One of the most basic advantages of SegWit is the increase in block capacity. By removing signatures from output transaction data, it is possible to fit more transactions into a single block.

Transactions have two main components: input and output. The incoming data contains the public address of the sender, and the outgoing data contains the public address of the recipient. However, the sender must prove that he has the necessary amount of funds to transfer them to another user, and confirm this with a digital signature.

Without SegWit, signature data can take up up to 65% of the entire block. SegWit allows you to remove signatures from transaction inputs. This results in an increase in block capacity from 1 MB to approximately 4 MB.

Please note that SegWit does not involve increasing the block size itself. This is an engineering solution that allows you to use the full potential of the block without the need to increase its current size (which is only possible in the case of a hard fork). The actual block size will still be 1 MB, but the effective block size will be 4 MB.

In addition to this, SegWit came up with the idea of ​​block weight. We can think of the weight of a block as a concept that replaces the idea of ​​its size. Essentially, block weight is a measurement that includes the entire contents of the block, including transaction data (1 MB) and signatures (up to 3 MB), which are no longer part of the input part.


Increased transaction speed

Because a block can accommodate more transactions, SegWit helps increase the speed of transactions on the blockchain. Despite the fact that mining a block takes the same amount of time, the number of processed transactions increases and, accordingly, the TPS becomes higher.

Increased transaction speeds have also helped reduce transaction costs on the Bitcoin network. Before the update, it was common to pay over $30 per transaction. SegWit has dramatically reduced the cost of commissions to less than $1.


Fixing Transaction Plasticity

One of the main problems with Bitcoin was the ability to forge the cryptographic signature of a transaction. If even the slightest changes are made to the signature, this can lead to damage to its identifier, which will consequently affect the entire transaction between the two parties. Since the data stored on the blockchain is virtually immutable, such transactions can remain in its history forever.

Thanks to SegWit, signatures are no longer part of transactions, which in turn eliminates the possibility of changing this type of data. This fix allowed for further innovations for the blockchain community, including layer 2 protocols and smart contracts.


SegWit и Lightning Network

The development of Layer 2 protocols was made possible in part by eliminating transaction malleability. To put it simply, Layer 2 protocols are new platforms or products built on top of a blockchain such as Bitcoin. One of the most popular layer 2 protocols is the Lightning Network and off-chain micropayment network.

The Lightning Network is a layer 2 protocol that runs on top of the Bitcoin network. The main goal of the Lightning Network is to enable more transactions to be confirmed in a short period of time, allowing users to exchange their first cryptocurrency faster. Transactions are collected and buffered off-chain for later processing on the Bitcoin network.

The Lightning Network was originally designed exclusively for Bitcoin. However, several other cryptocurrencies and blockchain projects are working on integrating this technology for their networks. This can not only reduce transaction confirmation times, but also help develop new solutions to scalability problems.


SegWit and SegWit2x

SegWit is a soft fork that provides backward compatibility. In other words, nodes on the Bitcoin network that have not upgraded can continue to process transactions. However, another version of SegWit has also been proposed, called SegWit2x (S2X), which involves a hard fork of the network.

The main difference between SegWit and SegWit2x is that the hardfork option not only changes the transaction batching order, but also increases the block size (from 1 MB to 2 MB). Such changes may increase the load on nodes and miners due to processing more data.

Another notable difference is that the SegWit update was supported and implemented by the Bitcoin community. This event gave rise to a concept called UASF (user-activated soft fork), which stands for user-activated soft fork.

On the other hand, SegWit2x proposed a significant change to one of the fundamental rules that governs Bitcoin. But since the developers were never able to reach a consensus regarding the adoption and implementation of the update, development of SegWit2x was eventually put on hold.


Conclusion

The implementation of SegWit marked the largest update to the Bitcoin protocol, and the fact that it was supported and implemented by a decentralized community makes it even more interesting.

The SegWit soft fork was an important step in solving many problems associated with Bitcoin and other blockchain networks, especially with regard to scalability. Thanks to the combination of SegWit and layer 2 protocols, blockchains can more efficiently process more transactions at a lower cost.

Although this is a powerful and innovative solution, not everyone in the network has fully embraced the update at this time. Currently, the percentage of Bitcoin addresses using SegWit is about 53%.