Peter Wuille announces miniscript:
Just announced our Miniscript project website on the bitcoin-dev mailinglist: bitcoin.sipa.be/miniscript/
https://twitter.com/pwuille/status/1163592166062473217Miniscript is a language for writing (a subset of) Bitcoin Scripts in a structured way, enabling analysis, composition, generic signing and more.
Bitcoin Script is an unusual stack-based language with many edge cases, designed for implementing spending conditions consisting of various combinations of signatures, hash locks, and time locks. Yet despite being limited in functionality it is still highly nontrivial to:
Given a combination of spending conditions, finding the most economical script to implement it.
Given two scripts, construct a script that implements a composition of their spending conditions (e.g. a multisig where one of the "keys" is another multisig).
Given a script, find out what spending conditions it permits.
Given a script and access to a sufficient set of private keys, construct a general satisfying witness for it.
Given a script, be able to predict the cost of spending an output.
Given a script, know whether particular resource limitations like the ops limit might be hit when spending.
Miniscript functions as a representation for scripts that makes these sort of operations possible. It has a structure that allows composition. It is very easy to statically analyze for various properties (spending conditions, correctness, security properties, malleability, ...). It can be targeted by spending policy compilers (see below). Finally, compatible scripts can easily be converted to Miniscript form - avoiding the need for additional metadata for e.g. signing devices that support it.
In the Twitter thread Peter Wuille details some use of this:
In short, it's a way to write (some) Bitcoin scripts in a structured, composable way that allows various kinds of static analysis, generic signing, and compilation of policies.
Imagine a company wants to protect its cold storage funds using a 2-of-3 multisig policy with 3 executives. One of the executives however has a nice 2FA/multisig/timelock based setup on his own. Why can't that entire setup be one of the multisig "participants"?
A lot of work is focused on extensions to the functionality of the blockchain itself to support more complex application, but I feel we're forgetting that using these features in an accessible, composable, analyzable way is basically impossible today.
Miniscript Website:
http://bitcoin.sipa.be/miniscript/I am not an übertechical user, but it looks interesting to me:
The bitcoin protocol is getting better.
Better bitcoin protocol means bitcoin is more valuable
Better bitcoin protocol means shitcoins (value propositions) are less valuable!