Simplicity proposal [combined summary]



Individual post summaries: Click here to read the original discussion on the bitcoin-dev mailing list

Published on: 2017-11-03T16:42:38+00:00


Summary:

The Simplicity proposal introduces the concept of "jets", which are precompiled functions that can be called directly from Simplicity code. These jets allow for faster execution of Simplicity code compared to other blockchain languages, while also increasing security by reducing vulnerabilities to bugs and attacks. Each Simplicity expression is identified by its MAST root, which is the Merkle root of all branches in its Abstract Syntax Tree. When the Simplicity interpreter encounters an expression with a jet, it looks for it in a predefined jets dictionary and finds the binary for a precompiled, formally proven implementation of the function. This means that popular Simplicity expressions can be recognized and directly evaluated using specialized C or assembly code, rather than being interpreted.In response to concerns about the need for Simplicity code to be publicly available in the blockchain when using jets, it was explained that discounted jets will be explicitly labeled as jets in the commitment. If a user can provide a Merkle path to an explicit jet node that isn't among the known discounted jets, it will not be executed. This mitigates the need for large algorithms like EDCA verification/SHA256 hashing to take up space in the blockchain. Additionally, in a softfork for a jet, the Simplicity code for the jet could be defined as "consensus", eliminating the need for it to be provided within every script output. The use of formal verification ensures that the jets match the corresponding Simplicity code.The bitcoin-dev mailing list featured discussions on the Simplicity proposal and the use of jets. Users raised questions about the need for Simplicity code to be publicly available and the possibility of mitigating this. Russell O'Connor, in response, referred to section 3.4 of the Simplicity proposal document and explained how jets work. He mentioned that jets are briefly discussed in the proposal and are a way to recognize popular Simplicity expressions and directly evaluate their functions using specialized C or assembly code. Russell also clarified that discounted jets will be explicitly labeled as jets in the commitment, and a Merkle path to an explicit jet node can be provided if it isn't among the known discounted jets.The Simplicity programming language uses jets as a smart optimization technique to make complex Simplicity contracts more computationally efficient. Jets leverage the frames stack in the Simplicity Bit Machine, allowing for known results of expressions to be written to the active write frame instead of executing the expression step-by-step again. This optimization reduces CPU usage and ensures that jets cannot introduce side effects. Different sets of jets can create single-purpose dialects, similar to domain-specific languages, enhancing the vocabulary and semantics of Simplicity code.While there is a lack of specific information and links regarding jets in the Simplicity proposal, it is mentioned that discounted jets will be identified as such in the commitment. If a Merkle path can be provided to an explicit jet node that is not among the known discounted jets, it will also be considered a jet. However, further details on this feature are currently unavailable.


Updated on: 2023-08-01T22:05:54.451476+00:00