<oembed><type>rich</type><version>1.0</version><author_name>npub1xukrzempxc95ags094lgrfvnvwm7gkuwj3d98qwrzgsynskyhp9qkfzef0</author_name><author_url>https://nostr.ae/npub1xukrzempxc95ags094lgrfvnvwm7gkuwj3d98qwrzgsynskyhp9qkfzef0</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2022-04-21&#xA;📝 Original message:Hi Russell,&#xA;&#xA;Thank you for your feedback here.&#xA;&#xA;&#xA;&#xA;&gt; However, I&#39;m still skeptical of the bare-CTV part of BIP-119 (and I&#39;m told&#xA;&gt; that bare-CTV hasn&#39;t even appeared on the CTV signet).  Unlike the general&#xA;&gt; smart-contracting case, bare-CTV does not have any branches.  All it can do&#xA;&gt; is commit to a subsequent transaction&#39;s outputs.  At first glance this&#xA;&gt; appears to be a waste because, for less bandwidth, that transaction could&#xA;&gt; just realize those outputs immediately, so why would anyone want to delay&#xA;&gt; the inevitable?&#xA;&gt;&#xA;&#xA;I can probably make some show up sometime soon. Note that James&#39; vault uses&#xA;one at the top-level https://github.com/jamesob/simple-ctv-vault, but I&#xA;think the second use of it (since it&#39;s not segwit wrapped) wouldn&#39;t be&#xA;broadcastable since it&#39;s nonstandard.&#xA;&#xA;&#xA;&#xA;&#xA;&gt;&#xA;&gt; One reason might be that you want to commit to the output early during a&#xA;&gt; high-fee time, and then complete the transaction later during a low-fee&#xA;&gt; time.  While there are fee-rate situations where this could result in lower&#xA;&gt; fees than committing to the outputs all at once, it would be even cheaper&#xA;&gt; still to just wait to do the payout at the low-fee time.  I&#39;m struggling to&#xA;&gt; understand the advantages of the advanced commitment, along with all the&#xA;&gt; overhead that entails.  Doesn&#39;t it just cause more blockspace to be used&#xA;&gt; overall?&#xA;&gt;&#xA;&#xA;One case where you actually use less space is if you have a few different&#xA;sets of customers at N different fee priority level. Then, you might need&#xA;to have N independent batches, or risk overpaying against the customer&#39;s&#xA;priority level. Imagine I have 100 tier 1 customers and 1000 tier 2&#xA;customers. If I batcher tier 1 with tier 2, to provide tier 1 guarantees&#xA;I&#39;d need to pay tier 1 rate for 10x the customers. With CTV, I can combine&#xA;my batch into a root and N batch outputs. This eliminates the need for&#xA;inputs, signatures, change outputs, etc per batch, and can be slightly&#xA;smaller. Since the marginal benefit on that is still pretty small, having&#xA;bare CTV improves the margin of byte wise saving.&#xA;&#xA;I give this as an example where CTV uses less space, it is detailed more&#xA;here: https://utxos.org/analysis/batching_sim/. This benefit might be&#xA;marginal and absurd, given these are already big transactions, but it may&#xA;_also_ be absurd that feerates only ever go up and congestion control is&#xA;not valuable.&#xA;&#xA;Another example where this arises is where you have a transaction set you&#xA;need to pay top-of-mempool rate for the soonest confirmation you can get.&#xA;CTV has a decongesting effect, because your top-of-mempool transaction is&#xA;small, which doesn&#39;t trigger as much rivalrous behavior with other&#xA;transactors. Concretely, the current policy max txn size is 100kb, or 10%&#xA;of a block. If you bump out of next block window 10% of the mempool, then&#xA;if those transactors care to maintain their positioning, they will need to&#xA;put themselves into a higher percentile with e.g. RBF or CPFP. Whereas if&#xA;you put in a transaction that is just 100 bytes, you only bump out 100&#xA;bytes of rivals (0.01%), not 10%.&#xA;&#xA;Lastly, perhaps a more realistic scenario, is where I am batching to 100&#xA;customers who all wish to do something else after I pay them. E.g., open a&#xA;lightning channel. Being able to use CTV noninteractive channels cuts&#xA;through the extra hop transaction (unless dual funded channels, unless the&#xA;channels are opened between two customers, then they can be dual funded&#xA;again). So using CTV here also saves in net blockspace (although, note,&#xA;this is sort of orthogonal to using CTV over the batch itself, just a good&#xA;example for the related question of &#39;doesn&#39;t ctv generally use more&#xA;blockspace&#39;).&#xA;&#xA;&#xA;&gt; There are some other proposed use cases for bare-CTV.  A bare-CTV can be&#xA;&gt; used to delay a &#34;trigger&#34;-transaction.  Some contracts, such as vaults, use&#xA;&gt; a relative-locktime as part of their construction and it could make sense&#xA;&gt; to make an output commitment but not realize those outputs yet until you&#xA;&gt; are ready to start your relative-time lock clock.  But bare-CTV doesn&#39;t&#xA;&gt; support any co-signing ability here, so you are relying entirely on keeping&#xA;&gt; the transaction data secret to prevent a third-party from triggering your&#xA;&gt; relative-lock clock.  More specifically for a vault scheme, since&#xA;&gt; bare-CTV&#39;s are currently unaddressable, and AFAIK, there is no address&#xA;&gt; format proposal yet, it is impossible to receive funds directly into a&#xA;&gt; vault.  You must shuffle received funds into your vault yourself, which&#xA;&gt; seems very likely to negate the cost savings of using bare-CTV in the first&#xA;&gt; place (please correct me if I&#39;m wrong).  Better to receive funds directly&#xA;&gt; into a taproot-CTV vault, which has an address, and while you are at it,&#xA;&gt; you could place the cold-key as the taproot key to save even more when&#xA;&gt; using the cold-key to move vault funds.&#xA;&gt;&#xA;&gt;&#xA;This is not quite true, you can receive funds into a bare-CTV from your&#xA;vault software, and you can send into one from your vault software. What&#xA;doesn&#39;t work is exporting or creating an address for that. As a reminder&#xA;for those following along at home, not all standard output types have&#xA;addresses, even today. For example, OP_RETURN.&#xA;&#xA;However, this is a standarness question. If the market _wanted_ such an&#xA;address, one could be adopted without requiring consensus processes.&#xA;&#xA;Generally, the vault designs I work on use Sapio and therefore also use&#xA;Taproot since I have not added support for non-taproot scripts / removed&#xA;support for witness v0. I will eventually add these back, but it&#39;s a&#xA;marginal fee savings optimization and I&#39;m focused primarily on feature&#xA;completeness.&#xA;&#xA;&#xA;&gt; There might be even more exotic use cases of bare-CTV.  For example you&#xA;&gt; could commit to a transaction that has a second input that doesn&#39;t yet&#xA;&gt; exist in the UTXO set in an attempt to coax it into existence. I don&#39;t know&#xA;&gt; if there have been any proposals to take advantage of this.&#xA;&gt;&#xA;&#xA;There are, but it&#39;s not specific to how bare ctv works, it should work from&#xA;any CTV context.&#xA;&#xA;&gt;&#xA;&gt; With that said, everything that bare-CTV can do, can also be done by&#xA;&gt; tapscript-CTV; so it is just a matter of cost.  I&#39;m struggling to&#xA;&gt; understand where this cost savings is and how much those savings are going&#xA;&gt; to be given that bare-CTV is unaddressable and seems to ultimately occupy&#xA;&gt; more-blockspace than if the outputs were directly committed to.&#xA;&gt;&#xA;&gt; I also believe the bare-CTV question is material, because if bare-CTV were&#xA;&gt; not part of the spec, then I&#39;d be advocating for using an OP_SUCCESS code&#xA;&gt; from tapscript instead, and either use push-style semantics for CTV, which&#xA;&gt; would be composed with EQUAL_VERIFY to mimic the currently proposed&#xA;&gt; verification style-semantics, or a hybrid push-or-verify semantics that&#xA;&gt; would either push or verify depending on the size of the input.  (And I&#xA;&gt; still think a more general TXHASH would be even better, though if I cannot&#xA;&gt; convince aj then perhaps I&#39;m wrong.)&#xA;&gt;&#xA;&#xA;Even if we got rid of bare ctv, segwit v0 CTV would still exist, so we&#xA;couldn&#39;t use OP_SUCCESSx there either. segwitv0 might be desired if someone&#xA;has e.g. hardware modules or MPC Threshold Crypto that only support ECDSA&#xA;signatures, but still want CTV.&#xA;&#xA;&gt;&#xA;&gt; I&#39;m not saying bare-CTV is necessarily a bad idea.  I&#39;m just struggling&#xA;&gt; with its justification.&#xA;&gt;&#xA;&#xA;&#xA;Fair. I wouldn&#39;t have a big problem removing it, if it were clear that were&#xA;it to become desired, we could add it back. I think the case for CTV in&#xA;Segwitv0 is stronger, which has the same implication for a PUSH variant of&#xA;CTV.&#xA;&#xA;&#xA;Thanks again,&#xA;&#xA;Jeremy&#xA;&#xA;&#xA;&#xA;&gt; _______________________________________________&#xA;&gt; bitcoin-dev mailing list&#xA;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220421/c88f5d72/attachment.html&gt;</html></oembed>