Peter Wulle introduced Miniscript – a new smart contract language for Bitcoin

Peter Wulle introduced Miniscript – a new smart contract language for Bitcoin

Deploying smart contracts in Bitcoin may become easier – developer Pieter Wuille has introduced a new programming language designed specifically for their use.

The Miniscript language is designed to
make it easier for programmers to create more complete smart contracts in Bitcoin. According to Wulle, he, Andrew Poelstra, and Sanket Sanjalkar worked on the code for about a year. Although this was known in the developer community, Wulle noted that he decided to publish the language in the developer newsletter only this week, because it has now reached “a stage where I would like to attract more attention to it.”

Miniscript is based on the Script smart contract language, which gives users the ability to specify certain conditions that must be met before bitcoins can be spent. The code proposed by Wulle improves the base language in several ways at once.

For example, the developer notes that using the code has become easier. As an example, he cites a situation where “user A can pick up coins at any time, and user B-in one day”. Here’s how these rules are implemented in the Script code:

OP_EQUALVERIFY OP_CHECKSIGVERIFY <144> OP_CSV OP_ENDIF

And so in Miniscript:

or_d(c:pk(A),and_v(vc:pk_h(B),older(144)))

Miniscript is built on the basis of Script and is able to “compile” into the native language of Bitcoin.

The new code has received the approval of the community developers. For example, Blockstream engineer Rusty Russell tweeted:

“This will be one of those technologies that will greatly simplify our lives. It will be implemented discreetly, but it will be vital.”

There are many potential uses for the language, such as making it easier to implement complex scripts in a wallet, as Eric Lombrozo wrote. Or, as Jimmy Song pointed out, the code can even be used to support the Lightning Network.

Song also said that this smart contract language is different from the Solidity language in Ethereum. Although Ethereum allows you to write many more types of smart contracts, Miniscript offers more modest capabilities. However, according to Song, this is for the best, as it ” reduces the complexity and opportunities for attack.”

The code release includes two working implementations in the C++ and Rust programming languages, which Wulle called “incomplete”, adding:

“Through large-scale randomized tests, we are confident that the language design and associated proofs are compatible with existing consensus and standardization rules.”In May of this year, Peter Wulle presented
two BIPs for the future Bitcoin soft fork.