<oembed><type>rich</type><version>1.0</version><title>Jeremy Rubin [ARCHIVE] wrote</title><author_name>Jeremy Rubin [ARCHIVE] (npub1xu…fzef0)</author_name><author_url>https://yabu.me/npub1xukrzempxc95ags094lgrfvnvwm7gkuwj3d98qwrzgsynskyhp9qkfzef0</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2022-04-26&#xA;📝 Original message:I can&#39;t find all of my earlier references around this, I thought I made a&#xA;thread on it, but as a reminder, my thoughts for mild tweaks to APO that&#xA;make it a bit less hacky are as follows:&#xA;&#xA;- Remove OP_1 key punning and replace it with OP_GENERATOR and&#xA;OP_INTERNALKEY (maybe OP_EXTERNALKEY too?). The key punning is useful&#xA;generically, because I may want to reuse the internal key in conjunction&#xA;with a script path in some circumstances.&#xA;- Add an additional sequence field that is specific to a signature with no&#xA;other consensus meaning, so APO can be used with absolute timelocks. For&#xA;example, this makes it impossible for more than one ratchet to be&#xA;aggregated within a single transaction under any circumstance if their&#xA;sequences differ (not sure this is a good example, but an example&#xA;nonetheless).&#xA;- Replace tagged keys for APO with either a Checksig2 or a separate feature&#xA;flag that enables or disables APO behavior so that we can have programmatic&#xA;control over if APO is allowed for a given key (e..g., OP_IF &lt;N&gt; CSV DROP&#xA;CHECKSIG2 OP_ELSE CHECKSIG OP_ENDIF enables APO to be turned on after a&#xA;certain time, perhaps for a pre-approved backup transaction).&#xA;&#xA;Overall, this would make eltoo ratchets look something like this:&#xA;&#xA;&lt;sig&gt; &lt;seq&gt; OP_1 OP_INTERNALKEY OP_CHECKSIG2VERIFY &lt;N&gt; OP_GREATERTHAN&#xA;&#xA;where checksig2 leaves seq on the stack which can be used to enforce the&#xA;ratchet.&#xA;&#xA;and covenants like:&#xA;&#xA;&lt;sig&gt; OP_1 OP_1 OP_GENERATOR OP_CHECKSIG2VERIFY&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;On Fri, Apr 22, 2022 at 4:23 AM 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/20220426/8de4425a/attachment-0001.html&gt;</html></oembed>