*** Update as of 10/10/19: Enigma has a new, streamlined developer environment that also enables simulation mode. Check it out here ***

Hello to the Enigma community! The Enigma dev team is excited to announce the latest improvement to the Enigma testnet — the addition of simulation mode. This change means you no longer need special hardware to try out Enigma and secret contracts, opening our testnet up further to developers.

This is just one of many improvements we are planning as we refine our testnet for developers looking to build privacy-preserving smart contracts with Enigma. Read on for more details about this important and highly-requested feature, as well as information on how you can get started coding secret contracts today!

What is Simulation Mode?

Recall that in the first version of the Enigma testnet, we utilize Intel Software Guard Extensions (Intel SGX) to provide a hardware-based privacy solution. (More details on this were covered previously in our partnership announcement with Intel.) The new simulation mode works in the same way as the current debug mode, except that true hardware is not exercised — instead, the Intel SGX instructions are simulated in software.

This means that running the Enigma testnet in simulation mode will not require you to have Intel SGX hardware enabled on your machine. Instead, you will use the Simulation Libraries to run application enclaves in simulation mode, thereby lowering the barrier to start developing secret contracts. However, this mode will not provide hardware protection.

(Note: Custom exception handling is only supported in Hardware mode (Sky-Lake Platform. Although the exception handlers can be registered in simulation mode, the exceptions cannot be caught and handled within the enclave.)

What are Simulation Libraries?

The Intel SGX SDK provides simulation libraries that allow you to run application enclaves in simulation mode. There is both an untrusted simulation library and a trusted simulation library.

The untrusted simulation library provides the functionality that the untrusted runtime library requires to manage an enclave linked with the trusted simulation library, including the simulation of the Intel SGX instructions executed outside the enclave: EADD, EEXTEND, EINIT, EREMOVE, and ECREATE.

The trusted simulation library is primarily responsible for simulating the Intel SGX instructions that can be executed inside an enclave: EEXIT, EGETKEY, and EREPORT.

Who can run simulation mode?

Currently the only tested OS that works is in Linux/Unix-like distributions. We are currently working on enabling MacOS as well.

**Update: Simulation mode is now fully supported on MacOS!**

How do I launch Enigma in simulation mode?

The Enigma Docker Network is the first release of the Enigma Protocol in a containerized environment that offers a complete testnet.

To launch the network, follow the documentation in:

https://github.com/enigmampc/enigma-docker-network#configuring-software-sgx-mode

How do I build and launch components separately?

Essentially all the configurations are the same as you would typically use with normal Hardware Mode with only minor modifications.

Our code base (currently) splits into 2 modules: surface and core.

Core simulation mode:

https://github.com/enigmampc/enigma-core#simulation-mode

Surface simulation mode:

https://github.com/enigmampc/surface#running-in-simulation-mode

This is awesome, now what?

Once you’ve read through the documentation linked above, be sure to check out our full protocol documentation (WIP), which is available at www.enigma.co/protocol.

We’d love to have you be one of the first developers building secret contracts! If you’re interested in trying out Enigma, join our developer forum to speak with our team and developer community — they can help you get started. That’s the best place to ask questions and leave feedback!

Stay tuned for more improvements and announcements about our protocol over the coming weeks that will continue to open up possibilities for developers working with Enigma!