What is Segregated Witness?

Monday 11 January 2016

It sounds like a programme to give new identities to ex-mafia members who testify, but it’s actually bitcoin’s best hope for scaling in the short term.

Anyone who isn’t thoroughly fed up with the in-fighting and politics that surround the block size debate may be interested to hear of a new fix to patch up the network and keep it functioning for a while longer, until genuine consensus can be reached amongst stakeholders (coinciding with temperatures in the Underworld reaching approximately zero degrees Centigrade). Its name: Segregated Witness, or segwit for short.

Very briefly, to recap:

  • Bitcoin blocks are 1 MB each
  • These hold a limited number of transactions
  • This number is no longer enough and bitcoin cannot currently scale further
  • No one can agree how much larger blocks should be, or whether they should be larger at all.

Segwit is a workaround to this problem, because it doesn’t require a hard fork (i.e., everyone updating their software if the network is going to continue functioning as desired). The idea was presented by Blockstream co-founder Pieter Wuille at Scaling Bitcoin conference earlier this month in Hong Kong.

How does it work?

The layperson’s version goes something like this (it’s an imperfect analogy, but you’ll get the idea):

You’re on holiday and want to send a postcard to your friend. There is limited room for writing on the back, so you free up some space by writing his address over the picture on the front instead. Some postal workers won’t know what to do with the card, since they’re not used to this convention, but someone will realise what’s going on and will deliver it just fine. So you get double the text for the same price.


Like a traditional postcard, there's more space in bitcoin's blocks than it might appear

In more detail?

Bitcoin transactions contain three basic parts. There’s where the coins are coming from (the sender). There’s where the coins are going to (the recipient). And lastly, there’s the signature (the Witness), which proves that the sender has the right to move coins to the control of their new owner.

The signature can be quite large - especially if it involves multiple addresses. At the moment, it’s contained in the ‘From’ field of the transaction. Segwit takes a digest of that information and puts it in the coinbase part of the transaction, or the input. That frees up a significant amount of space - perhaps doubling or tripling the capacity of the network (depending on the type of transactions made).

Segwit also has the advantage that it can be rolled out as a soft fork, because not everyone needs to update at the same time. New segwit transactions will look a little weird to nodes running the old version, but it won’t cause any harm. Essentially old nodes would have to ignore these transactions, because they would appear not to have a signature (because it’s in an unexpected place).

If you want a fuller (and more technical) explanation of segregated witness, take a look at this article from Bitcoin Magazine, or check out Wuille's talk here.

It's not a permanent fix, but in the short-to-medium term, segwit looks like a very promising way to buy some time for the groaning bitcoin network.


(Photo: Flickr)

comments powered by Disqus