Why a discount factor of 4? Why not 2 or 8?

SegWit Resources
SegWit Resources
Published in
2 min readJan 13, 2017

Making the discount too large would lead people to use the witness space to store general purpose data on the block chain, or adversarial miners may fill excess space with random junk to defeat fast relay schemes that rely on similar mempools

Empirical observation of network propagation has demonstrated that the peer-to-peer network can manage worst-case 4MB blocks provided that other costs, such as UTXO growth & quadratic scaling of hashing time, are mitigated. A discount of 1/8 would have been too much — it would have allowed adversarial blocks 8MB in size, which the network cannot handle. Here is a chart that depicts the tradeoff:

Source

The horizontal axis here (X) is the witness discount factor (0.25 in SegWit). The red line shows the ratio of the worst case block size to the block size for a block full of transactions with two inputs and three outputs (2 in, 3 out), the green line shows the ratio of UTXO bytes for a worst case utxo filling block vs a utxo bytes of a typical block using 2 in, 3 out.

Because there is an ordinary ratio of signature data to non-signature data in transactions (which holds unless someone is cramming non-cryptocurrency data into the blockchain) there is a greatly diminishing incentive for UTXO reduction given a discount past that ratio, but an increasing exposure to the extra space being abused. Segregated witness is designed to capture almost all the incentive available for ordinary transactions, without creating a gratuitously large block attack vector.

Finally, no discount at all would have slightly reduced the amount of space available in blocks because of the need to store the witness commitment (about 40 bytes) in the coinbase transaction; since the segregated witness soft fork allows miners to choose between generating segregated witness style blocks and traditional-style blocks (that can’t include segregated witness transactions), this would provide a minor incentive for miners to favor traditional-style blocks.

The current discount factor is in the range of typical witness-to-non-witness data ratio and therefore provides manageable capacity increase while addressing the concerns related to UTXO growth.

--

--

SegWit Resources
SegWit Resources

An information page about Bitcoin’s segregated witness soft-fork