SegWit

From Tokenbox Wiki
Jump to: navigation, search
Pieter Wiulle

Pieter Wiulle’s SegWit (Segregated Witness) aims to resolve one of the biggest problems with Bitcoin, discussed as far back as the times of Satoshi Nakamoto himself, which is scalability.

First introduced to Bitcoin on August 24, 2017, this protocol is a type of soft fork that allows separating digital signatures (which account for almost two-thirds of the record data) from the original transaction record, massively increasing the throughput.

SegWit, however, is not limited to signature separation and provides a few fascinating opportunities (like version scripts, cross chains, instant fiat exchanges, lower commissions, faster block validation and increased security through linear sighash) that definitively widen crypto’s arsenal of capabilities.

How does it work?

Transaction signatures, which account in some cases for 75% of the transactions, are only used once to verify the transaction. Afterward, there is no real need for them, and Segwit proposes removing them from the system to decrease the size of transactions so that more of them could fit in a block.

What is it for?

Bitcoin was originally designed to deal with light clients that handled only a small part of the network. As volumes and numbers of users grew exponentially, problems came up.

While traditionally the size of Bitcoin blocks was 1MB, allowing 7 transactions per second, Visa’s transaction capabilities amount to 56,000 transaction messages per second at top capacity. This raised questions of whether Bitcoin can compete with the established payment processors and become widely implemented.

SegWit (backed by the original team, Bitcoin Core, which took care of Bitcoin from the beginning) offered a soft fork, which was a lot more tempting for many users, and also resolved a few existing issues.

SegWit substantially increased the smoothness of operations and general efficiency (like the transaction malleability bug) as well as decreasing the size of transactions so that more could fit into a standard-size block.

Transaction malleability

In a transaction, the data cannot be tampered with without changing the signature. Transaction malleability, the issue which SegWIt was designed to deal with, is the fact that the digital signature itself can be malleated, creating a different transaction ID and disrupting the system. A hacker can use this for DDOS attacks or theft of funds through double withdrawal.

If the signature was to be removed, the risk would be reduced. The transaction ID, then, is not based on a digital signature anymore, which means that a user cannot malleate the transaction ID.

SegWit may be a temporary solution as it stands today (bigger/unlimited block sizes are still inevitable as the network goes global), but does not offer a move away from decentralization like the controversial Bitcoin Unlimited team, which defeats the purpose of having blockchain in the first place by shifting more control to miners who decide on the size of the block.