Enigma now has a working implementation of its protocol in a Docker network that it can deploy anywhere in which each component in the network runs in its own container, and they all communicate and interoperate with each other:

Contract: the Enigma contract provides the consensus layer in the network and is the “source of truth” for the state and results of secret computations, mostly in the form of hashes that are used for verification purposes.

Javascript Library: The Enigma JS library is the interface to the Enigma network for secret contract developers, and the entry point for dApp users. Once the network is up and running, this is the component that triggers the deployment of secret contracts in the network and triggers the secret computations, later verifying their correct execution.

Enclave: The code running inside the Trusted Execution Environment (TEE, which is SGX in the case of Intel) is written in Rust, and contains Enigma’s adaptation of WASM that runs the bytecode for secret contract in a Virtual Machine inside the secure hardware. It receives the secret contract inputs encrypted from the user, and encrypts its outputs so that only the user can decrypt them.

Peer-to-Peer (P2P) component: Each enclave communicates one-on-one with its networking component, written in Javascript, that provides an interface to the rest of the network and to the contract. Some of these P2P components double as “proxies” or “gateways” where clients can connect to using the Javascript library to get their requests routed through the Enigma network.

Principal Node: A special instance of the enclave code that manages the encryption keys to maintain the state of secret contracts across the network. It responds to requests from other enclaves providing the needed keys to decrypt and re-encrypt the state associated with each secret contract deployed in the network.

Remote Attestation Proxy: A secure webserver online that Enigma provides as an interface to Intel Remote Attestation Service, so that anyone can validate that any enclave in the Enigma network runs its code inside a legitimate enclave and runs the code that it is supposed to run and not some other malicious code.

Enigma has also been working on some important features for Enigma’s P2P networking layer. First, Enigma team has been stabilizing content synchronizations and the P2P layer by adding robust fault tolerance and extending libp2p functionality. For reference, see:

https://github.com/libp2p/js-libp2p/pull/321

https://github.com/ipfs/interface-js-ipfs-core/pull/437

Enigma is also working to ensure scalability in development for enigma-p2p. The goal is to make this library welcoming for developers (both contributors and Enigma core devs) so Enigma team can all work with the code nicely. This means:

single configuration feature to build everything.

rich CLI (command-line interface) that even allows actions such as starting an Ethereum testnet.

full JSON-RPC endpoint that supports key exchange, deployment and computation of secret contracts.

What now?

Here are some of the features that are to be included in this imminent release of Discovery:

Stateful (Encrypted) Secret Contracts: Secret contracts are capable of maintaining a state, allowing to persist encrypted data between private computations or different tasks. Stateful contracts enable many more use cases than stateless computations.

Secret Contracts decoupled from Smart Contracts: The Enigma network only relies on Ethereum as the consensus layer, but is otherwise decoupled from the requirements and limitations of Ethereum. This means that secret contracts can have their own runtime and programming language (Rust, instead of Solidity).

Private Outputs: In addition to private inputs, the network supports storage of computation outputs by storing the contract state encrypted on chain and sending results encrypted directly to the dApp user.

Economic Incentives: Each node receives a financial reward for participating in the network. Nodes are randomly selected to work in any computation by lottery weighted by the amount of ENG tokens they stake.

Ethereum integration: Secret Contracts may call arbitrary functions of any other smart contract deployed on Ethereum.

Peer-to-peer and storage layers: Completely redesigned from scratch, these functions are now an integral part of the Enigma network and no longer rely on Ethereum.

The article covers a three-part “getting started” series for developers. This series will include: