Witness discount It refers to the reduction in the data “weight” given to the witness portion of a Bitcoin transaction. This is the part that contains the signature used to prove ownership. Implemented as part of the 2017 Sequestered Witness (SEGWIT) upgrade, the discount effectively reduced the fees for SEGWIT transactions by reducing witness data when calculating the total size of transactions.
Simply put, witness data is discounted by 75%. This means that when determining the amount of space in a Bitcoin block, it counts as a quarter of its actual size. This increases transaction per block and reduces the cost of users who use Segwit-enabled wallets.
But why do witness discounts exist in the first place? What is the point of giving this special treatment to witness data? This answer is linked to the long-standing scalability challenges of Bitcoin and the need to increase transaction capacity without overhauling the network with high-risk hard forks. In this article, we explore the purpose behind eyewitness discounts, how it works, and why it is still important today.
Key takeout
- Witness discount: Discounts, fee reductions applied to the size of the “witness” (or signature) portion of a Bitcoin transaction.
- Part of segwit: Eyewitness discounts are part of the Isolated Witness (SEGWIT), which solved long-standing trading flexibility issues and effectively increased the block size of Bitcoin.
- Scalability: Helps to make Bitcoin transactions more efficient, allowing more transactions per block.
Purpose of witness discount
Witness discounts were introduced as part of Segwit, a major upgrade to the Bitcoin protocol, which separates transaction data into two parts: core transaction data and witness data (mainly digital signatures). Essentially, eyewitness data was given a “discount” in that it counted towards the overall block size.
Before SEGWIT, the bitcoin block size was capped at 1MB. SEGWIT has resulted in an indirect increase in block size by applying a low “weight” to eyewitness data. Therefore, you can increase transactions per block without exceeding the 1MB limit of non-segwit nodes.
Eyewitness discounts achieve important goals. This will allow more transactions to fit into the block and keep them compatible with older nodes that have not been upgraded to Segwit.
How it works
When a Bitcoin transaction occurs, the core elements of that transaction are recorded, such as the amount of Bitcoin sent and the associated addresses. However, there is another component called a “witness” that stores a signature that certifies ownership of the transferred Bitcoin.
- Presegwit: Before segwit, all parts of the transaction were treated equally in terms of how much space was consumed in the block.
- Post-segwit: After segwitness, witness data (signatures) were stored separately from other transaction data. This separation allows witness data to be assigned a lower weight and effectively gives a 75% discount, allowing more transactions to fit into the block. A full transaction under Segwit could take up, for example, 300 bytes, but now the amount of its size is smaller in the total weight of the block.
This will calculate the fee based on the virtual size of your Transaction, reducing the fees for users who choose a Segwit-enabled wallet and discount witness data.
History and rationale
The story behind the witness discount dates back to the block-sized wars of 2015-2017. At the time, the Bitcoin community was caught up in a fierce debate over how to expand its network. Larger block sizes allow more transactions per block, but increasing the block size directly (through hard forks) was controversial. Larger blocks were at risk of centralizing the network as they were difficult to propagate and store because of less bandwidth and storage nodes.
segwitproposed by Peter Euille and introduced as a compromise. Addressed the scaling issue by creating more “effective” block spaces without the need for hard forks. This is where witness discounts became important. By discounting witness data, Segwit has effectively expanded the number of transactions that could fit into a block while maintaining backward compatibility.
Simply put, segwit allowed Bitcoin to have a cake and eat it. Increase transactions per block without the risk of network instability.
Pros and Cons
Strong Points:
- Improved block efficiency: Eyewitness discounts allow for more transactions per block, indirectly increasing the block size of Bitcoin, maintaining backward compatibility with unupgraded nodes.
- Lower prices for Segwit users: SEGWIT transactions tend to be smaller in size, as witness data is given less weight. This means that users' transaction fees will be lowered.
- Enhanced security: Segwit solves transaction adaptability issues and makes Bitcoin transactions more secure. This is especially important for two-tier solutions such as Lightning networks.
- Scalability has been improved: By reducing the data burden for each transaction, eyewitness discounts improve the scalability of the Bitcoin network.
Cons:
- complicated: The implementation of Segwit including eyewitness discounts adds a layer of complexity to protocols that some purists in the community deem unnecessary.
- Not fully adopted: Eyewitness discounts have encouraged the use of segwit, but its advantages have not been universally experienced, as many wallets and exchanges are slow to adopt it.
Witness discounts and increased block size
One of the main discussions in the Bitcoin Scaling Saga was to indirectly increase the block size, whether to directly increase the block size or implement a solution like Segwit. So how does eyewitness discount compare to simply increasing the block size?
Increased block size:
- A direct increase in the number of transactions a block can hold.
- It requires more storage and bandwidth to increase the burden on nodes and keep up with the network.
- You need a hard fork that can split the network (as you can see in the case of Bitcoin cash).
Witness Discount (segwit):
- Achieve similar results (increasing transaction capacity) without a hard fork.
- Reduce transaction costs for users using SEGWIT.
- No additional burden is imposed on the nodes, making it a more sustainable long term.
Essentially, eyewitness discounts achieve more transactional goals per block without compromising the decentralization of Bitcoin, an important doctrine of network design philosophy.
Frequently asked questions (FAQ)
Why is the witness discount 75%?
A 75% witness discount exists because witness data containing digital signatures does not contribute to the long-term size of the UTXO set that the node needs to store permanently. This data is only needed for transaction validation and can then be discarded, resulting in a lower impact on node resources compared to unequipped data.
With the SEGWIT upgrade, transaction sizes are measured in weight units (WU) rather than bytes. Non-capacity data is assigned a weight of 4 WU per byte, and witness data is assigned one WU (1:4 ratio) per byte. This means that eyewitness data is effectively counted as 25% of the original size, resulting in a 75% discount.
The choice of 1:4 weighting was a deliberate balance between encouraging the adoption of Segwit, maintaining network efficiency and maintaining security. This ensures compatibility with pre-segwit rules while increasing transactions per block, and increases Bitcoin scalability without sacrificing decentralization.
Does eyewitness discount mean that the segwit block is big?
Yes, in reality, segment wit blocks can be larger than the 1MB block limit before segment wit. However, the method of calculating block weight means that SEGWIT blocks are more efficient in storing data, which means that more transactions are not counted by weight as before, but can fit into blocks.
What happens if I don't use segwit?
Non-segwit transactions do not benefit from witness discounts. This means that you take up more space in the block and usually pay higher. However, they are still fully valid and can be handled by the network.
Will the witness discount stay here?
At the moment, there are no plans to remove witness discounts. This is a key part of Bitcoin's scalability strategy and is widely considered to have been successful in improving network efficiency without compromising decentralization or security.