Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

Segregated Witness (SegWit)

Segregated Witness (SegWit) is a protocol upgrade that separates (segregates) witness data (signatures) from transaction data, increasing block capacity and fixing transaction malleability.
Chainscore © 2026
definition
BLOCKCHAIN UPGRADE

What is Segregated Witness (SegWit)?

A protocol upgrade that restructures transaction data to solve scalability and malleability issues in blockchain networks, most notably implemented in Bitcoin.

Segregated Witness (SegWit) is a backward-compatible soft fork protocol upgrade that separates, or segregates, the digital signature data (the witness) from the transaction block. This separation effectively increases a block's functional capacity without altering its size limit by moving the witness data to a new, extended data structure. The primary goals are to mitigate transaction malleability—a flaw allowing transaction IDs to be altered before confirmation—and to increase the number of transactions per block, thereby improving network throughput and reducing fees.

The technical implementation involves restructuring a transaction into two components: the transaction kernel, containing the sender, receiver, and amount, and the witness, containing the scripts and signatures. By moving the witness data outside the base block, SegWit removes it from the calculation of the block's size limit, measured in weight units. This creates block weight, a new metric allowing blocks to carry more transaction data while remaining under the legacy 1 MB size limit for backward compatibility. This effectively increases the block capacity to roughly 2-4 MB of equivalent data.

A critical benefit of fixing transaction malleability was enabling the secure development of second-layer protocols like the Lightning Network. With unalterable transaction IDs, complex, multi-step payment channels can be constructed off-chain. Furthermore, by segregating the witness, SegWit improves the scalability of signature verification, as nodes can process signatures in parallel. It also lays the groundwork for future upgrades like Taproot by introducing a new, more flexible scripting version (Witness version 0).

SegWit adoption varies across cryptocurrencies. It was activated on the Bitcoin network in August 2017 after a lengthy consensus process. Many Bitcoin forks and other blockchains, such as Litecoin, have also implemented it. Adoption is measured by the percentage of transactions using SegWit format, which directly impacts network efficiency. While a soft fork, it required widespread support from nodes, wallets, and miners to become effective, showcasing a major collaborative upgrade in blockchain governance.

For developers, implementing SegWit means handling new transaction serialization formats and address types, such as Native SegWit (Bech32) addresses starting with bc1q. These P2WPKH (Pay-to-Witness-Public-Key-Hash) and P2WSH (Pay-to-Witness-Script-Hash) addresses offer improved error detection and lower fees. Understanding SegWit is essential for building efficient wallet software, exchange infrastructure, and smart contracts, as it fundamentally changes how transaction data is hashed and verified within the Merkle tree structure of a block.

etymology
TERM ORIGIN

Etymology and Origin

The name 'Segregated Witness' is a technical portmanteau that precisely describes the core mechanism of the protocol upgrade.

The term Segregated Witness (SegWit) was coined by Bitcoin developer Pieter Wuille, who first proposed the concept in a 2015 Bitcoin Improvement Proposal (BIP 141). The name is a direct description of its function: to segregate the witness data from the transaction data block. In Bitcoin, a digital signature (the 'witness') proves ownership of the funds being spent. Prior to SegWit, this signature data was embedded within each transaction, contributing directly to the block size limit and creating a vulnerability known as transaction malleability.

Etymologically, 'segregate' comes from the Latin segregare, meaning 'to separate from the flock.' This perfectly captures the protocol's action of moving the witness signatures (the proof) into a separate, parallel data structure, distinct from the main transaction 'flock' that contains the inputs and outputs. The 'witness' component refers broadly to the unlocking script data that validates a transaction, which historically and most commonly is a cryptographic signature. This separation was the key innovation that solved two major issues simultaneously without a disruptive increase to the base block size.

The development and adoption of SegWit was a pivotal, and at times contentious, chapter in Bitcoin's history. It emerged as a scaling solution during the 'Block Size Wars,' a period of intense debate within the community about how best to increase Bitcoin's transaction capacity. Proponents argued it was a elegant soft fork solution, while opponents favored a simple block size increase. Its eventual activation in August 2017 via a user-activated soft fork (UASF) demonstrated the community-led governance model of Bitcoin in action. The success of SegWit paved the way for later second-layer protocols like the Lightning Network.

key-features
SEGWIT

Key Features and Benefits

Segregated Witness (SegWit) is a protocol upgrade that restructures how transaction data is stored, solving critical scaling and security issues in blockchain networks like Bitcoin.

01

Transaction Malleability Fix

SegWit solves transaction malleability by separating the digital signature (witness data) from the transaction identifier. This prevents third parties from altering a transaction's ID before confirmation, a flaw that previously complicated layer-2 solutions like the Lightning Network.

02

Effective Block Size Increase

By moving witness data outside the base block, SegWit effectively increases block capacity. The block weight limit replaces the strict 1MB size limit, allowing blocks to carry more transactions. This is measured in weight units (WU), with a new 4 million WU limit enabling ~2-4x more transactions per block.

03

Signature Verification Optimization

Separating signatures simplifies and speeds up transaction validation. Nodes can process the core transaction data without immediately verifying all signatures, reducing computational load. This optimization is a prerequisite for more complex scripting upgrades like Taproot.

04

Fee Calculation Efficiency

SegWit changes how transaction fees are calculated. Witness data is discounted (typically by 75%), incentivizing users to adopt SegWit transactions. This leads to:

  • Lower effective fees for users
  • More efficient use of block space
  • Reduced data burden for nodes that don't verify signatures
05

Backward Compatibility (Soft Fork)

SegWit was implemented as a soft fork, meaning non-upgraded nodes still see and validate the blockchain as valid. This ensured a smooth upgrade without requiring a hard fork and a chain split, maintaining network consensus while enabling new functionality.

06

Enabler for Layer-2 Scaling

By fixing transaction malleability, SegWit became the foundational upgrade enabling secure off-chain scaling. It is a direct prerequisite for the Lightning Network, which relies on immutable transaction IDs to create bidirectional payment channels.

how-it-works
BLOCKCHAIN UPGRADE

Segregated Witness (SegWit)

A protocol upgrade implemented as a soft fork to restructure how transaction data is stored on a blockchain, primarily to solve transaction malleability and increase block capacity.

Segregated Witness (SegWit) is a blockchain protocol upgrade that segregates the digital signature data (the witness) from the transaction data, moving it to a separate, extended data structure. This fundamental change resolves transaction malleability—a flaw where a transaction's unique ID could be altered before confirmation—by fixing the transaction ID calculation to exclude the witness data. The primary implementation occurred on the Bitcoin network in 2017 (BIP 141), but the concept has been adopted by other blockchains like Litecoin.

By removing the witness data from the base transaction block, SegWit effectively increases a block's functional capacity. While the 1 MB block size limit remains, the segregated witness data is discounted in the block's weight calculation, allowing more transactions to fit into a single block. This alleviates network congestion and reduces transaction fees. The upgrade was executed as a soft fork, meaning it maintained backward compatibility with non-upgraded nodes, which continue to see and validate the chain, albeit without recognizing the new transaction format.

Beyond scalability, SegWit's fix for transaction malleability was a critical enabler for second-layer protocols. Most notably, it allowed for the secure development of the Lightning Network, a layer-2 payment channel system that requires immutable transaction IDs to function. The structure also introduces improved scripting capabilities and paves the way for future upgrades. SegWit transactions are identified by native SegWit addresses, such as those starting with bc1q (Bech32) on Bitcoin.

Adoption of SegWit required widespread support from wallet providers, exchanges, and miners. While initially met with some controversy and slower uptake, its usage has grown significantly over time, becoming the standard for efficient Bitcoin transactions. The success of SegWit demonstrated that significant protocol improvements could be achieved through soft forks, influencing the design of subsequent upgrades like Taproot. Its core innovation—separating data for different purposes—remains a foundational concept in blockchain scalability solutions.

technical-details
SEGWIT MECHANICS

Technical Details: Block Weight and Witness Discount

Segregated Witness (SegWit) introduced a new block size metric called **block weight** and a **witness discount** to separate signature data from transaction data, enabling a block size increase without a hard fork.

Block weight is a composite unit that replaced the simple 1 MB block size limit in Bitcoin. It is calculated using the formula: Block Weight = (Base Transaction Size * 3) + (Witness Size * 1). This formula applies a 75% discount to the witness data (signatures), counting each byte of witness data as only 0.25 units of weight, while counting each byte of non-witness (base) data as 1 unit. The maximum allowed block weight is 4 million weight units (WU), which effectively allows for a block size larger than 1 MB when it contains segregated witness data.

The witness discount is the core mechanism that incentivizes the use of SegWit. By making signature data 'cheaper' in terms of block space, it reduces the cost for transactions that utilize SegWit addresses (starting with bc1q). This discount solves the transaction malleability issue by removing signatures from the transaction ID calculation and increases the effective capacity of a block. A block filled entirely with SegWit transactions can reach an effective size of nearly 4 MB, though the actual on-disk size remains closer to 1-2 MB due to the segregated witness structure.

Understanding block weight is crucial for fee estimation and block propagation. Miners prioritize transactions based on fee per virtual byte, where virtual size (vbytes) = weight / 4. A transaction's virtual size is its effective contribution to the block's capacity limit. This system creates a fee market where SegWit transactions often have a lower fee per on-chain byte, as their discounted witness data allows more transaction data to fit within the 4 million WU limit compared to legacy transactions.

COMPARISON

Legacy vs. SegWit Transaction Structure

A technical breakdown of how transaction data is organized and serialized in the legacy Bitcoin format versus the Segregated Witness (SegWit) upgrade.

Structural ComponentLegacy Transaction (P2PKH)Native SegWit Transaction (P2WPKH)SegWit-Nested (P2SH-P2WPKH)

Witness Data Location

Included in transaction input

Separated into a witness field

Encapsulated within a P2SH redeem script

Transaction ID (txid) Calculation

Includes all signature/witness data

Excludes witness data (malleability fix)

Excludes witness data (malleability fix)

Base Transaction Size

Larger (includes signatures)

Smaller (witness data excluded)

Slightly larger than native (P2SH wrapper)

Weight Units Calculation

Bytes * 4 (all data counted as witness)

Non-witness bytes * 4 + witness bytes * 1

Non-witness bytes * 4 + witness bytes * 1

Effective Block Capacity

~1.0-1.3 MB (limited by 1 MB block size)

~1.6-2.0 MB (due to block weight limit)

~1.6-2.0 MB (due to block weight limit)

Address Format

Begins with '1...'

Begins with 'bc1q...' (Bech32)

Begins with '3...' (P2SH)

Signature Malleability

Vulnerable

Fixed

Fixed

Backward Compatibility

Fully compatible with all nodes

Requires SegWit-supporting wallets/nodes

Appears as a P2SH transaction to legacy nodes

ecosystem-usage
SEGWIT

Adoption and Ecosystem Usage

Segregated Witness (SegWit) is a backward-compatible protocol upgrade that restructured Bitcoin transaction data to solve transaction malleability and enable block size increases. Its adoption unlocked significant scaling improvements and paved the way for second-layer protocols.

01

Activation and Soft Fork

SegWit was activated on the Bitcoin network in August 2017 via a soft fork, meaning non-upgraded nodes still validate the new blocks. Activation required a 95% miner signaling threshold over a two-week period. This method allowed for a smooth, non-contentious upgrade without splitting the chain, demonstrating a key mechanism for evolving Bitcoin's base layer protocol.

02

Impact on Transaction Capacity

By moving witness data (signatures) outside the base block weight, SegWit effectively increased Bitcoin's block capacity. The new block weight limit of 4 million weight units allows blocks to hold more transactions than the old 1 MB limit. This led to a significant reduction in transaction fees during periods of high demand and improved network throughput without increasing the base block size directly.

03

Enabler for the Lightning Network

SegWit's fix for transaction malleability was a critical prerequisite for the Lightning Network. Malleability allowed the unique ID of an unconfirmed transaction to be altered, breaking the chain of hashed contracts essential to Lightning's payment channels. By securing transaction IDs, SegWit provided the stable foundation required for this dominant Layer 2 scaling solution to be built securely on top of Bitcoin.

04

Wallet and Exchange Adoption

Adoption by wallets and exchanges was gradual but became near-universal. Key milestones:

  • Native SegWit addresses (Bech32): Start with bc1q, offering lower fees and error detection.
  • Compatibility addresses (P2SH-wrapped): Start with 3, used during the transition phase.
  • Major exchanges like Coinbase and Kraken enabled SegWit withdrawals, drastically reducing user fees and blockchain load. Today, the vast majority of Bitcoin transactions utilize SegWit.
05

Adoption Metrics and Block Weight

SegWit adoption is measured by the percentage of transactions in a block that use the format. At peak, over 80% of transactions utilize SegWit. The average block weight consistently sits near the 3-4 million weight unit limit, demonstrating full utilization of the new capacity. This metric is a direct indicator of how the ecosystem has optimized for efficiency and lower costs.

06

Contrast with Legacy Systems

The persistence of Legacy (P2PKH) transactions starting with 1 highlights SegWit's optional, backward-compatible design. These transactions:

  • Take up more block space for the same data.
  • Pay higher fees due to their larger virtual size.
  • Are still supported by all nodes but represent an inefficient use of blockchain resources. Their continued existence underscores the voluntary upgrade path of Bitcoin protocol improvements.
security-considerations
SEGREGATED WITNESS (SEGWIT)

Security Considerations and Impact

Segregated Witness (SegWit) is a Bitcoin protocol upgrade that fundamentally altered transaction data structure to address security and scalability. Its primary security impacts stem from fixing transaction malleability and enabling more robust second-layer protocols.

01

Transaction Malleability Fix

SegWit's core security achievement was eliminating transaction malleability, a flaw where a transaction's unique ID (txid) could be altered before confirmation. This was achieved by moving witness data (signatures) outside the transaction's core data structure, making the txid immutable. This fix was critical for enabling secure off-chain protocols like the Lightning Network, which rely on unchangeable transaction commitments.

02

Block Weight & Legacy Security

SegWit introduced a new block size metric called block weight, replacing the simple 1MB limit. It allows up to 4 Weight Units (WU) per byte of witness data and 1 WU per byte of other data, with a max of 4 million WU. This increases capacity while preserving the security model of full node validation, as the computational cost of verifying signatures (witness data) is weighted less heavily than the critical transaction graph data.

03

Signature Verification Efficiency

By segregating signature data, SegWit enables more efficient signature verification. Nodes and miners can process signatures in parallel or skip downloading them entirely using compact block relay. This reduces the computational burden of verifying old, complex transactions, strengthening network resilience against spam attacks that aim to bog down validation.

04

Paving the Way for Taproot

SegWit created the necessary foundation for the Taproot upgrade (BIP 341/342). The segregated witness field provided a clean, versioned space to deploy new scripting capabilities like Schnorr signatures and Merkleized Alternative Script Trees (MAST). This enhances privacy and security by making complex smart contracts indistinguishable from simple transactions on-chain.

05

Adoption & Soft Fork Security

Deployed as a soft fork, SegWit maintained backward compatibility, allowing non-upgraded nodes to still validate the blockchain. However, its security benefits are only fully realized with widespread adoption. Metrics like the SegWit adoption rate (percentage of transactions using it) are key indicators of the network's overall resilience to malleability-based attacks and its capacity for layer-2 solutions.

06

Impact on Fee Estimation & Spam

The new block weight model changed fee estimation dynamics. Transactions with large, complex scripts (many signatures) became cheaper per byte of core data, as their witness data is discounted. This economically discourages certain types of block space spam that rely on bloated signature data, allowing more economic transactions per block without proportionally increasing validation load.

DEBUNKED

Common Misconceptions About SegWit

Segregated Witness (SegWit) is a widely adopted Bitcoin protocol upgrade, yet persistent myths about its function and impact continue to circulate. This section clarifies the most frequent misunderstandings.

No, SegWit increases the block capacity through a new block weight limit, not the original 1 MB block size limit. It achieves this by segregating witness data (signatures) from transaction data, allowing more transactions to fit within the new 4 million weight unit limit. A transaction's "weight" is calculated as (non-witness bytes * 4) + witness bytes. This change effectively allows blocks to hold the equivalent of roughly 2-4 MB of pre-SegWit transactions, but the core 1 MB size limit on the original transaction data remains in the protocol.

Key Takeaway: SegWit is a block capacity increase via a new metric, not a direct increase to the legacy block size parameter.

SEGWIT

Frequently Asked Questions (FAQ)

Segregated Witness (SegWit) is a pivotal protocol upgrade that restructured Bitcoin transaction data to solve scalability and malleability issues. These questions address its core mechanics, benefits, and adoption.

Segregated Witness (SegWit) is a Bitcoin protocol upgrade that separates (segregates) the digital signature data (the witness) from the transaction data, moving it to a new, extended data structure. This works by restructuring a transaction block into two parts: the transaction ID is now calculated only from the core transaction data (inputs and outputs), while the signature data is stored separately. This separation directly solves transaction malleability, as altering a signature no longer changes the transaction ID, and effectively increases block capacity by removing signature data from the base block size limit, measured in weight units instead of bytes.

further-reading
SEGWIT DEEP DIVE

Further Reading and Technical Resources

Explore the technical specifications, implementation details, and ongoing impact of the Segregated Witness protocol upgrade.

02

Transaction Malleability Fix

SegWit's primary technical achievement was solving transaction malleability. By moving witness signatures (the malleable part) outside the transaction ID calculation, it became impossible to alter a signed transaction without invalidating it. This was a critical enabler for second-layer protocols like the Lightning Network.

03

Block Weight & Effective Capacity

SegWit introduced a block weight limit of 4 million weight units, replacing the strict 1 MB block size limit. It assigns 1 weight unit to non-witness data and 4 weight units to witness data. This allows blocks to hold more transactions, effectively increasing capacity. A block full of SegWit transactions can be equivalent to ~1.7 to 2.1 MB of pre-SegWit data.

04

Address Formats: Bech32

SegWit introduced a new address format called Bech32 (or bc1 addresses). Key features include:

  • Human-readable error detection (BCH codes).
  • Lowercase-only, reducing errors.
  • Native segregation of witness version and program. These addresses are used for native SegWit outputs (P2WPKH, P2WSH) and provide the full efficiency benefits.
05

Adoption & Activation Metrics

SegWit activated on Bitcoin in August 2017 via a soft fork. Adoption can be tracked by the percentage of transactions using SegWit inputs. Key metrics include:

  • SegWit Utilization: The percentage of block space occupied by witness data.
  • Transaction Count: The proportion of new transactions using SegWit outputs. These metrics are tracked by blockchain explorers and analytics sites.
06

Related Protocol: Taproot

Taproot (BIP 340-342) is a major soft fork upgrade that builds upon SegWit's foundation. It introduces Schnorr signatures and MAST, enabling:

  • Improved privacy for complex scripts.
  • Smaller and more efficient signatures.
  • Enhanced smart contract flexibility. Taproot outputs use a new SegWit version (v1) and the Bech32m address format.
ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team
Segregated Witness (SegWit): Definition & How It Works | ChainScore Glossary