SF proposal: prohibit unspendable outputs with amount=0 [combined summary]



Individual post summaries: Click here to read the original discussion on the bitcoin-dev mailing list

Published on: 2017-09-13T09:34:37+00:00


Summary:

In a recent discussion on the bitcoin-dev mailing list, Peter Todd expressed his opinion that dropping zero value outputs is not worth the cost-benefit tradeoff. He believes that it is a needless loss of flexibility and suggests that something similar could be done for increased precision in the case of nanobitcoin. However, he acknowledges that requiring a minimum value may become meaningful if the value of 1e-8 btc becomes high enough to reduce a miner's ability to spam up the network.The email thread also discusses the implementation of Confidential Transactions (CT) as a softfork in Bitcoin. CT transactions only differ from regular transactions by proving that the sum of input values is greater than or equal to the sum of output values through a CT proof, without revealing the actual sums. To ensure each CT transaction's sum of inputs and outputs is valid, a pool of "shielded" outputs with an unknown value is proposed. There are three main cases for spending these shielded outputs: spending unshielded outputs to CT-shielded outputs, spending CT-shielded outputs to unshielded outputs, and spending CT-shielded outputs to CT-shielded outputs. The third case may result in extra outputs and consume a significant percentage of blockchain space if shielded-to-shielded transactions are common. However, the benefit of this implementation is almost trivial compared to its cost, hence the proposed tradeoff does not make sense.Jorge Timón proposed a solution for spamming attacks on the UTXO, where creating 0-value outputs that are spendable could remain in the UTXO indefinitely. The proposal is to require at least 1 satoshi per output, which Todd believes has minimal cost for spammers and does not justify making future upgrades more complex. Todd also believes that TXO commitments and Bram's related work will make UTXO growth a non-issue in the future. Therefore, he rejects the proposal.There is a discussion about timelocked transactions and their potential risks. If a timelocked transaction has a zero value input and the SF (soft fork) happens, that transaction would become unspendable. The keys to the outputs may also be lost or the co-signer may refuse to cooperate. There are objections to long term timelocked transactions, but it is recommended that any timelocked transactions should use forms that are popular. Any change which makes some transactions invalid should be opt-in and only apply to new transaction version numbers. If a timelocked transaction has an undefined version number, little can be done about it. However, if the version number is defined and in-use, transactions should not suddenly lose validity. A refusal to commit to this rule makes long term locktime use much more risky. There is also a discussion about allowing spendable outputs with null amounts and whether there is any reason or use case to keep allowing them.The discussion on the bitcoin-dev mailing list has raised questions regarding the feasibility of forbidding 0 satoshi outputs and inputs. It was pointed out that this would complicate a divisibility increase softfork, particularly with regards to Felix's confidential transactions. The blinding and unblinding transactions would have to be created with minimal output values. However, it was suggested that a change to the blinding scriptPubKey could allow for the use of 0 value outputs. The pattern used by Felix Weiss' BIP for Confidential Transactions depends on or is tidier with 0-value outputs. It was also noted that as long as unspendable outputs (OP_RETURN outputs for example) are still allowed with amount=0, there should not be an issue for anything. There was a proposal to create a BIP to require at least 1 satoshi per output to prevent spendable outputs with null amounts in them.On September 7, 2017, CryptAxe via bitcoin-dev expressed that unspendable outputs with amount=0 are still allowed and hence not an issue. Whereas Jorge Timón via bitcoin-dev stated that the creation of 0-value outputs that are spendable can potentially stay in utxo forever. He also added that requiring at least 1 satoshi per output would be better than the current situation although it wouldn't do much against a spam attack to the utxo. Jorge Timón further questioned if there was any reason or use case to keep allowing spendable outputs with null amounts in them, and if not, he was happy to create a BIP code for this. It is important to note that the pattern used by Felix Weiss' BIP for Confidential Transactions is tidier with 0-value outputs.In a Bitcoin-dev mailing list, Jorge Timón raised a concern regarding the creation of 0-value outputs that are spendable and can potentially stay in the unspent transaction output (UTXO) forever.


Updated on: 2023-08-01T21:45:19.661193+00:00