1 unstable release

0.11.0 Jul 1, 2019

#27 in #pre-compiled

Download history 23/week @ 2024-07-19 31/week @ 2024-07-26 21/week @ 2024-08-02 20/week @ 2024-08-09 11/week @ 2024-08-16 9/week @ 2024-08-23 6/week @ 2024-08-30 11/week @ 2024-09-06 12/week @ 2024-09-13 26/week @ 2024-09-20 12/week @ 2024-09-27 4/week @ 2024-10-04 16/week @ 2024-10-11 10/week @ 2024-10-18 5/week @ 2024-10-25 23/week @ 2024-11-01

54 downloads per month
Used in 10 crates

Apache-2.0 and maybe GPL-3.0

235KB
5.5K SLoC

EthereumVM: Rust Ethereum Virtual Machine Implementation

Build Status License

Name Description Crates.io Documentation
ethereumvm Core library for the Ethereum Virtual Machine crates.io Documentation
ethereumvm-stateful Merkle Trie stateful wrapper for EthereumVM crates.io Documentation

Features

  • Standalone - can be launched as an independent process or integrated into other apps
  • Universal - supports different Ethereum chains, such as ETC, ETH or private ones
  • Stateless - only an execution environment connected to independent State storage
  • Fast - main focus is on performance
  • IoT compatible - designed to support hardware used in embedded devices
  • written in Rust, can be used as a binary, cargo crate or shared library

Supported Networks

Supported Networks

Network Crates.io Documentation
Any Network crates.io Documentation
Ethereum Classic crates.io Documentation
Ethereum crates.io Documentation
Ellaism crates.io Documentation
Ubiq crates.io Documentation
Expanse crates.io Documentation
Musicoin crates.io Documentation

Precompiled Contracts

The core library has the initial four precompiled contracts embedded. To use the bn128 and modexp precompiled contracts introduced by the Byzantium hard fork, pull the following crates.

Name Description Crates.io Documentation
ethereumvm-precompiled-bn128 bn128 precompiled contracts crates.io Documentation
ethereumvm-precompiled-modexp modexp precompiled contracts crates.io Documentation
  • ethereum-rs - common traits and structs for Ethereum.
  • etclient - bare-minimal Ethereum client written in Rust.
  • EthereumVM FFI - EthereumVM C and Go FFI bindings
  • EthereumVM Dev - EthereumVM instance for Smart Contract development, provides testing environment and mock for JSON RPC API
  • EthereumVM in Browser - experimental version of EthereumVM compiled into WebAssembly, therefore can be launched in a browser on Node.js
  • EthereumVM for embedded devices - experimental project to run on full functional EVM on embedded devices

Dependencies

Ensure you have at least rustc 1.33.0 (2aa4c46cf 2019-02-28). Rust 1.32.0 and before is not supported.

Documentation

Build from sources

EthereumVM is written Rust. If you are not familiar with Rust please see the getting started guide.

Build

To start working with EthereumVM you'll need to install rustup, then you can do:

$ git clone git@github.com:ethereumproject/evm-rs.git ethereumvm
$ cd ethereumvm
$ cargo build --release --all

Testing

We currently use two ways to test EthereumVM and ensure its execution aligns with other Ethereum Virtual Machine implementations:

  • jsontests: This uses part of the Ethereum tests. Those tests currently do not have good coverage for system operation opcodes. Besides, some tests are incorrect so they are disabled.
  • regtests: A complete regression tests is done on the Ethereum Classic mainnet from genesis block to block 4 million. Some of the previously failed tests are also integrated into Rust's test system.

To run all tests, execute the following command in the cloned repository:

$ cargo test --all

Contribution

Formatting policies are described in GUIDE.md, and the recommended automated formatting techniques may be found at FORMATTING.md

License

Apache 2.0

Dependencies

~1.7–2.5MB
~31K SLoC