Skip to content

automata-network/revm-sgx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

revm-sgx

License Automata SGX SDK

This encalve 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.

Prerequisite

  • 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 or Ubuntu Server 22.04 LTS

Getting Started

The encalve 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/*

How it works

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages