Everything you need to know about SegWit

Spread the love

SegWit , which is short for Segregated Witness, is a protocol upgrade that changes the way data is stored. It was activated on litecoin on May 10, 2017, and on bitcoin on 23 August, 2017.

Developer Pieter Wiulle presented the idea at the Scaling Bitcoin conference in December 2015 for the first time and many hailed it as a long-awaited solution to bitcoin’s scaling problem. The maximum block size in the main protocol is 1MB, which restricts the amount of transactions bitcoin can process to approximately 7 per second. This was going to limit bitcoin’s potential growth, and prevent it from becoming a usable payment system for high volumes.

While the upgrade enables a greater number of transactions in bitcoin’s blocks, SegWit’s initial intention was to fix a bug in the bitcoin code which is called transaction malleability. This flaw let anyone change small details that modified the transaction id (and the subsequent hash) but not the content. While not a critical problem for bitcoin, it prevented the development of more complicated features like second-layer protocols and smart contracts.

SegWit fixed transaction malleability by removing the signature information (or the “witness” information) and storing it outside the base transaction block. With that, signatures and scripts can be changed without affecting the transaction id.

Slimming down

Another benefit that is taking on a much greater importance is that, without the signature information, the transactions weigh much less. In other words, more can fit in a block, and bitcoin can process a greater throughput without changing the block size.

SegWit introduced a new concept called “block weight.” This is a mashup of the block size with and without the signature data, and is capped at 4MB, while the block size limit for the base transactions remains at 1MB. This means that the SegWit upgrade is compatible with the previous protocol, and avoids the requirement for a hard fork.

So, SegWit does not increase the block size limit, but it enables a greater number of transactions within the 1MB blocks. The 4MB cap includes the segregated witness data, which technically does not form part of the 1MB base transaction block.

Building on top

Another big step forward by SegWit is that it supports the development of second layer protocols, like the lightning network. The malleability fix made any feature that relied on unconfirmed transactions less risky and easier to design.

The lightning network will further boost bitcoin’s transaction capacity by taking frequent, small transactions off-chain, only settling on the bitcoin blockchain when the users are ready.

SegWit activation also boosted development work on other features like MAST (which allows for more complex bitcoin smart contracts), Schnorr signatures (which would enable another transaction capacity boost) and TumbleBit (an anonymous top-layer network).

Not everyone agrees

Not everyone in the bitcoin community agrees that SegWit is the solution bitcoin has been waiting for. Some experts believe that it is a case of “kicking the can down the road,” and at best a temporary fix.

Resistance to SegWit was one of the factors behind the development of bitcoin cash (BCH), a fork of the bitcoin network which chose to implement a bigger block size limit rather than rely on a new transaction structure.

Where are we?

Despite the obvious advantages, the rollout of the upgrade is moving slowly. .You can follow the progress here.

The main reason is that many wallets have yet to add SegWit support. Some leading ones such as Trezor, Ledger, Electrum and Kraken have already done so. Coinbase – the largest wallet provider in terms of quantity of transactions – is working on it, and expects to implement the upgrade in early 2018. And the wallet attached to bitcoin’s most popular full node implementation, Bitcoin Core, is expected to roll out SegWit in the first quarter of 2018.

With the main bitcoin code also making SegWit-friendly adjustments, this could result in an uptick in both usage and additional functionality experimentation. Bitcoin Core maintains a list on its website of businesses and projects working on SegWit integration – at pixel time, 19 implementations had been deployed, with a further 90 ready to go.

As more wallets embrace the upgrade, the percentage of transactions that use the SegWit structure will rise, and bitcoin fees should drop as blocks contain a greater number of transactions. Moreover, the development of lightning and similar second layer protocols should get more of a boost, enhancing bitcoin’s scope and potential. This is unlikely to happen overnight – but the change is an important one, and represents a big step forward.

Leave a Reply

Your email address will not be published.