Skip to content

Ethereum Virtual Machine implementation in Rust. Nightly version of SputnikVM.

License

Notifications You must be signed in to change notification settings

etclabscore/evm-rs

 
 

Repository files navigation

SputnikVM: Rust Ethereum Virtual Machine Implementation

Build Status License

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

Features

  • Partially verified (WIP) - use various verification techniques to partially verify the correctness of functions.
  • Nightly - take advantage of Rust nightly features, such as compiler plugins
  • 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

  • Foundation (evm-network-foundation)
  • Classic (evm-network-classic)
  • Ellaism (evm-network-ellaism)
  • Expanse (evm-network-expanse)
  • Musicoin (evm-network-musicoin)
  • Ubiq (evm-network-ubiq)

Supported Networks

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
sputnikvm-precompiled-bn128 bn128 precompiled contracts crates.io Documentation
sputnikvm-precompiled-modexp modexp precompiled contracts crates.io Documentation

Related projects

  • ethereum-rs - common traits and structs for Ethereum.
  • etclient - bare-minimal Ethereum client written in Rust.
  • SputnikVM Dev - SputnikVM instance for Smart Contract development, provides testing environment and mock for JSON RPC API
  • SputnikVM in Browser - experimental version of SputnikVM compiled into WebAssembly, therefore can be launched in a browser on Node.js
  • SputnikVM for embedded devices - experimental project to run on full functional EVM on embedded devices

Dependencies

Ensure you have at least rustc 1.26.2 (594fb253c 2018-06-01). Rust 1.25.0 and before is not supported.

Documentation

Build from sources

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

Build

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

$ git clone git@github.com:etclabscore/sputnikvm.git
$ cd sputnikvm
$ cargo build --release --all

Testing

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

  • jsontests: This uses part of the Ethereum tests. Those tests currently does 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. See wiki for how to reproduce the regression tests.

To learn more about building SputnikVM from source please read wiki page Building and Testing

License

Apache 2.0

About

Ethereum Virtual Machine implementation in Rust. Nightly version of SputnikVM.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Rust 99.1%
  • Other 0.9%