Crypto
The witness discount refers to the reduction in data “weight” given to the witness portion of a Bitcoin transaction — the part that contains the signatures used to prove ownership. Implemented as part of the 2017 segregated witness (SegWit) upgrade, this discount effectively lowered the fees for SegWit transactions by making the witness data count for less when calculating the total size of a transaction.
In simpler terms, the witness data gets a 75% discount, meaning that it only counts as one-quarter of its actual size when determining how much space it takes up in a Bitcoin block. This allows for more transactions per block and reduces costs for users who adopt SegWit-enabled wallets.
But why does the Witness Discount exist in the first place? What’s the point of giving the witness data this special treatment? The answer ties back to Bitcoin’s long-standing scalability challenges, and the need to increase transaction capacity without overhauling the network with a risky hard fork. In this article, we explore the purpose behind the witness discount, how it works, and why it continues to matter today.
Crypto Key Takeaways
- Witness Discount: A discount applied to the size of the “witness” (or signature) portion of a Bitcoin transaction, reducing fees.
- Part of SegWit: Witness discount is part of segregated witness (SegWit), which solved the long-standing transaction malleability issue and effectively increased Bitcoin’s block size.
- Scalability: It helps make Bitcoin transactions more efficient, allowing for more transactions per block.
Crypto Purpose of the Witness Discount
The witness discount was introduced as part of SegWit, a major upgrade to the Bitcoin protocol that separated the transaction data into two parts: the core transaction data and the witness data (mostly digital signatures). In essence, the witness data was given a “discount” in terms of how much it counts toward the overall block size.
Prior to SegWit, Bitcoin’s block size was capped at 1MB. SegWit brought an indirect block size increase by applying a lower “weight” to the witness data — thus enabling more transactions per block without exceeding the 1MB limit for non-SegWit nodes.
The witness discount accomplishes a crucial goal: It allows for more transactions to fit into a block while maintaining compatibility with older nodes that haven’t upgraded to SegWit.
Crypto How It Works
When a Bitcoin transaction occurs, the core elements of that transaction — such as the amount of bitcoin being sent and the addresses involved — are recorded. However, there’s another component called the “witness,” which stores the signatures that prove ownership of the transferred bitcoin.
- Pre-SegWit: Before SegWit, all parts of a transaction were treated equally in terms of how much space they consumed in a block.
- Post-SegWit: After SegWit, the witness data (signatures) was stored separately from the rest of the transaction data. This separation allows for more transactions to fit into a block, as the witness data is assigned a lower weight, effectively giving it a 75% discount. A full transaction under SegWit, which could previously take up, say, 300 bytes, now only contributes a smaller amount of that size to the block’s total weight.
This reduces fees for users who opt for SegWit-enabled wallets since fees are calculated based on the virtual size of the transaction, which now discounts the witness data.
Crypto History and Rationale
The story behind the witness discount dates back to the block size wars in 2015-2017. At that time, the Bitcoin community was embroiled in heated debates about how to scale the network. Larger block sizes would allow for more transactions per block, but increasing the block size directly (via a hard fork) was controversial. It risked centralizing the network, as bigger blocks are harder to propagate and store for nodes with less bandwidth and storage.
SegWit, proposed by Pieter Wuille, was introduced as a compromise. It addressed the scaling issue by creating more “effective” block space without requiring a hard fork. This is where the witness discount became important. By discounting the witness data, SegWit effectively expanded the number of transactions that could fit into a block while maintaining backward compatibility.
In simpler terms, SegWit allowed Bitcoin to have its cake and eat it too: more transactions per block without the risk of destabilizing the network.
Crypto Pros and Cons
Pros:
- Increased Block Efficiency: The witness discount allows for more transactions per block, indirectly increasing Bitcoin’s block size while keeping it backward-compatible with non-upgraded nodes.
- Lower Fees for SegWit Users: Since witness data is given less weight, SegWit transactions tend to be smaller in size, meaning lower transaction fees for users.
- Enhanced Security: SegWit solved the transaction malleability problem, making Bitcoin transactions more secure, which is especially important for second-layer solutions like the Lightning Network.
- Improved Scalability: By reducing the data burden on each transaction, the witness discount improves the scalability of the Bitcoin network.
Cons:
- Complexity: The SegWit implementation, including the witness discount, adds layers of complexity to the protocol, which some purists in the community view as unnecessary.
- Not Fully Adopted: While the witness discount encouraged the use of SegWit, many wallets and exchanges have been slow to adopt it, meaning its benefits aren’t universally experienced.
Crypto Witness Discount vs. Block Size Increase
One of the major debates in the Bitcoin scaling saga was whether to increase the block size directly or to implement a solution like SegWit, which indirectly increased the block size. So, how does the witness discount compare to simply raising the block size?
Block Size Increase:
- Direct increase in the number of transactions a block can hold