<oembed><type>rich</type><version>1.0</version><title>Nadav Ivgi [ARCHIVE] wrote</title><author_name>Nadav Ivgi [ARCHIVE] (npub1f2…ydpll)</author_name><author_url>https://yabu.me/npub1f2w9pm06c4k9ay8rst7757thahg2tfrtd0n645zxrtsqwhvaysrswydpll</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2022-04-29&#xA;📝 Original message:Here&#39;s a summary of the trade-offs I see for using APO as a CTV alternative:&#xA;&#xA;1. The resulting txids are not stable.&#xA;&#xA;CTV commits to enough tx information such that given the txid:vout of the&#xA;covenant-encumbered output, you can predict the txid of the spending tx&#xA;permitted by CTV (and of the entire transaction graph descending from it).&#xA;&#xA;This property could be important for some of the proposed CTV use-cases,&#xA;like channel factories.&#xA;&#xA;2. APO will only be available on Taproot, which some people might prefer to&#xA;avoid for long-term multi-decade vault storage due to QC concerns. (also&#xA;see my previous post on this thread [0])&#xA;&#xA;3. Higher witness satisfaction cost of roughly 3x vbytes vs CTV-in-Taproot&#xA;(plus 33 extra vbytes vs CTV-in-segwitv0 *in the case of a single CTV&#xA;branch*, for the taproot control block. with more branches CTV-in-taproot&#xA;eventually becomes preferable).&#xA;&#xA;4. Higher network-wide full-node validation costs (checking a signature is&#xA;quite more expensive than hashing, and the hashing is done in both cases).&#xA;&#xA;5. As APO is currently spec&#39;d, it would suffer from the half-spend problem:&#xA;if you have multiple outputs encumbered under an APO covenant that requires&#xA;the same tx sigmsg hash, it becomes possible to spend all of them together&#xA;as multiple inputs in a single transaction and burn the extra to mining&#xA;fees.&#xA;&#xA;If I&#39;m not mistaken, I believe this makes the simple-apo-vault&#xA;implementation [1] vulnerable to spending multiple vaulted outputs of the&#xA;same denomination together and burning all but the first one. I asked the&#xA;author for a more definitive answer on twitter [2].&#xA;&#xA;Fixing this requires amending BIP 118 with some new sigmsg flags (making&#xA;the ANYONECANPAY behaviour optional, as mentioned in the OP).&#xA;&#xA;This is definitely possible but also means that APO as-is isn&#39;t a&#xA;CTV-replacement candidate, without first going through some more design and&#xA;review iterations.&#xA;&#xA;shesek&#xA;&#xA;[0]&#xA;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-April/020326.html&#xA;[1] https://github.com/darosior/simple-anyprevout-vault&#xA;[2] https://twitter.com/shesek/status/1519874493434544128&#xA;&#xA;&#xA;&#xA;On Fri, Apr 22, 2022 at 2:23 PM darosior via bitcoin-dev &lt;&#xA;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&#xA;&gt; I would like to know people&#39;s sentiment about doing (a very slightly&#xA;&gt; tweaked version of) BIP118 in place of&#xA;&gt; (or before doing) BIP119.&#xA;&gt;&#xA;&gt; SIGHASH_ANYPREVOUT and its precedent iterations have been discussed for&#xA;&gt; over 6 years. It presents proven and&#xA;&gt; implemented usecases, that are demanded and (please someone correct me if&#xA;&gt; i&#39;m wrong) more widely accepted than&#xA;&gt; CTV&#39;s.&#xA;&gt;&#xA;&gt; SIGHASH_ANYPREVOUTANYSCRIPT, if its &#34;ANYONECANPAY&#34; behaviour is made&#xA;&gt; optional [0], can emulate CTV just fine.&#xA;&gt; Sure then you can&#39;t have bare or Segwit v0 CTV, and it&#39;s a bit more&#xA;&gt; expensive to use. But we can consider CTV&#xA;&gt; an optimization of APO-AS covenants.&#xA;&gt;&#xA;&gt; CTV advocates have been presenting vaults as the flagship usecase.&#xA;&gt; Although as someone who&#39;ve been trying to&#xA;&gt; implement practical vaults for the past 2 years i doubt CTV is necessary&#xA;&gt; nor sufficient for this (but still&#xA;&gt; useful!), using APO-AS covers it. And it&#39;s not a couple dozen more virtual&#xA;&gt; bytes that are going to matter for&#xA;&gt; a potential vault user.&#xA;&gt;&#xA;&gt; If after some time all of us who are currently dubious about CTV&#39;s stated&#xA;&gt; usecases are proven wrong by onchain&#xA;&gt; usage of a less efficient construction to achieve the same goal, we could&#xA;&gt; roll-out CTV as an optimization.  In&#xA;&gt; the meantime others will have been able to deploy new applications&#xA;&gt; leveraging ANYPREVOUT (Eltoo, blind&#xA;&gt; statechains, etc..[1]).&#xA;&gt;&#xA;&gt;&#xA;&gt; Given the interest in, and demand for, both simple covenants and better&#xA;&gt; offchain protocols it seems to me that&#xA;&gt; BIP118 is a soft fork candidate that could benefit more (if not most of)&#xA;&gt; Bitcoin users.&#xA;&gt; Actually i&#39;d also be interested in knowing if people would oppose the&#xA;&gt; APO-AS part of BIP118, since it enables&#xA;&gt; CTV&#39;s features, for the same reason they&#39;d oppose BIP119.&#xA;&gt;&#xA;&gt;&#xA;&gt; [0] That is, to not commit to the other inputs of the transaction (via&#xA;&gt; `sha_sequences` and maybe also&#xA;&gt; `sha_amounts`). Cf&#xA;&gt; https://github.com/bitcoin/bips/blob/master/bip-0118.mediawiki#signature-message&#xA;&gt; .&#xA;&gt;&#xA;&gt; [1] https://anyprevout.xyz/ &#34;Use Cases&#34; section&#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/20220429/08486216/attachment.html&gt;</html></oembed>