Science

What is SegWit? Bitcoin's Software Fix that Just Locked In

The software will never be the same, and experts say that's a good thing. 

Flickr / microsiervos

On Tuesday, bitcoin’s foundational software got one of the most important updates in its history, a major change in how its data is organized that could send the value of the cryptocurrency to new heights.

At around 3 p.m. Tuesday, bitcoin’s users and miners officially locked in a software policy called segregated witness, or segwit. Segwit has been lauded by experts as a “unilaterally positive change,” but there are still holdouts who think the cryptocurrency will need new tweaks and changes in the near future. In the meantime, what is segwit, and how does it change bitcoin?

Building blocks

Bitcoin is based on a system called the blockchain, a long coded registry of every transaction that takes place. Transactions are recorded on blocks, specific packages of data that are sealed with a highly sophisticated code and entered into the chain. The problem, however, is that recording those blocks takes a lot of computing power, and transactions can’t go through until the block is secure. In the original bitcoin system, blocks can only hold one megabyte of data — and that hard limit held the entire system to a maximum speed of about seven transactions per second… over the entire globe.

It’s almost impossible to estimate the number of people globally that own or use bitcoin, but the number is almost certainly more than 10 million, so a rate of seven transactions per second gets really slow, really fast. Each transaction uses roughly the same amount of data, and only a certain number of transactions can be recorded in one block. One solution to fix this was to increase the size of the blocks. That would make them bigger and harder to code, but able to record more transactions.

This was a controversial plan that nearly caused a destabilizing split, or “fork,” in the currency. It was eventually abandoned for a different plan called BIP 141, which included a policy known as segwit. Some elements of the bitcoin community eventually did branch off to a bigger block system called Bitcoin Cash, but the main blockchain decided to go for segwit instead.

Buyers support the system, but miners hold a lot of the power. 

Getty Images / Ethan Miller

What is segwit?

Segwit, or segregated witness, refers to one specific part of any bitcoin transaction. The blockchain ledger works by publicly recording and verifying every transaction that goes through it, meaning it’s nearly impossible to fool or spoof. That authentication data, known as the “signature” or “witness” part of the transaction, actually ends up taking up a lot of space in each transaction.

The important parts — who’s sending the money, who’s receiving it, and the amount being passed — are a comparatively small part of the data. In the cramped blocks, more data means fewer transactions and less speed. The idea, then, was to segregate the witness data, make everything more organized, and compress more transactions into each block.

Picture it like a plane: each transaction is a traveler with a bunch of luggage. If you try to cram all the travelers and their luggage onto the plane, it gets really crowded, really fast — and you can’t get as many people on. That’s why planes have cargo holds, where they can take all the suitcases, stack them neatly and efficiently, and leave more room for passengers to sit in an orderly fashion as well. With segwit, the witness data of all the transactions in a block is segregated and compressed into one parcel of data in the block, giving the essentials of the transaction more room, and letting each block record more transactions. This, in turn, increases the overall transaction speed.

It's not magic, it's mostly math. 

Flickr / Sean MacEntee

Locking it in

This change didn’t come easily, however. Bitcoin is a decentralized, chaotic democracy of a system where it’s pretty hard to force anyone to do anything. For segwit to become official, 95 percent of all miners (people or organizations that use their computing power to code the blocks) needed to signal their support for the new software within a single two-week period, known as a “difficulty period.”

In each difficulty period, miners record 2016 blocks. Because bitcoin’s democracy is proportional to computing power (or “hash power”), not individuals, 95 percent of those blocks needed to signal support for segwit: 1916 at least. Some of the big conglomerates of miners — huge groups with massive computing resources they can bring to bear — dragged their feet, and segwit hung in the air for days. On Tuesday, the miners finally hit that threshold, and segwit locked in, becoming an official policy across the blockchain.

A bitcoin conference in 2014, long before segwit. 

Getty Images / Andrew Burton

What happens now?

Well, nothing, actually. But that’s because segwit has a two-week “grace period,” which is an essential step that gives everyone mining blocks on the system a chance to upgrade their software to support the new policy. Segwit is a significant coding change, and the system will need time to adjust. Right now, the change is set to “activate” on block 481,824 of the blockchain, which users expect will be coded in on August 21. After that, bitcoin will probably get quite a bit faster. Eventually, if it continues to spread across the world, even the new maximum speed of segwit will be too slow, forcing the community to make another change. But until then, things are pretty peachy.

Related Tags