Segregated Witness
   HOME

TheInfoList



OR:

Segregated Witness, or SegWit, is the name used for an implemented
soft fork In blockchain, a fork is defined variously as: * "what happens when a blockchain diverges into two potential paths forward" * "a change in protocol", or * a situation that "occurs when two or more blocks have the same block height" Forks are rela ...
change in the transaction format of
Bitcoin Bitcoin (abbreviation: BTC; sign: ₿) is a decentralized digital currency that can be transferred on the peer-to-peer bitcoin network. Bitcoin transactions are verified by network nodes through cryptography and recorded in a public distr ...
. The formal title "Segregated Witness (Consensus layer)" had Bitcoin Improvement Proposal number BIP141. The declared purpose was to prevent nonintentional bitcoin transaction malleability, allow optional data transmission, and to bypass certain protocol restrictions (such as the block size limit) with a
soft fork In blockchain, a fork is defined variously as: * "what happens when a blockchain diverges into two potential paths forward" * "a change in protocol", or * a situation that "occurs when two or more blocks have the same block height" Forks are rela ...
.Segregated Witness proposal BIP 141
/ref> It was also intended to mitigate a
blockchain A blockchain is a type of distributed ledger technology (DLT) that consists of growing lists of records, called ''blocks'', that are securely linked together using cryptography. Each block contains a cryptographic hash of the previous block, ...
size limitation problem that reduces bitcoin transaction speed. It does this by splitting the transaction into two segments, removing the unlocking signature ("witness" data) from the original portion and appending it as a separate structure at the end. The original section would continue to hold the sender and receiver data, and the new "witness" structure would contain scripts and signatures. The original data segment would be counted normally, but the "witness" segment would, in effect, be counted as a quarter of its real size.


History


Block size limit

Bitcoin is a
cryptocurrency A cryptocurrency, crypto-currency, or crypto is a digital currency designed to work as a medium of exchange through a computer network that is not reliant on any central authority, such as a government or bank, to uphold or maintain it. It i ...
, a form of currency using cryptography to keep transactions secure. A collection of bitcoin transactions prefaced by a block header, protected by proof of work, and recorded on a network of computers is called a "block". All blocks are tied together sequentially by using a
cryptographic hash A cryptographic hash function (CHF) is a hash algorithm (a map of an arbitrary binary string to a binary string with fixed size of n bits) that has special properties desirable for cryptography: * the probability of a particular n-bit output ...
on the previous block and storing its output in the next. This forms a
blockchain A blockchain is a type of distributed ledger technology (DLT) that consists of growing lists of records, called ''blocks'', that are securely linked together using cryptography. Each block contains a cryptographic hash of the previous block, ...
.Block Chain
/ref> Each block contains information about who sends and receives a given unit of bitcoin (a transaction), as well as the signature(s) that approves each transaction. Originally, there was no limit to the size of blocks. However, this allowed malicious actors to make up fake "block" data that was very long as a form of
denial-of-service attack In computing, a denial-of-service attack (DoS attack) is a cyber-attack in which the perpetrator seeks to make a machine or network resource unavailable to its intended users by temporarily or indefinitely disrupting services of a host conne ...
(DoS attack). These fake blocks would be detected, but doing so would take a very long time, slowing down the whole system. Therefore, a block size limit of 1MB was introduced.


Scalability and malleability

The current bitcoin blockchain design is regarded as having two shortcomings.


Scalability

A new block is added to the chain at random intervals averaging, by design, ten minutes ( proof of work causes this delay). Together with the limit on block-size, this limits the number of transactions that can be processed in a given time. Some sites work around this problem using "off-chain payments" conducting transactions without writing them to the blockchain, which involves various trade offs regarding trust and transaction finality. Others have proposed changes to bitcoin that would reform the block format in a backward-incompatible way. For example, FlexTrans (Flexible Transactions) would make transactions smaller by changing how they are described to a "tag" system, allowing more transactions per block. This is not compatible with systems that do not upgrade.


Malleability

A transaction uses unused outputs from a previous transaction(s) known as
unspent transaction output In cryptocurrencies, an unspent transaction output (UTXO) represents some amount of digital currency which has been authorized by one account to be spent by another. UTXOs use public key cryptography to identify and transfer ownership between holde ...
s (UTXO). This results in a chain of related transactions linked by their transaction identifier. However, it is possible for someone to change (mutate) unconfirmed bitcoin transactions without making them invalid, which changes the transaction’s identifier, making child transactions invalid (i.e., link between transactions are broken).


Segregated Witnesses as a solution

The signature data called the ''witness'' would be separated from the Merkle tree record of who is sending or receiving the bitcoins. The witness data is moved to the end, and each byte of it would only count as one quarter of a "unit". It also addresses signature malleability, by serializing signatures separately from the rest of the transaction data, so that the transaction ID is no longer malleable.


Activation

On 21 July 2017, bitcoin miners locked-in a software upgrade referred to as Bitcoin Improvement Proposal (BIP) 91, meaning that the Segregated Witness upgrade activated at block 477,120. SegWit alleviates the scaling problem in two ways: * SegWit solves Transaction Malleability, thereby enabling the
Lightning Network The Lightning Network (LN) is a "layer 2" payment protocol layered on top of Bitcoin (and other blockchains and cryptocurrencies). It is intended to enable fast transactions among participating nodes and has been proposed as a solution to the ...
, an overlay network of micropayment channels, hypothetically resolving the scaling problem by enabling virtually unlimited numbers of instant, low-fee transactions to occur "off chain". By 8 August, another milestone was reached when 100% of the bitcoin mining pools signaled support for SegWit, although SegWit would not be fully activated until 21 August at the earliest, after which miners would begin rejecting blocks that do not support SegWit. Initially, most bitcoin transactions have not been able to use the upgrade. Segregated Witness was activated on 24 August 2017. The bitcoin price rose almost 50% in the week following SegWit's activation. On 21 July 2017, bitcoin was trading at $2,748, up 52% from 14 July 2017's $1,835. In the first week of October, the proportion of network transactions using SegWit rose from 7% to 10%, indicating an increase in use rate. A small group of mostly China-based bitcoin miners, that were unhappy with bitcoin's proposed SegWit improvement plans, pushed forward alternative plans for a split which created
Bitcoin Cash Bitcoin Cash is a cryptocurrency that is a fork of Bitcoin. Bitcoin Cash is a spin-off or altcoin that was created in 2017. In November 2018, Bitcoin Cash split further into two cryptocurrencies: Bitcoin Cash and Bitcoin SV. History Since i ...
. As of February 2018, SegWit transactions exceed 30%.


SegWit2x

Segregated Witness (BIP141) should not be confused with
SegWit2x The Bitcoin scalability problem refers to the limited capability of the Bitcoin network to handle large amounts of transaction data on its platform in a short span of time. It is related to the fact that records (known as ''blocks'') in the Bit ...
(SegWit2Mb). In May 2017, Digital Currency Group (not to be confused with the Digital Currency Initiative of the
MIT Media Lab The MIT Media Lab is a research laboratory at the Massachusetts Institute of Technology, growing out of MIT's Architecture Machine Group in the School of Architecture. Its research does not restrict to fixed academic disciplines, but draws from ...
) announced it had offered a proposal, referred to as SegWit2x ("the New York Agreement"), activating Segregated Witness at an 80% threshold of the total bitcoin hash rate, signaling at bit 4; and activating a 2 MB block size limit within six months with support in excess of 80% of the total bitcoin hash rate. As of mid-2017, although the SegWit2x proposal had support in excess of 90% of the hashrate, however, the SegWit2x proposal has been controversial in that work on the project is limited to an invitation only group of developers. In mid-July 2017, it became apparent that miners supported implementation of the Segwit part of the agreement before the 1 August 2017
UASF The Bitcoin scalability problem refers to the limited capability of the Bitcoin network to handle large amounts of transaction data on its platform in a short span of time. It is related to the fact that records (known as ''blocks'') in the Bit ...
, thereby attempting to avoid the risk of a hard fork for the bitcoin network. On 8 November 2017, the developers of
SegWit2x The Bitcoin scalability problem refers to the limited capability of the Bitcoin network to handle large amounts of transaction data on its platform in a short span of time. It is related to the fact that records (known as ''blocks'') in the Bit ...
announced that the hard fork planned for around 16 November 2017 was canceled due to a lack of consensus.


References

{{Bitcoin, state=expanded Bitcoin