Segregated Witness [SegWit] Explained

Image result for Segregated Witness
Picture Cred: SegWit themselves

I figured that I would start releasing a series of articles that I expound upon blockchain technology for all my followers/readers out there that are trying to become more educated about the technical side of fundamental analysis (as it pertains to blockchain technology).

Hopefully you all find this article to be helpful in at least some way.

Breaking Down SegWit

Primary Purpose of SegWit

The primary purpose of Segregated Witness was to provide itself as an on-chain scaling solution for Bitcoin as well as a fix for the issue of transaction malleability.

What is Transaction Malleability?

Transaction malleability refers to a ‘bug’ in the software of Bitcoin itself that allowed users to change the ID of their transaction by altering the hash number of the transaction itself.

While this has no bearing on the actual funds that individuals receive, it could seriously disrupt off-chain transactions, such as the Lightning Network because the hash of a specific transaction needs to be known by the parties involved in a transaction that requires more than 1-hop in order to ensure that there is no ‘cheating’ off-chain.

Signature Segregation

Another major feature of Segregated Witness is its separation of the ‘signature’ from the ‘input’ section on transaction [another article coming soon that breaks down all the facets of transactions],

This new implementation was proposed through BIP 141, BIP 142, BIP 143, BIP 144 and BIP 145.

So How Was SegWit Supposed to Help Bitcoin Scale?

Without digging too much into the technical aspects of Segregated Witness (here is a great article and video that do that already), here’s a brief synopsis of how Segregated Witness is supposed to work to increase on-chain scaling:

It segregates the signature from the transaction. For those that don’t understand what this means, every transaction made with Bitcoin contains ‘signature information’. Check out the picture below:

This is the structure of a Bitcoin transaction right here

Everything you see within this picture is part of a single transaction — from the version number to input counter, list of inputs, previous transaction hash, etc.

By far, the majority of the data within the transaction is the ‘Signature’. There is a technical explanation for why that is (Elliptic Curve Cryptography; For Another Day), but essentially what SegWit did was change the rules of the protocol so that the inputs in transactions would be perceived differently.

So, the block size was indirectly ‘raised’ as a result.

How Did They Do That?

This was done by employing a change in the software that changed the block limit from a size-based limit, to a weight-based limit. This is somewhat hard to grasp conceptually, but it allowed them to artificially increase the capacity of the blocks.

More Specifics on ‘Weight’

Essentially all of the transaction data is given a weight that we’ll call ‘X’ and all Witness Data is given a weight of .25x (1/4x). This is hard to grasp conceptually because they didn’t necessary create more space within the TX itself, it just reduced the base size of the transaction to allow more transactions to fit within a given block.

It’s important to note that the original block limit was determined by base size. By segregating the witness data and creating an additional merkle root calculation to make it backwards compatible, the team was able to roll out Segregated Witness.

Conclusion

This little guide is meant to just give users a brief, quick explanation of SegWit.

By no means should this guide be considered to be a comprehensive breakdown of all things SegWit, because it isn’t.

But, if you’re looking to get the general gist of it as you continue your blockchain studies, I hope that this proves to be a reliable source for you.

Disclaimer: I was not paid (actually wish I was for a technical article like this)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Yes No