<p>It has always been the case that the full Bit Machine would be "exposed"[1] by allowing arbitrary Simplicity.  This is because the combinators that let you compose the high-level jets are exactly the same combinators that define low-level Simplicity.  Thus even if only a few high-level jets are chosen to be exposed, it would still be the case that the low-level combinators could be used to define any function (at great expense, of course).</p>

<p>The real question is, what selection of jets will be made available and at what cost?  That question, while really important, gets decided near the end of development, so technically it hasn't been addressed yet.  I'm inclined to be quite liberal on accepting lots of jets.  For example, I'd like to have all functions from <a href="https://github.com/mit-plv/fiat-crypto" rel="noreferrer">fiat-crypto</a> extracted (both as Simplicity and as C) and implemented as jets.</p>

<p>That said, Elements is a platform, and users of that platform will have the ability to choose whatever selection of jets they wish, which may vary depending on how far along the proofs of correctness are and how comfortable they are with the risk-level for greater or fewer number of jets, or even add their own jets.  Furthermore, as Maxwell noted, we really need to get some experience with using Simplicity to understand what are and are not useful jets.  We will want this experience this before Simplicity would be integrated into Liquid.</p>

<p>[1] Just to be clear, the Bit Machine is never directly exposed.  The Bit Machine can only be run through interpreting well-typed Simplicity programs.  This is important because the Bit Machine relies on the type-safety of Simplicity for its memory safety. Otherwise the Bit Machine could crash.</p>

CC BY-SA 4.0
2019-09-06T16:51:22.000Z
2019-09-06T16:51:22.000Z
Russell O'Connor
<p><a href="https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-October/015227.html" rel="nofollow noreferrer">Greg Maxwell noted that there are two ways to integrate Simplicity</a> into Bitcoin. One is to make only a few select high-level constructs available (like SHA256, CheckSigHashAll), the other is to expose a full bit machine as specified in the Simplicity Technical Report.</p>

<p>Now that <a href="https://github.com/ElementsProject/elements/compare/simplicity" rel="nofollow noreferrer">Simplicity is being integrated</a>, presumably a decision must have been made on how it will work.</p>

<p>Which approach was chosen?</p>

<script><liquid><simplicity>
How does Elements integrate Simplicity?
Janus Troelsen
# How does Elements integrate Simplicity?

(Asked by: username_0 on 2019-09-05)

[Greg Maxwell noted that there are two ways to integrate Simplicity](https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-October/015227.html) into Bitcoin. One is to make only a few select high-level constructs available (like SHA256, CheckSigHashAll), the other is to expose a full bit machine as specified in the Simplicity Technical Report.

Now that [Simplicity is being integrated](https://github.com/ElementsProject/elements/compare/simplicity), presumably a decision must have been made on how it will work.

Which approach was chosen?

**Tags:** script, liquid, simplicity


---

## 1 answers

### Answer by username_1 on 2019-09-06. Score: 5 | Accepted answer

It has always been the case that the full Bit Machine would be "exposed"[1] by allowing arbitrary Simplicity. This is because the combinators that let you compose the high-level jets are exactly the same combinators that define low-level Simplicity. Thus even if only a few high-level jets are chosen to be exposed, it would still be the case that the low-level combinators could be used to define any function (at great expense, of course).

The real question is, what selection of jets will be made available and at what cost? That question, while really important, gets decided near the end of development, so technically it hasn't been addressed yet. I'm inclined to be quite liberal on accepting lots of jets. For example, I'd like to have all functions from [fiat-crypto](https://github.com/mit-plv/fiat-crypto) extracted (both as Simplicity and as C) and implemented as jets.

That said, Elements is a platform, and users of that platform will have the ability to choose whatever selection of jets they wish, which may vary depending on how far along the proofs of correctness are and how comfortable they are with the risk-level for greater or fewer number of jets, or even add their own jets. Furthermore, as Maxwell noted, we really need to get some experience with using Simplicity to understand what are and are not useful jets. We will want this experience this before Simplicity would be integrated into Liquid.

[1] Just to be clear, the Bit Machine is never directly exposed. The Bit Machine can only be run through interpreting well-typed Simplicity programs. This is important because the Bit Machine relies on the type-safety of Simplicity for its memory safety. Otherwise the Bit Machine could crash.


---

