SegWit
Segregated Witness sent a jolt through bitcoin's price. In the week after it took effect, the price rose by nearly fifty percent. Weeks before that, on the 21st of July 2017, bitcoin had already climbed to $2,748, up 52 percent from $1,835 on the 14th of July.
Behind that swing was Bitcoin Improvement Proposal 141. It rearranged how a bitcoin transaction is built and measured. The change targeted two problems bitcoin had carried since it began processing payments. One was a hard ceiling on how many transactions the network could handle. The other let someone tamper with a transaction's identity before it was confirmed.
Getting that fix live took over a year of the entire network agreeing to it. What forced developers to solve both problems at once, and how did moving a single piece of data solve them?
A block size limit of one megabyte was added to bitcoin's protocol to close a hole malicious actors had found. Because blocks originally had no size restriction at all, attackers could submit deliberately oversized fake block data as a denial-of-service tactic. Detecting and rejecting those fake blocks was possible, but the process took long enough to slow the entire network.
Bitcoin itself works by using cryptography to keep a currency's transactions secure. Each block bundles a set of transactions behind a header, protected by proof of work, and recorded across a network of computers. Blocks link together in sequence through cryptographic hashes, each one referencing the block that came before it, forming what is called the blockchain.
That cap solved the denial-of-service problem, but it left two deeper flaws in bitcoin's design untouched.
A new block joins bitcoin's chain at random intervals that average ten minutes by design, a pace built in through proof of work. Combined with the block size limit, that pace capped how many transactions bitcoin could process in a given stretch of time. Some services tried routing around the limit with off-chain payments, moving transactions off the blockchain entirely, though this involved trade-offs around trust and finality. Others proposed reshaping the block format itself. A plan called FlexTrans, short for Flexible Transactions, would have shrunk transactions using a tagging system, fitting more into each block. That approach was incompatible with any system that didn't upgrade.
Bitcoin's second flaw lived inside the transactions themselves. Each transaction draws on unspent outputs, called UTXOs, left over from earlier transactions, creating a chain of transactions linked by identifier. That link was fragile. Someone could mutate an unconfirmed transaction without making it invalid, which changed its identifier. That broke the connection to any transaction built on top of it.
Fixing that fragility, without abandoning the block limit or the ten-minute pace, was the problem Segregated Witness set out to solve.
Under its formal name, Segregated Witness, Consensus layer, the fix split a bitcoin transaction into two separate pieces. The original portion kept the record of who sent bitcoin and who received it, tied to the transaction's place in the Merkle tree. A new structure, the witness, held the unlocking scripts and signatures that had previously lived inside that same record, then moved them to the end.
Each byte in the original portion still counted at full weight. A byte in the witness segment, though, counted as only a quarter of its real size. That rule let more data fit inside the existing block limit, without changing that limit's number.
Because the signature data was now serialized apart from everything else, a transaction's identifier no longer changed if someone tampered with its signature. That closed the door on the malleability problem outright. The declared purpose behind the upgrade covered three goals. It aimed to stop unintentional transaction malleability, allow optional data to travel with a transaction, and bypass restrictions like the block size limit. All three goals were reached without requiring a hard fork.
That reduced weight opened room for something bitcoin hadn't had before: a second layer of transactions that wouldn't need to touch the blockchain at all.
The clock on Segregated Witness started at 00:00 UTC on the 15th of November 2016. That opened an activation window set to run for exactly one year, until 00:00 UTC on the 15th of November 2017. Inside that window, the upgrade would only switch on once at least 95 percent of miners signaled readiness. That readiness was measured across a target adjustment period of 2016 blocks at a time.
On the 9th of August 2017, that threshold was cleared in dramatic fashion. 100 percent of miners across blocks 477,792 to 479,807 signaled support, locking the upgrade in. Bitcoin's rules meant the lock-in didn't take effect immediately. The network waited roughly two weeks, until the start of the next adjustment period, before flipping the switch.
Segregated Witness activated on the 24th of August 2017, at block height 481,824, comfortably ahead of its one-year deadline. Turning the new rules on was one thing; getting bitcoin's wallets and users to actually use them was another matter entirely.
Segregated Witness solving malleability made something new possible: the Lightning Network, an overlay network of micropayment channels. That network could, in theory, let bitcoin handle virtually unlimited instant, low-fee transactions off the main chain.
Adoption did not follow immediately; most bitcoin transactions initially could not use the new format at all. In the first week of October, the share of network transactions using Segregated Witness climbed from 7 percent to 10 percent.
Not everyone welcomed the change. A small group of miners, mostly based in China, objected to bitcoin's SegWit plans and pushed forward their own proposal for a split. That split produced a separate cryptocurrency called Bitcoin Cash. By February 2018, use of the new format had grown further, with Segregated Witness transactions exceeding 30 percent of the network.
That objection wasn't the only competing plan in circulation that year. A separate proposal called SegWit2x was making its own promises about bitcoin's block size.
In May 2017, Digital Currency Group announced a separate proposal known as SegWit2x, or SegWit2Mb, nicknamed the New York Agreement. That organization is distinct from the Digital Currency Initiative at the MIT Media Lab, despite the similar name. The plan combined two steps. First, it would activate Segregated Witness once 80 percent of the total bitcoin hash rate signaled support at bit 4. Second, it would activate a 2 megabyte block size limit within six months, again contingent on more than 80 percent hash rate support.
By mid-2017, the proposal had gathered backing from over 90 percent of the hash rate. It still drew criticism, though, because the work behind it had been limited to an invitation-only group of developers. In mid-July 2017, it became clear that miners preferred to implement the Segregated Witness portion of the agreement first. They wanted it done ahead of a deadline on the 1st of August 2017, tied to a user-activated soft fork. That move was meant to lower the odds of a hard fork splitting the network.
On the 8th of November 2017, SegWit2x's developers announced that the hard fork they had planned for around the 16th of November 2017 was canceled. They cited a lack of consensus among participants. The 2 megabyte block size increase SegWit2x had promised never activated. The block weight limit stayed exactly where Segregated Witness had set it that August.
Up Next
Common questions
What is SegWit in Bitcoin?
SegWit, or Segregated Witness, is Bitcoin Improvement Proposal 141, a soft fork that changed bitcoin's transaction format by separating signature data from the rest of a transaction. It was designed to prevent transaction malleability, allow optional data transmission, and bypass protocol restrictions such as the block size limit without a hard fork.
When did SegWit activate on the Bitcoin network?
SegWit activated on the 24th of August 2017, at block height 481,824. The activation window had opened on the 15th of November 2016 and required at least 95 percent of miners to signal readiness before the upgrade could switch on.
How does SegWit fix Bitcoin's transaction malleability problem?
SegWit fixes malleability by separating the witness data, the unlocking signatures, from the rest of the transaction and serializing it apart from everything else. This keeps a transaction's identifier from changing even if someone tampers with its signature before confirmation.
Why did SegWit lead to the creation of Bitcoin Cash?
A small group of mostly China-based bitcoin miners objected to bitcoin's SegWit plans and pushed forward their own proposal for a split. That split produced a separate cryptocurrency called Bitcoin Cash.
What was SegWit2x and why was it canceled?
SegWit2x, also called SegWit2Mb or the New York Agreement, was a proposal announced in May 2017 by Digital Currency Group to activate SegWit and then a 2 megabyte block size increase within six months. Its developers canceled the planned hard fork on the 8th of November 2017, citing a lack of consensus.
How much of Bitcoin's transaction volume used SegWit after it activated?
In the first week of October, SegWit usage rose from 7 percent to 10 percent of network transactions. By February 2018, SegWit transactions exceeded 30 percent of the network.
All sources
15 references cited across the entry
- 1Segregated Witness (Consensus layer)Eric Lombrozo et al. — 2017-09-17
- 3BookThe Rise of Digital MoneyTobias Adrian et al. — International Monetary Fund — 15 July 2019
- 9NewsBitcoin Rallies Sharply After Vote Resolves Bitter Scaling DebatePaul Vigna — WSJ — 21 July 2017
- 10As bitcoin comes off its record high, the next step is to avoid a 'lightning fork'Luke Graham — 9 August 2017
- 11NewsBitcoin 'clone' sees a slow start following splitAnna Irrera et al. — Independent — 2 August 2017
- 12NewsSegWit and the bitcoin transaction fee conspiracy theoryFT — 2018-03-21
- 14Dispute could mean financial panic in BitcoinCNBC — Associated Press — 14 July 2017
- 15Bitcoin Dodges Split That Threatened Its Surging PricePaul Vigna — The Wall Street Journal — 8 November 2017