What's the purpose of the Simplicity jets for Miniscript translation? #110
-
In #107 some Simplicity jets are added for Miniscript translation. Is the (long term) aim to be able to convert Simplicity programs into Miniscript and vice versa when the Simplicity program has a direct mapping to Miniscript (i.e. only uses functionality in the subset of Script that Miniscript covers). Why does that need to be a jet? I (perhaps mistakenly) thought jets were exclusively for adding functionality (hash functions, signature verifications etc) to the Simplicity language rather than facilitating conversions into other languages/encodings? Is the terminology "jet" just being used interchangeably with something like "module"? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
We have a near term project to translate Miniscript to Simplicity (but not the other way). Since Simplicity is such a low-level language, Miniscript can serve as an entry point to generating Simplicity expressions for common policies or policy fragments. Miniscript extensions can then be built to generate Simplicity specific extensions unavailable in Bitcoin Script. Even without using extensions, the generated Simplicity programs are still slightly more powerful as the generated "CheckSig" operations in Simplicity will give access to Simplicity's programmable sighash modes (although further development will be needed to generate witness data taking full advantage of these programmable sighash modes). There may be a misunderstanding of the purpose of #107: To be clear, no jets are being designed to specifically support this Miniscript translation. This PR merely prioritizes the implementation of jets already slated for implementation in order to support the Miniscript translation. In particular the PR is adding jets for things like, comparing two 256-bit strings for equality, and implementing the less-than-or-equal jet for 32-bit unsigned integers, etc, all of which were eventually going to be implemented anyways. |
Beta Was this translation helpful? Give feedback.
We have a near term project to translate Miniscript to Simplicity (but not the other way). Since Simplicity is such a low-level language, Miniscript can serve as an entry point to generating Simplicity expressions for common policies or policy fragments. Miniscript extensions can then be built to generate Simplicity specific extensions unavailable in Bitcoin Script. Even without using extensions, the generated Simplicity programs are still slightly more powerful as the generated "CheckSig" operations in Simplicity will give access to Simplicity's programmable sighash modes (although further development will be needed to generate witness data taking full advantage of these programmable sig…