The term Witness Discount refers to a reduction in the ‘weight’ of the data in the witness portion of a Bitcoin transaction – the area where the digital signatures are stored that confirm ownership. This was rolled out as part of the 2017 Segregated Witness (SegWit) update. It effectively lowered transaction fees for SegWit transactions by reducing the weight of the witness data when calculating the total size of a transaction.
In simpler language, the witness data is offered a 75% discount, meaning it is only considered as 25% of its actual size when determining the space it occupies in a Bitcoin block. This strategy allows for more transactions per block and reduces costs for users who adopt SegWit-enabled wallets.
So, why does the Witness Discount exist? What is the reasoning behind giving the witness data this unique treatment? The explanation is rooted in Bitcoin’s long-standing scalability issues and the need to expand transaction capacity without risking a potentially dangerous hard fork. In this article, we delve into the rationale behind the witness discount, its mechanism, and its continued relevance today.
Key Points to Remember
- Witness Discount: A reduction applied to the size of the “witness” (or signature) part of a Bitcoin transaction, resulting in reduced fees.
- Component of SegWit: Witness discount is a part of Segregated Witness (SegWit), which resolved the long-standing transaction malleability issue and effectively expanded Bitcoin’s block size.
- Scalability: It enhances the efficiency of Bitcoin transactions, allowing more transactions per block.
The Role of the Witness Discount
The witness discount was introduced as a component of SegWit, a significant update to the Bitcoin protocol that divided the transaction data into two parts: the primary transaction data and the witness data (primarily digital signatures). Essentially, the witness data was given a “discount” in terms of its contribution to the total block size.
Before SegWit, the block size of Bitcoin was capped at 1MB. SegWit introduced an indirect increase in block size by assigning a lower “weight” to the witness data – thereby allowing more transactions per block without exceeding the 1MB limit for non-SegWit nodes.
The witness discount achieves an essential goal: It makes it possible for more transactions to fit into a block while maintaining compatibility with older nodes that haven’t upgraded to SegWit.
How It Works
When a Bitcoin transaction happens, the fundamental elements of that transaction – such as the amount of bitcoin being sent and the addresses involved – are recorded. However, there’s another part called the “witness,” which stores the signatures that confirm the ownership of the transferred bitcoin.
- Pre-SegWit: Prior to SegWit, all components of a transaction were treated the same in terms of the space they occupied in a block.
- Post-SegWit: After SegWit, the witness data (signatures) was stored separately from the rest of the transaction data. This separation allows more transactions to fit into a block, as the witness data is assigned a lower weight, effectively offering it a 75% discount. A full transaction under SegWit, which could previously use up, say, 300 bytes, now only contributes a smaller portion of that size to the block’s total weight.
This strategy reduces fees for users who choose SegWit-enabled wallets since fees are determined based on the virtual size of the transaction, which now discounts the witness data.
The Story and Reasoning Behind It
The origin of the witness discount can be traced back to the block size wars of 2015-2017. During this time, the Bitcoin community was locked in fiery debates about how to scale the network. Larger block sizes would permit more transactions per block, but a direct increase in block size (via a hard fork) was controversial. It posed a risk of centralizing the network, as bigger blocks are more difficult to propagate and store for nodes with limited 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 the need for a hard fork. This is where the witness discount came into play. 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.
Advantages and Disadvantages
Advantages:
- Increased Block Efficiency: The witness discount allows for more transactions per block, indirectly expanding Bitcoin’s block size while maintaining backward compatibility with non-upgraded nodes.
- Reduced Fees for SegWit Users: Since witness data is assigned less weight, SegWit transactions tend to be smaller, resulting in lower transaction fees for users.
- Enhanced Security: SegWit addressed the transaction malleability problem, making Bitcoin transactions more secure, especially for second-layer solutions like the Lightning Network.
- Improved Scalability: By reducing the data burden on each transaction, the witness discount enhances the scalability of the Bitcoin network.
Disadvantages:
- Complexity: The implementation of SegWit, including the witness discount, adds layers of complexity to the protocol, which some purists in the community see as unnecessary.
- Slow Adoption: 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.
Witness Discount vs. Block Size Increase
One of the critical debates in the Bitcoin scaling saga was whether to directly increase the block size 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.
- Increases the burden on nodes, requiring more storage and bandwidth to keep up with the network.
- Requires a hard fork, which can split the network (as seen in the case of Bitcoin Cash).
Witness Discount (SegWit):
- Achieves a similar result (increased transaction capacity) without a hard fork.
- Reduces transaction costs for users taking advantage of SegWit.
- Doesn’t impose additional burdens on nodes, making it more sustainable long-term.
Essentially, the witness discount achieves the goal of more transactions per block without compromising Bitcoin’s decentralization, a key tenet of the network’s design philosophy.
Frequently Asked Questions (FAQs)
Why is the witness discount 75%?
The 75% witness discount exists because witness data—which includes digital signatures—does not contribute to the long-term size of the UTXO set that nodes must store permanently. Since this data is only needed for transaction validation and can be discarded afterward, it has a lower impact on node resources compared to non-witness data.
With the SegWit upgrade, transaction size is measured in weight units (WU) rather than bytes. Non-witness data is assigned a weight of 4 WU per byte, while witness data is assigned 1 WU per byte—a 1:4 ratio. This means witness data is effectively counted as 25% of its original size, resulting in a 75% discount.
The choice of 1:4 weighting was a deliberate balance between incentivizing SegWit adoption, preserving network efficiency, and maintaining security. It allows more transactions per block while ensuring compatibility with pre-SegWit rules, enhancing Bitcoin’s scalability without sacrificing decentralization.
Does the witness discount mean SegWit blocks are bigger?
Yes, in practice, SegWit blocks can be larger than the pre-SegWit 1MB block limit. However, the way the block weight is calculated means that SegWit blocks are more efficient in storing data, so more transactions — that don’t count for as much weight as before — can fit into a block.
What happens if I don’t use SegWit?
Non-SegWit transactions don’t benefit from the witness discount, meaning they take up more space in a block and typically incur higher fees. However, they are still fully valid and can be processed by the network.
Is the witness discount here to stay?
As of now, there are no plans to remove the witness discount. It remains a crucial part of Bitcoin’s scalability strategy and is widely considered a success in improving the network’s efficiency without compromising decentralization or security.