<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:Missed one for part 2:&#xA;&#xA;Shesek&#39;s social recovery wallet using CTV to enforce timelocks without&#xA;expiry, using his Minsc toolchain:&#xA;&#xA;https://twitter.com/shesek/status/1511619296367153153&#xA;https://docs.google.com/presentation/d/1B59CdMIXW-wSW6CaLSgo7y4kvgrEwVgfY14IW2XV_MA/edit#slide=id.g1235f9ffb79_0_81&#xA;https://github.com/shesek/plebfi2022-social-recovery&#xA;--&#xA;@JeremyRubin &lt;https://twitter.com/JeremyRubin&gt;&#xA;&#xA;&#xA;On Thu, Apr 21, 2022 at 1:16 AM Jeremy Rubin &lt;jeremy.l.rubin at gmail.com&gt;&#xA;wrote:&#xA;&#xA;&gt; Probably merits a more thorough response, but, I wanted to respond on the&#xA;&gt; framework above:&#xA;&gt;&#xA;&gt;&#xA;&gt;  1a) can you make transactions using the new feature with bitcoin-cli,&#xA;&gt;      eg createrawtransaction etc? (*YES)*&#xA;&gt;&#xA;&gt; since ~Feb 2020, this has existed:&#xA;&gt; https://github.com/JeremyRubin/bitcoin/tree/checktemplateverify-feb1-workshop&#xA;&gt;&#xA;&gt; CTV hasn&#39;t changed so this code should work un-rebased. The transaction&#xA;&gt; outputs may need to be manually submitted to the network, but the covenant&#xA;&gt; is enforced. This covers congestion control and vaults.&#xA;&gt;&#xA;&gt;&#xA;&gt;  1b) can you make transactions using the new feature with some other&#xA;&gt;      library? *(YES)*&#xA;&gt; Sapio, Test Framework, also https://min.sc/nextc/ produced independently&#xA;&gt; by Shesek&#xA;&gt;&#xA;&gt;  1c) can you make transactions using the new feature with most common&#xA;&gt;      libraries? *(YES, kinda)*&#xA;&gt;&#xA;&gt; Yes, https://crates.io/crates/sapio-miniscript and&#xA;&gt; https://crates.io/crates/sapio-bitcoin have been maintained for about 1&#xA;&gt; year, and are now taproot compatible.&#xA;&gt;&#xA;&gt; Sapio&#39;s use of these libraries has even helped find bugs in the release&#xA;&gt; process of Taproot for rust-bitcoin.&#xA;&gt;&#xA;&gt; kinda: It&#39;s not _most_ common libraries, it&#39;s _a_ common library. it&#39;s&#xA;&gt; also not upstreamed, because the patches would not be accepted were it to&#xA;&gt; be.&#xA;&gt;&#xA;&gt;  2) has anyone done a usable prototype of the major use cases of the new&#xA;&gt;     feature?* (YES)*&#xA;&gt;&#xA;&gt; In addition to https://github.com/jamesob/simple-ctv-vault, there is also&#xA;&gt; https://github.com/kanzure/python-vaults, although it has an interesting&#xA;&gt; bug.&#xA;&gt;&#xA;&gt; There&#39;s also a myriad of uses shown in&#xA;&gt; https://github.com/sapio-lang/sapio/tree/master/sapio-contrib/src/contracts&#xA;&gt; and in https://github.com/sapio-lang/sapio/tree/master/plugin-example.&#xA;&gt; While these aren&#39;t quite &#34;usable&#34; as an end-to-end application, e.g.,&#xA;&gt; something you&#39;d want to put real money on, they are a part of a *massive*&#xA;&gt; infrastructure investment in general purpose smart contract tooling for&#xA;&gt; covenant design with CTV. That CTV can be targeted with a compiler to&#xA;&gt; generate a wide variety of composable use cases *is* one of the use cases&#xA;&gt; for CTV, since it enables people to design many different types of thing&#xA;&gt; relatively easily. That is a feature of CTV! It&#39;s not just for one use case.&#xA;&gt;&#xA;&gt; The suite of Sapio apps are less &#34;production ready&#34; than they could be for&#xA;&gt; a few reasons:&#xA;&gt;&#xA;&gt; 1) I&#39;ve been working hard at pushing the limits of what is possible &amp; the&#xA;&gt; theory of it v.s. making it production ready&#xA;&gt; 2) I prioritized supporting Taproot v.s. legacy script, and much of the&#xA;&gt; taproot tooling isn&#39;t production ready&#xA;&gt; 3) Sapio is really ambitious undertaking, and it will take time to make it&#xA;&gt; production&#xA;&gt;&#xA;&gt; That said, https://rubin.io/bitcoin/2022/03/22/sapio-studio-btc-dev-mtg-6/&#xA;&gt; tutorial was completed by people who weren&#39;t me, and at the&#xA;&gt; pleb.fi/miami2022 one of the projects was able to use sapio congestion&#xA;&gt; control transactions as well, so it does &#34;work&#34;. As it matures, we&#39;ll get a&#xA;&gt; number of implemented use cases people have been excited about like DLCs,&#xA;&gt; which are implemented here&#xA;&gt; https://github.com/sapio-lang/sapio/blob/master/sapio-contrib/src/contracts/derivatives/dlc.rs.&#xA;&gt; You can see the test case shows how to construct one.&#xA;&gt;&#xA;&gt; Why did I not focus on production grade? Well, production grade can always&#xA;&gt; happen later, and I don&#39;t think it takes as much imagination. But the main&#xA;&gt; critique I&#39;d heard of CTV was that no one could see it being used for&#xA;&gt; anything but one or two use cases. So I built Sapio, in part, to show how&#xA;&gt; CTV could be used for an incredibly wide and diverse set of applications,&#xA;&gt; as opposed to the polish on them.&#xA;&gt;&#xA;&gt; If I knew the bar to surpass was to be polish, I probably could have taken&#xA;&gt; a less ambitious approach with Sapio and shown like 1-2 applications&#xA;&gt; working end-to-end. But because the main feedback I got was that CTV wasn&#39;t&#xA;&gt; powerful enough, I opted to build a very general framework for covenants&#xA;&gt; and demonstrate how CTV fits that.&#xA;&gt;&#xA;&gt;&#xA;&gt;&#xA;&gt;&#xA;&gt;&#xA;&gt; --&#xA;&gt; @JeremyRubin &lt;https://twitter.com/JeremyRubin&gt;&#xA;&gt;&#xA;&gt; On Thu, Apr 21, 2022 at 12:05 AM Anthony Towns via bitcoin-dev &lt;&#xA;&gt; bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&gt;&#xA;&gt;&gt; On Wed, Apr 20, 2022 at 05:13:19PM +0000, Buck O Perley via bitcoin-dev&#xA;&gt;&gt; wrote:&#xA;&gt;&gt; &gt; All merits (or lack thereof depending on your view) of CTV aside, I&#xA;&gt;&gt; find this topic around decision making both interesting and important.&#xA;&gt;&gt; While I think I sympathize with the high level concern about making sure&#xA;&gt;&gt; there are use cases, interest, and sufficient testing of a particular&#xA;&gt;&gt; proposal before soft forking it into consensus code, it does feel like the&#xA;&gt;&gt; attempt to attribute hard numbers in this way is somewhat arbitrary.&#xA;&gt;&gt;&#xA;&gt;&gt; Sure. I included the numbers for falsifiability mostly -- so people&#xA;&gt;&gt; could easily check if my analysis was way off the mark.&#xA;&gt;&gt;&#xA;&gt;&gt; &gt; For example, I think it could be reasonable to paint the list of&#xA;&gt;&gt; examples you provided where CTV has been used on signet in a positive&#xA;&gt;&gt; light. 317 CTV spends “out in the wild” before there’s a known activation&#xA;&gt;&gt; date is quite a lot&#xA;&gt;&gt;&#xA;&gt;&gt; Not really? Once you can make one transaction, it&#39;s trivial to make&#xA;&gt;&gt; hundreds. It&#39;s more interesting to see if there&#39;s multiple wallets or&#xA;&gt;&gt; similar that support it; or if one wallet has a particularly compelling&#xA;&gt;&gt; use case.&#xA;&gt;&gt;&#xA;&gt;&gt; &gt; (more than taproot had afaik).&#xA;&gt;&gt;&#xA;&gt;&gt; Yes; as I&#39;ve said a few times now, I think we should have had more&#xA;&gt;&gt; real life demos before locking taproot&#39;s activation in. I think that&#xA;&gt;&gt; would have helped avoid bugs like Neutrino&#39;s [0] and made it easier for&#xA;&gt;&gt; hardware wallets etc to have support for taproot as soon as it was active,&#xA;&gt;&gt; without having to rush around adding library support at the last minute.&#xA;&gt;&gt;&#xA;&gt;&gt; [0]&#xA;&gt;&gt; https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-November/019589.html&#xA;&gt;&gt;&#xA;&gt;&gt; Lightning&#39;s &#34;two independent implementations&#34; rule might be worth aspiring&#xA;&gt;&gt; too, eg.&#xA;&gt;&gt;&#xA;&gt;&gt; &gt; If we don’t think it is enough, then what number of unique spends and&#xA;&gt;&gt; use cases should we expect to see of a new proposal before it’s been&#xA;&gt;&gt; sufficiently tested?&#xA;&gt;&gt;&#xA;&gt;&gt; I don&#39;t really think that&#39;s the metric. I&#39;d go for something more like:&#xA;&gt;&gt;&#xA;&gt;&gt;  1a) can you make transactions using the new feature with bitcoin-cli,&#xA;&gt;&gt;      eg createrawtransaction etc?&#xA;&gt;&gt;  1b) can you make transactions using the new feature with some other&#xA;&gt;&gt;      library?&#xA;&gt;&gt;  1c) can you make transactions using the new feature with most common&#xA;&gt;&gt;      libraries?&#xA;&gt;&gt;&#xA;&gt;&gt;  2) has anyone done a usable prototype of the major use cases of the new&#xA;&gt;&gt;     feature?&#xA;&gt;&gt;&#xA;&gt;&gt; I think the answers for CTV are:&#xA;&gt;&gt;&#xA;&gt;&gt;  1a) no&#xA;&gt;&gt;  1b) yes, core&#39;s python test suite, sapio&#xA;&gt;&gt;  1c) no&#xA;&gt;&gt;  2) no&#xA;&gt;&gt;&#xA;&gt;&gt; Though presumably jamesob&#39;s simple ctv vault is close to being an answer&#xA;&gt;&gt; for (2)?&#xA;&gt;&gt;&#xA;&gt;&gt; For taproot, we had,&#xA;&gt;&gt;&#xA;&gt;&gt;  1a) yes, with difficulty [1]&#xA;&gt;&gt;  1b) yes, core&#39;s python test suite; kalle&#39;s btcdeb sometimes worked too&#xA;&gt;&gt;  1c) no&#xA;&gt;&gt;  2) optech&#39;s python notebook [2] from it&#39;s taproot workshops had demos for&#xA;&gt;&gt;     musig and degrading multisig via multiple merkle paths, though I&#xA;&gt;&gt;     think they were out of date with the taproot spec for a while&#xA;&gt;&gt;&#xA;&gt;&gt; [1]&#xA;&gt;&gt; https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-October/019543.html&#xA;&gt;&gt; [2] https://github.com/bitcoinops/taproot-workshop/&#xA;&gt;&gt;&#xA;&gt;&gt; To some extent those things are really proxies for:&#xA;&gt;&gt;&#xA;&gt;&gt;  3) how well do people actually understand the feature?&#xA;&gt;&gt;&#xA;&gt;&gt;  4) are we sure the tradeoffs being made in this implementation of the&#xA;&gt;&gt;     feature, vs other implementations or other features actually make&#xA;&gt;&gt;     sense?&#xA;&gt;&gt;&#xA;&gt;&gt;  5) how useful is the feature?&#xA;&gt;&gt;&#xA;&gt;&gt; I think we were pretty confident in the answers for those questions&#xA;&gt;&gt; for taproot. At least personally, I&#39;m still not super confident in&#xA;&gt;&gt; the answers for CTV. In particular:&#xA;&gt;&gt;&#xA;&gt;&gt;  - is there really any benefit to doing it as a NOP vs a taproot-only&#xA;&gt;&gt;    opcode like TXHASH? Theoretically, sure, that saves some bytes; but as&#xA;&gt;&gt;    was pointed out on #bitcoin-wizards the other day, you can&#39;t express&#xA;&gt;&gt;    those outputs as an address, which makes them not very interoperable,&#xA;&gt;&gt;    and if they&#39;re not interoperable between, say, an exchange and its&#xA;&gt;&gt;    users trying to do a withdraw, how useful is that really ever going&#xA;&gt;&gt;    to be?&#xA;&gt;&gt;&#xA;&gt;&gt;  - the scriptSig commitments seems very kludgy; combining multiple&#xA;&gt;&gt;    inputs likewise seems kludgy&#xA;&gt;&gt;&#xA;&gt;&gt; The continual push to rush activation of it certainly doesn&#39;t increase my&#xA;&gt;&gt; confidence either. Personally, I suspect it&#39;s counterproductive; better&#xA;&gt;&gt; to spend the time answering questions and improving the proposal, rather&#xA;&gt;&gt; than spending time going around in circles about activating something&#xA;&gt;&gt; people aren&#39;t (essentially) unanimously confident about.&#xA;&gt;&gt;&#xA;&gt;&gt; &gt; In absence of the above, the risk of a constantly moving bar&#xA;&gt;&gt;&#xA;&gt;&gt; I&#39;d argue the bar *should* be constantly moving, in the sense that we&#xA;&gt;&gt; should keep raising it.&#xA;&gt;&gt;&#xA;&gt;&gt; &gt; To use your meme, miners know precisely what they’re mining for and&#xA;&gt;&gt; what a metric of success looks like which makes the risk/costs of&#xA;&gt;&gt; attempting the PoW worth it&#xA;&gt;&gt;&#xA;&gt;&gt; The difference between mining and R&amp;D is variance: if you&#39;re competing for&#xA;&gt;&gt; 50k blocks a year, you can get your actual returns to closely match your&#xA;&gt;&gt; expected return, especially if you pool with others so your probability&#xA;&gt;&gt; of success isn&#39;t miniscule -- for consensus dev, you can reasonably only&#xA;&gt;&gt; work on a couple of projects a year, so your median return is likely $0,&#xA;&gt;&gt; rather than a close match to your average/expected return.&#xA;&gt;&gt;&#xA;&gt;&gt; &gt; We also have new ideas that only started coming up after Taproot&#xA;&gt;&gt; activation (TLUV and Taro for example), so there’s also the unknown of what&#xA;&gt;&gt; we could have once it becomes clear that it’s worth devoting mental energy&#xA;&gt;&gt; and financial resources towards research.&#xA;&gt;&gt;&#xA;&gt;&gt; TLUV was an offshoot of SCRIPTREPLACE which was public (though not&#xA;&gt;&gt; really published) since 2019.&#xA;&gt;&gt;&#xA;&gt;&gt; &gt; One last wrinkle with regards to using countable metrics to determine a&#xA;&gt;&gt; feature’s “worth” is that not all features are the same. Many of the use&#xA;&gt;&gt; cases that people are excited to use CTV for ([5], [6]) are very long term&#xA;&gt;&gt; in nature and targeted for long term store of value in contrast to medium&#xA;&gt;&gt; of exchange.&#xA;&gt;&gt;&#xA;&gt;&gt; I mean, if those use cases are so exciting, it really doesn&#39;t seem much&#xA;&gt;&gt; to ask to see them demoed live on the CTV signet that already exists?&#xA;&gt;&gt;&#xA;&gt;&gt; &gt; You can build a CTV vault in signet, but you’ll only really see a lot&#xA;&gt;&gt; of people using it when it’s to store real value on a time scale measured&#xA;&gt;&gt; in decades not minutes or days&#xA;&gt;&gt;&#xA;&gt;&gt; On the other hand, if the value is really &#34;very long term&#34; and there&#39;s no&#xA;&gt;&gt; rush to implement these features and demo them ASAP, then it doesn&#39;t seem&#xA;&gt;&gt; like there should be a rush to adapt consensus to these use cases either.&#xA;&gt;&gt; Why not wait until someone does have time to finish sketching out the&#xA;&gt;&gt; use case so they can demo them in public?&#xA;&gt;&gt;&#xA;&gt;&gt; &gt; To put another way and leave CTV out of it completely, what should an&#xA;&gt;&gt; outside, unbiased observer that doesn’t spend much time on Twitter expect&#xA;&gt;&gt; to be able to see to evaluate the readiness or acceptability of ANYPREVOUT,&#xA;&gt;&gt; TLUV,&#xA;&gt;&gt;&#xA;&gt;&gt; For ANYPREVOUT, I would like to see a toy implementation of eltoo using&#xA;&gt;&gt; it, that can handle fees and layered transactions (or has a good argument&#xA;&gt;&gt; why layered transactions aren&#39;t necessary). It&#39;s going to take a while&#xA;&gt;&gt; even to update LN to taproot and PTLCs though, so eltoo doesn&#39;t seem like&#xA;&gt;&gt; it&#39;s on the immediate horizon. Besides eltoo, I don&#39;t think ANYPREVOUT&#xA;&gt;&gt; is an optimal design for covenants, so if that was the motivation and&#xA;&gt;&gt; not eltoo, maybe some other approach would be better.&#xA;&gt;&gt;&#xA;&gt;&gt; TLUV&#39;s design parameters don&#39;t really seem optimal (the mess with x-only&#xA;&gt;&gt; pubkeys, alternatives like OP_EVICT), so I think it&#39;s still on the&#xA;&gt;&gt; whiteboard.&#xA;&gt;&gt;&#xA;&gt;&gt; Cheers,&#xA;&gt;&gt; aj&#xA;&gt;&gt;&#xA;&gt;&gt; _______________________________________________&#xA;&gt;&gt; bitcoin-dev mailing list&#xA;&gt;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&gt;&gt;&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220421/a4e08892/attachment-0001.html&gt;</html></oembed>