2

Even though it is consensus valid to spend a UTXO of an amount that is lower than the extra fees it would cost to include it in a transaction, most nodes wouldn't relay them because of the minRelayTxFee. Does it make sense to keep those outputs in the UTXO set, increasing its size?

0

2 Answers 2

4

Bitcoin Core removes provably unspendable outputs from the UTXO set, since by definition we know they will never be used to verify new transactions.

One could, in theory, do the same for UTXOs that are highly unlikely to ever be spent, such as those that are highly uneconomical as per your question. However, this introduces a very real risk of splitting yourself off the chain. If just a single one of those UTXOs is spent in a confirmed transaction, your node would reject that block (and any subsequent blocks building on it) since one of its transactions is spending an input that according to your database does not exist.

While it is reasonable to assume that most uneconomical outputs will not be spent (in the current fee environment), it is extremely risky to assume that none of them will be spent. They can be spent accidentally, as part of L2 protocols, or by an attacker that wants to exploit this vulnerability. As such, removing any UTXO that is not provably unspendable would be unwise.

9
  • 1
    Removing a UTXO from your UTXO set, if it still can be spent, however unlikely that is to actually happen, is a hard forking change. It's not something you should do without extremely widespread understanding that the entire ecosystem will do the same. Jul 15 at 17:15
  • 3
    The Bitcoin protocol doesn't work like that. There is no way to synchronize individual transactions or UTXOs. If you delete something from your UTXO set, then by definition you'll reject any block which tries to spend that UTXO. Or you're talking about a wholly different model of what "UTXO set" means. Jul 15 at 17:52
  • 1
    @leslie Bitcoin Core keeps the UTXO database on disk, with an in-memory cache for recently-modified entries. Jul 16 at 11:50
  • 2
    @PieterWuille Disallowing spending a spendable UTXO seems to tighten the rules - therefore it seems to be a soft-fork change, or am I missing something?
    – Chris Chen
    Jul 16 at 13:41
  • 1
    @ChrisChen You're right. Jul 16 at 13:56
-2

One example of an uneconomical (meeting the dust threshold) UTXO are haircomb commitments. While they could've been encoded as OP_RETURNs, it's preferable to bloat the bitcoin UTXO set. Without this, haircomb couldn't benefit from a fast Bitcoin sync technology that could be invented in the future.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.