Introduction

Segregate Witness is a neat concept invented by Pieter Wuille. Pieter has a Ph.D in computer science and is part of the bitcoin core development team since 2011.

What is SegWit?

The short non technical version

Segregated Witness, or SegWit as it is commonly known is where data, or more specifically data related to signatures are removed from bitcoin transactions making them smaller in size. This in turn makes the blocks smaller meaning more transactions can be included in a block.

The short technical version

“Segregated witness (segwit) is a soft fork that, if activated, will allow transaction-producing software to separate (segregate) transaction signatures (witnesses) from the part of the data in a transaction that is covered by the txid.”

The long version
Background

SegWit was officially released on October 2016 in v0.13.1 of the bitcoin core code. It’s the result of about 1 years work and was presented at the Bitcoin Scaling Conference in Hong Kong in December 6th 2015.

The details

To fully understand SegWit, it is important to understand the make up of a block and a transaction. Inside a transaction are scriptSig and scriptPubKey fields. This is where signature data is contained.

Pieter asks the question of whether all the data in a transaction should be treated equally and in particular signatures. Pieter noted that signatures are only needed at validation time but account of ~60% of the transaction size.

Segregated Witness attempts to ignore this data where possible.

What are the benefits of SegWit?

The most obvious benefit is a slight capacity increase. The elimination of unwanted transaction malleability is an important one. This was more of a nuisance bug as opposed to a critical bug. Other benefits include:

  • Weighting data based on how it affects node performance
  • Signature covers value
  • Linear scaling of sighash operations
  • Increased security for multisig
  • More efficient almost-full-node security
  • Script versioning
How does it get implemented?

The way it gets “activated” is interesting. It requires 95% of miners to signal support for SegWit and for full nodes to upgrade to the latest version to include SegWit which is v0.13.1

The segwit soft fork has been designed to allow individuals in both groups to voluntarily decide whether or not they want to adopt segwit

For miners, there is a 1 year window starting from 15 November 2016 where miners can place a bit value of 1 in the blockheader version bits field.

The amount of support is constantly measured but will only activate if 95% of support is measured in a ~2 week period called the 2,016-block retarget period.

What is the current status?

There is a neat site called http://www.segwit.co where you can monitor the status. Currently there is about a 25% uptake since 15 November.

screen-shot-2016-12-22-at-9-18-39-am

Summary

SegWit is a neat invention that the bitcoin core community put a lot of effort in because it provides positive fundamental changes to the bitcoin platform. It takes non-critical data out of the transaction to reduce the size (increasing throughput) along with other benefits.

References:
  • https://bitcoincore.org/en/2016/01/26/segwit-benefits/
  • https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.13.1.md
  • https://bitcoincore.org/en/2016/10/27/segwit-upgrade-guide/
  • https://www.youtube.com/watch?v=DzBAG2Jp4bg
  • https://www.youtube.com/watch?v=NOYNZB5BCHM

Leave a Reply

Your email address will not be published. Required fields are marked *