
This enclave app is the SGX version of the Rust EVM executor or short REVME. The official standard version can be found here. Presently, its primary application is in executing Ethereum tests.
- SGX-SDK 2.24 installation
- Cargo and Rust installation, currently requires
nightly-2024-02-01
rustc version - Basic dev toolkits installation like cmake
- For setup the environment, refers to Dockerfile
If you're using Azure, the following are recommended configurations:
- VM spec:
Standard_DC4s_v3
- OS spec:
Ubuntu Server 20.04 LTS
orUbuntu Server 22.04 LTS
The enclave app takes a path to the directory where ethereum statetest json can be found. It recursively parses all json files in the specified directory and executes them.
Running all ethereum tests checks that revm is compliant to the ethereum specs.
To run ethereum tests locally, clone the tests repository and provide the test directory. Below, we clone the repo and execute the GeneralStateTests suite of tests.
$ git clone https://github.com/ethereum/tests.git
$ git clone https://github.com/automata-network/revm-sgx.git
$ cd revm-sgx
$ # cargo install cargo-sgx
$ cargo sgx run ../tests/GeneralStateTests/Cancun/*
In order to run revm in Intel SGX, we leverage the automata-sgx-sdk implementation. See the official docs to view more details.
To ensure successful compilation, other necessary adjustments include:
- Use sgx_rand instead of the normal rand and getrandom crate, whose instructions are not compatible in SGX.
- Ensure all cryptographic algorithms are compatible in SGX.