Relative txout amounts with a Merkleized Sum Tree and explicit miner fee. [combined summary]



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

Published on: 2022-11-26T00:12:10+00:00


Summary:

In response to Andrew's query about mapping output amounts to a tap branch for secure partial spends of a single UTXO, ZmnSCPxj suggests exploring covenant schemes, specifically the tree structures for `OP_CHECKTEMPLATEVERIFY`. While Taproot has multiple leaves, only one leaf will consume the entire input amount. To address this issue, ZmnSCPxj recommends using multiple tree leaves that will eventually be published, which can be achieved through `OP_CHECKTEMPLATEVERIFY`. Without this opcode, presigned transactions in a tree structure can be used, but they are known to be larger than `OP_CHECKTEMPLATEVERIFY`.Rijndael also suggests that Andrew looks into `TAPLEAF_UPDATE_VERIFY`, which is similar to his proposed solution. By examining both `TAPLEAF_UPDATE_VERIFY` and `OP_CHECKTEMPLATEVERIFY`, Andrew can gain a better understanding of covenant schemes and how they can be utilized in his project.The email conversation revolves around mapping output amounts to a tap branch for secure partial spends of a single UTXO. The challenge lies in the fact that only one tap branch will consume the entire input amount. The solution proposed is to have multiple tree leaves that will eventually be published. The writer recommends exploring the tree structures for `OP_CHECKTEMPLATEVERIFY`, as they align with the desired outcome and can help make `OP_CTV` a reality. If `OP_CHECKTEMPLATEVERIFY` is not used, presigned transactions in a tree structure can be employed, although they are known to be larger.The author seeks feedback on an idea regarding mapping output amounts to a tap branch for secure partial spends of a single UTXO. This involves defining the Merkel tree root tweak and tree branch and leaf using tagged hash, left and right hash, and relative output amount. Transaction validation includes a negative output amount that flags the transaction as a relative amount spend, with the miner fee being the absolute of the output amount. The author poses several questions, such as whether this idea would require a hard fork, if the sum is required in the asset tree, how big a taproot tree can become before it becomes cumbersome, and whether multiple taproot trees can be placed inside a tweak.Potential benefits of this approach include slightly increased privacy of output amounts and reduced growth rate of UTXOs. However, drawbacks may include disabling the ability for output change addresses to be the same as inputs, as the spending amounts are absolute. An example transaction is provided, demonstrating inputs and outputs. Additionally, the author suggests that this idea could facilitate the onboarding of numerous lightning channels with a single UTXO output. An exchange, for instance, could schedule open lightning channels at specific time intervals, with individuals providing pubkeys and payment to be placed in a tap leaf, similar to selling seats for an aircraft flight.


Updated on: 2023-08-02T08:34:18.369441+00:00