Bitcoin programmer, Pieter Wuille, officially released the “Miniscript” – a subset of Bitcoin’s Script language – after months of speculation and discussion across the blockchain’s development community. Peter, alongside Andrew Poelstra and Sanket Sanjalkar, developed the language for the past year to allow Bitcoin’s script to be
“in a structured way, enabling analysis, composition, generic signing and more.”
The “Miniscript” Launch
In an email sent to the bitcoin developer mailing list, Pieter stated the new developments on Bitcoin will be based on the current version of Bitcoin hence no need for consensus changes. Miniscript language is set to improve the overall coding of smart contracts and integrating better payment systems. The team will work on future scripts proposals in case of a change needed.
Miniscript builds on top of Script, improving the programming language addresses the developers concern to implement more complicated issues than the legacy multi signature conditions. The new language provides software that will improve the payment structure on Bitcoin, the security of keys and compile complex spending policies to efficient scripts.
An example of how Miniscript can be used on Bitcoin is establishing an account that allows person A to access funds at any time but person B can only access the funds after a day.
The example above in Miniscript would read,
instead of Script’s
<A> OP_CHECKSIG OP_IFDUP OP_NOTIF OP_DUP OP_HASH160 <hash160(B)>
OP_EQUALVERIFY OP_CHECKSIGVERIFY <144> OP_CSV OP_ENDIF
While there exists a number of use cases for the “Miniscript” language, it does not replace Ethereum’s solidity functions as explained by Jimmy Song, a Bitcoin educator. As a matter of fact, Miniscript differs from solidity programing language as the latter allows developers to create a number of smart contracts while the former minimizes the possibilities. Song argues this is better because it reduces the “complexity” and “attack surface.”
Furthermore, the development team will provide users with two implementations (still a work in progress) of the language – C++ and Rust. The email further reads,
“The implementations are a work in progress, but through large scale randomized tests we have confidence that the language design and associated witnesses are compatible with the existing consensus and standard rules.”