You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Will miniscript be adapted for taproot?
I guess a few things should c
9006
hange for taproot, as now we need the tap scripts, and not using OP_CHECKMULTISIG.
This work, you mean miniscript integrated to bitcoin core?
I think it's quite unrelated.
Now that taproot is locked in, protocols built on top of bitcoin will evolve, and if those protocol could express their scripts as a miniscript rather than several handcrafted tap scripts, I think it would make it harder to shoot themselves in the foot, easier to review.
If you wait miniscript to be integrated to bitcoin core first before starting taproot integration in this repo, I fear those protocols will fallback to hand crafted scripts when being rewritten.
This repository (and Miniscript as a research project in general) is different things, so it depends what you're talking about:
It contains the specification of the Miniscript language (which is an extension to the output descriptor language, which was first introduced in Bitcoin Core, and is now being BIP'ed; see https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-June/019151.html). Adding Taproot support to descriptors consists of a few different things:
Adding support x-only pubkeys (also already done).
Defining a Miniscript-variant for Taproot (which would lack the OP_CHECKMULTISIG(VERIFY) based scripts, can rely on stronger anti-malleability).
Adding support for MuSig(2) to descriptor key expressions; that's orthogonal to Miniscript, but also intersects with PSBT extensions for it to make it usable etc.
It contains one of the two Miniscript implementations (the other being rust-miniscript) that I know of, one mostly based on the Bitcoin Core script code, and is intended to be at least partially integrated with it. Currently that's sort of in limbo, as the code on itself here is hard to test, and extending it further may risk further divergence. This is the part that makes me hesitant about adding Taproot support for, as I'd much rather see it integrated into its "final" form in Core, but this will take time (and reviewers/contributors).
It contains a policy-to-miniscript compiler. If the miniscript logic itself is extended to support taproot, it wouldn't be hard to make the compiler do the same, but to be actually interesting it'd need to consider the ability to compile a single policy into a tree of scripts rather than a single script. I think doing this optimally is still an open research question.
So while I don't think it's much work per se to extend the Miniscript "specification" to support Taproot & BIP342 scripts, it's unclear to me how useful that is without implementations that can deal with it and target it. And at least as far as the C++ implementation here is concerned, I'd very much want to see it further along in integrating into Bitcoin Core before adding even more here. Rust-miniscript may be in a better position to start adding support for that.
Activity
sipa commentedon Jul 8, 2021
Yes, eventually.
But really this work should get integrated into Bitcoin Core first, things are blocked on that to make more progress.
Note that there already is tr() descriptor support independent of miniscript - it'll eventually be able to plug in there.
NicolasDorier commentedon Jul 8, 2021
This work, you mean miniscript integrated to bitcoin core?I think it's quite unrelated.
Now that taproot is locked in, protocols built on top of bitcoin will evolve, and if those protocol could express their scripts as a miniscript rather than several handcrafted tap scripts, I think it would make it harder to shoot themselves in the foot, easier to review.
If you wait miniscript to be integrated to bitcoin core first before starting taproot integration in this repo, I fear those protocols will fallback to hand crafted scripts when being rewritten.
sipa commentedon Jul 8, 2021
This repository (and Miniscript as a research project in general) is different things, so it depends what you're talking about:
tr()descriptors (already done, and unrelated to Miniscript; see https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md), though some aspects are missing (in particular, easy construction of descriptors without intended key path spend).So while I don't think it's much work per se to extend the Miniscript "specification" to support Taproot & BIP342 scripts, it's unclear to me how useful that is without implementations that can deal with it and target it. And at least as far as the C++ implementation here is concerned, I'd very much want to see it further along in integrating into Bitcoin Core before adding even more here. Rust-miniscript may be in a better position to start adding support for that.