I've read that it encourages users to consolidate UTXO sets. How would it be doing that?
3 Answers
A transaction input means that the previous output it is spending can be removed from the expensive UTXO set. To incentivize making txin's (and hence reducing the UTXO size), Segregated witness includes a change to count the size of transaction input scripts as 1/4 the number of bytes that it actually consumes.
Transactions typically compete for block space by attempting to have a high ratio of fees to byte size in the block. By counting the bytes from inputs as 1/4 of the actual bytes the inputs consume, it makes transactions with more inputs more competitive in having a high fee to size ratio. Hence, the change in counting input data size incentivizes transaction makers to spend more inputs by essentially requiring less in fees.
It should be noted that although spending more inputs makes the UTXO set smaller in size, it also associates some outputs (addresses) as likely being owned by the same user. So there is a privacy/cost trade off for the user.
Additionally, another reason that the witness data is discounted is that it presents an opportunity to increase the block size as a soft fork.
Witnesses do not need to be stored once they have been verified and can be discarded. This effectively reduces the size of the UTXO. The discount is supposed to account for the reduced storage requirements and to encourage users to switch to segwit, benefiting the network as a whole.
-
1
-
2@NickODell But right now, storing data in the blockchain costs the same, whether you make it go into the UTXO set or not. Witness data never affects the UTXO set (doesn't cause storage, but also doesn't require UTXO database updates when processing). Commented Apr 3, 2016 at 20:08
-
So, do I understand correctly: There is only the identifying information in the UTXO. The signature script goes to the witness kept separately on disk, because we only need it once when the UTXO is being spent, while we need the UTXO set all the time, so see whether UTXO are available for spending. Wasn't that the way it was already? So, I understand why the blockchain size will be reduced later, as we can prune the witness data when an UTXO is spend. I understand why this will encourage people to spend UTXO and reduce the number of UTXO, but how does it change the size of the UTXO?– Murch ♦Commented Apr 5, 2016 at 6:29
-
Or do you mean it will reduce the number of UTXO in the first place?– Murch ♦Commented Apr 5, 2016 at 6:35
-
There is (1) outputs, which go into the UTXO, counted at 1.0x (2) inputs which do not go into the UTXO set, counted at 1.0x (3) witnesses which also don't go into the UTXO set, counted at 0.25x. Ideally, we'd discount everything that wasn't affecting the UTXO set, but we can't. The best we can do is move as much of the data to (3) where it is discounted. Commented May 16, 2016 at 1:04
Because Txouts are about 1/4th the size of TxIns, since signatures are that much bigger than a simple hash.
This means that in the old situation it was cheaper to split coins (increasing UTXO set size and creating more dust) than to merge them (decreasing UTXO set size).
With this discount, the playing field is leveled so that when the wallet has a choice, it will not favour UTXO increase.
Adam Back:
https://www.reddit.com/r/Bitcoin/comments/4d3pdg/clearing_the_fud_around_segwit/d1o12q1
Gregory Maxwell:
https://www.reddit.com/r/Bitcoin/comments/4d3pdg/clearing_the_fud_around_segwit/d1ns0bo