diff --git a/Cargo.toml b/Cargo.toml index 88a0ffe..d06ffb4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,15 +1,15 @@ [package] -name = "evm" +name = "ethereumvm" version = "0.11.0" license = "Apache-2.0" authors = ["Wei Tang ", "Mike Lubinets "] -description = "SputnikVM - a Portable Blockchain Virtual Machine" +description = "EthereumVM - a Portable Blockchain Virtual Machine" repository = "https://github.com/ethereumproject/evm-rs" keywords = ["no_std", "ethereum"] edition = "2018" [lib] -name = "evm" +name = "ethereumvm" [dependencies] sha3 = "0.6" diff --git a/FORMATTING.md b/FORMATTING.md index 2c92768..c4aa1f4 100644 --- a/FORMATTING.md +++ b/FORMATTING.md @@ -7,7 +7,7 @@ This repository incorporates a certain formatting style derived from the [rustfm Any other configuration is the **stable** `rustfmt` default. #### Running the formatter -`evm-rs` is a complex project with a lot of sub-crates, so `cargo fmt` should be invoked with an `--all` argument. +`ethereumvm` is a complex project with a lot of sub-crates, so `cargo fmt` should be invoked with an `--all` argument. ```bash cargo fmt --all ``` @@ -16,7 +16,7 @@ More info can be found at the [project page](https://github.com/rust-lang/rustfm #### Manual formatting overrides The formatting constraint is checked within Travis CI and Jenkins continuous integration pipelines, hence any pull-request should be formatted before it may be merged. -Though, as most of the tooling generally is, `rustfmt` isn’t perfect and sometimes one would requite to force the manual formatting, as, for instance, it’s required for the `Patch` interface in `evm-rs` +Though, as most of the tooling generally is, `rustfmt` isn’t perfect and sometimes one would requite to force the manual formatting, as, for instance, it’s required for the `Patch` interface in `ethereumvm` ##### Original code ```rust pub struct EmbeddedAccountPatch; diff --git a/README.md b/README.md index 2ca7e09..da54195 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -# SputnikVM: Rust Ethereum Virtual Machine Implementation +# EthereumVM: Rust Ethereum Virtual Machine Implementation [![Build Status](https://travis-ci.org/ethereumproject/evm-rs.svg?branch=master)](https://travis-ci.org/ethereumproject/evm-rs) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](./LICENSE) | Name | Description | Crates.io | Documentation | |--------------------|:---------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------:| -| evm | Core library for the Ethereum Virtual Machine | [![crates.io](https://img.shields.io/crates/v/evm.svg)](https://crates.io/crates/evm) | [![Documentation](https://docs.rs/evm/badge.svg)](https://docs.rs/evm) | -| evm-stateful | Merkle Trie stateful wrapper for SputnikVM | [![crates.io](https://img.shields.io/crates/v/evm-stateful.svg)](https://crates.io/crates/evm-stateful) | [![Documentation](https://docs.rs/evm-stateful/badge.svg)](https://docs.rs/evm-stateful) | +| ethereumvm | Core library for the Ethereum Virtual Machine | [![crates.io](https://img.shields.io/crates/v/ethereumvm.svg)](https://crates.io/crates/ethereumvm) | [![Documentation](https://docs.rs/ethereumvm/badge.svg)](https://docs.rs/ethereumvm) | +| ethereumvm-stateful| Merkle Trie stateful wrapper for EthereumVM | [![crates.io](https://img.shields.io/crates/v/ethereumvm-stateful.svg)](https://crates.io/crates/ethereumvm-stateful) | [![Documentation](https://docs.rs/ethereumvm-stateful/badge.svg)](https://docs.rs/ethereumvm-stateful) | ## Features @@ -20,25 +20,25 @@ ## Supported Networks -* Foundation ([evm-network-foundation](./network/foundation)) -* Classic ([evm-network-classic](./network/classic)) -* Ellaism ([evm-network-ellaism](./network/ellaism)) -* Expanse ([evm-network-expanse](./network/expanse)) -* Musicoin ([evm-network-musicoin](./network/musicoin)) -* Ubiq ([evm-network-ubiq](./network/ubiq)) -* All of the above and other networks ([evm-network-dynamic](./network/dynamic)) +* Foundation ([ethereumvm-network-foundation](./network/foundation)) +* Classic ([ethereumvm-network-classic](./network/classic)) +* Ellaism ([ethereumvm-network-ellaism](./network/ellaism)) +* Expanse ([ethereumvm-network-expanse](./network/expanse)) +* Musicoin ([ethereumvm-network-musicoin](./network/musicoin)) +* Ubiq ([ethereumvm-network-ubiq](./network/ubiq)) +* All of the above and other networks ([ethereumvm-network-dynamic](./network/dynamic)) ## Supported Networks | Network | Crates.io | Documentation | |------------------|:---------------------------------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------------------:| -| Any Network | [![crates.io](https://img.shields.io/crates/v/evm-network.svg)](https://crates.io/crates/evm-network) | [![Documentation](https://docs.rs/evm-network/badge.svg)](https://docs.rs/evm-network) | -| Ethereum Classic | [![crates.io](https://img.shields.io/crates/v/evm-network-classic.svg)](https://crates.io/crates/evm-network-classic) | [![Documentation](https://docs.rs/evm-network-classic/badge.svg)](https://docs.rs/evm-network-classic) | -| Ethereum | [![crates.io](https://img.shields.io/crates/v/evm-network-foundation.svg)](https://crates.io/crates/evm-network-foundation) | [![Documentation](https://docs.rs/evm-network-foundation/badge.svg)](https://docs.rs/evm-network-foundation) | -| Ellaism | [![crates.io](https://img.shields.io/crates/v/evm-network-ellaism.svg)](https://crates.io/crates/evm-network-ellaism) | [![Documentation](https://docs.rs/evm-network-ellaism/badge.svg)](https://docs.rs/evm-network-ellaism) | -| Ubiq | [![crates.io](https://img.shields.io/crates/v/evm-network-ubiq.svg)](https://crates.io/crates/evm-network-ubiq) | [![Documentation](https://docs.rs/evm-network-ubiq/badge.svg)](https://docs.rs/evm-network-ubiq) | -| Expanse | [![crates.io](https://img.shields.io/crates/v/evm-network-expanse.svg)](https://crates.io/crates/evm-network-expanse) | [![Documentation](https://docs.rs/evm-network-expanse/badge.svg)](https://docs.rs/evm-network-expanse) | -| Musicoin | [![crates.io](https://img.shields.io/crates/v/evm-network-musicoin.svg)](https://crates.io/crates/evm-network-musicoin) | [![Documentation](https://docs.rs/evm-network-musicoin/badge.svg)](https://docs.rs/evm-network-musicoin) | +| Any Network | [![crates.io](https://img.shields.io/crates/v/ethereumvm-network.svg)](https://crates.io/crates/ethereumvm-network) | [![Documentation](https://docs.rs/ethereumvm-network/badge.svg)](https://docs.rs/ethereumvm-network) | +| Ethereum Classic | [![crates.io](https://img.shields.io/crates/v/ethereumvm-network-classic.svg)](https://crates.io/crates/ethereumvm-network-classic) | [![Documentation](https://docs.rs/ethereumvm-network-classic/badge.svg)](https://docs.rs/ethereumvm-network-classic) | +| Ethereum | [![crates.io](https://img.shields.io/crates/v/ethereumvm-network-foundation.svg)](https://crates.io/crates/ethereumvm-network-foundation) | [![Documentation](https://docs.rs/ethereumvm-network-foundation/badge.svg)](https://docs.rs/ethereumvm-network-foundation) | +| Ellaism | [![crates.io](https://img.shields.io/crates/v/ethereumvm-network-ellaism.svg)](https://crates.io/crates/ethereumvm-network-ellaism) | [![Documentation](https://docs.rs/ethereumvm-network-ellaism/badge.svg)](https://docs.rs/ethereumvm-network-ellaism) | +| Ubiq | [![crates.io](https://img.shields.io/crates/v/ethereumvm-network-ubiq.svg)](https://crates.io/crates/ethereumvm-network-ubiq) | [![Documentation](https://docs.rs/ethereumvm-network-ubiq/badge.svg)](https://docs.rs/ethereumvm-network-ubiq) | +| Expanse | [![crates.io](https://img.shields.io/crates/v/ethereumvm-network-expanse.svg)](https://crates.io/crates/ethereumvm-network-expanse) | [![Documentation](https://docs.rs/ethereumvm-network-expanse/badge.svg)](https://docs.rs/ethereumvm-network-expanse) | +| Musicoin | [![crates.io](https://img.shields.io/crates/v/ethereumvm-network-musicoin.svg)](https://crates.io/crates/ethereumvm-network-musicoin) | [![Documentation](https://docs.rs/ethereumvm-network-musicoin/badge.svg)](https://docs.rs/ethereumvm-network-musicoin) | ## Precompiled Contracts @@ -46,8 +46,8 @@ The core library has the initial four precompiled contracts embedded. To use the | Name | Description | Crates.io | Documentation | |------------------------------|:----------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------------------:| -| evm-precompiled-bn128 | bn128 precompiled contracts | [![crates.io](https://img.shields.io/crates/v/evm-precompiled-bn128.svg)](https://crates.io/crates/evm-precompiled-bn128) | [![Documentation](https://docs.rs/evm-precompiled-bn128/badge.svg)](https://docs.rs/evm-precompiled-bn128) | -| evm-precompiled-modexp | modexp precompiled contracts | [![crates.io](https://img.shields.io/crates/v/evm-precompiled-modexp.svg)](https://crates.io/crates/evm-precompiled-modexp) | [![Documentation](https://docs.rs/evm-precompiled-modexp/badge.svg)](https://docs.rs/evm-precompiled-modexp) | +| ethereumvm-precompiled-bn128 | bn128 precompiled contracts | [![crates.io](https://img.shields.io/crates/v/ethereumvm-precompiled-bn128.svg)](https://crates.io/crates/ethereumvm-precompiled-bn128) | [![Documentation](https://docs.rs/ethereumvm-precompiled-bn128/badge.svg)](https://docs.rs/ethereumvm-precompiled-bn128) | +| ethereumvm-precompiled-modexp | modexp precompiled contracts | [![crates.io](https://img.shields.io/crates/v/ethereumvm-precompiled-modexp.svg)](https://crates.io/crates/ethereumvm-precompiled-modexp) | [![Documentation](https://docs.rs/ethereumvm-precompiled-modexp/badge.svg)](https://docs.rs/ethereumvm-precompiled-modexp) | ## Related projects @@ -55,12 +55,12 @@ The core library has the initial four precompiled contracts embedded. To use the common traits and structs for Ethereum. * [etclient](https://source.that.world/source/etclient) - bare-minimal Ethereum client written in Rust. -* [SputnikVM FFI](https://github.com/ethereumproject/evm-ffi) - SputnikVM C and Go FFI bindings -* [SputnikVM Dev](https://github.com/ethereumproject/evm-dev) - SputnikVM instance for Smart Contract development, +* [EthereumVM FFI](https://github.com/ethereumproject/evm-ffi) - EthereumVM C and Go FFI bindings +* [EthereumVM Dev](https://github.com/ethereumproject/evm-dev) - EthereumVM instance for Smart Contract development, provides testing environment and mock for JSON RPC API -* [SputnikVM in Browser](https://github.com/sorpaas/sputnikvm-in-browser) - experimental version of SputnikVM +* [EthereumVM in Browser](https://github.com/sorpaas/sputnikvm-in-browser) - experimental version of EthereumVM compiled into WebAssembly, therefore can be launched in a browser on Node.js -* [SputnikVM for embedded devices](https://github.com/sorpaas/sputnikvm-on-rux) - experimental project to run on +* [EthereumVM for embedded devices](https://github.com/sorpaas/sputnikvm-on-rux) - experimental project to run on full functional EVM on embedded devices ## Dependencies @@ -70,28 +70,28 @@ before is not supported. ## Documentation -* [Latest release documentation](https://docs.rs/evm) +* [Latest release documentation](https://docs.rs/ethereumvm) ## Build from sources -SputnikVM is written Rust. If you are not familiar with Rust please +EthereumVM is written Rust. If you are not familiar with Rust please see the [getting started guide](https://doc.rust-lang.org/book/getting-started.html). ### Build -To start working with SputnikVM you'll +To start working with EthereumVM you'll need to install [rustup](https://www.rustup.rs/), then you can do: ```bash -$ git clone git@github.com:ethereumproject/evm-rs.git -$ cd evm-rs +$ git clone git@github.com:ethereumproject/evm-rs.git ethereumvm +$ cd ethereumvm $ cargo build --release --all ``` ### Testing -We currently use two ways to test SputnikVM and ensure its execution +We currently use two ways to test EthereumVM and ensure its execution aligns with other Ethereum Virtual Machine implementations: * [jsontests](/jsontests): This uses part of the Ethereum diff --git a/cli/Cargo.toml b/cli/Cargo.toml index b60a3d6..5c4c204 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,9 +1,9 @@ [package] -name = "evm-cli" +name = "ethereumvm-cli" version = "0.0.0" license = "Apache-2.0" authors = ["Wei Tang "] -description = "SputnikVM CLI" +description = "EthereumVM CLI" repository = "https://github.com/ethereumproject/evm-rs" edition = "2018" @@ -17,14 +17,14 @@ edition = "2018" autobins = false [[bin]] -name = "evm-cli" +name = "ethereumvm-cli" path = "src/bin/main.rs" [dependencies] ethereum-bigint = "0.2" ethereum-hexutil = "0.2" -evm = { path = ".." } -evm-network-classic = { path = "../network/classic" } +ethereumvm = { path = ".." } +ethereumvm-network-classic = { path = "../network/classic" } gethrpc = { path = '../gethrpc' } clap = "2.22" serde_json = "1.0" diff --git a/cli/src/bin/main.rs b/cli/src/bin/main.rs index 2c7ca1f..13a0030 100644 --- a/cli/src/bin/main.rs +++ b/cli/src/bin/main.rs @@ -9,11 +9,11 @@ use std::str::FromStr; use bigint::{Address, Gas, H256, M256, U256}; use hexutil::read_hex; -use evm::{ +use ethereumvm::{ AccountCommitment, Context, HeaderParams, RequireError, SeqContextVM, SeqTransactionVM, TransactionAction, VMStatus, ValidTransaction, VM, }; -use evm_network_classic::{ +use ethereumvm_network_classic::{ MainnetByzantiumPatch, MainnetConstantinoplePatch, MainnetEIP150Patch, MainnetEIP160Patch, MainnetFrontierPatch, MainnetHomesteadPatch, }; @@ -149,10 +149,10 @@ fn handle_fire_with_rpc(client: &mut T, vm: &mut VM, block_num use clap::clap_app; fn main() { - let matches = clap_app!(evm => + let matches = clap_app!(ethereumvm => (version: "0.1") (author: "Ethereum Classic Contributors") - (about: "CLI tool for SputnikVM.") + (about: "CLI tool for EthereumVM.") (@arg CREATE: --create "Execute a CreateContract transaction instead of message call.") (@arg PROFILE: --profile "Whether to output a profiling result for the execution.") (@arg PROFILE_DUMP: --profile_dump +takes_value "Dump profiler result as HTML.") diff --git a/jsontests/Cargo.toml b/jsontests/Cargo.toml index 9441df3..1566297 100644 --- a/jsontests/Cargo.toml +++ b/jsontests/Cargo.toml @@ -10,7 +10,7 @@ name = "performance" harness = false [dependencies] -evm = { path = '..' } +ethereumvm = { path = '..' } jsontests-derive = { path = "./jsontests-derive" } ethereum-bigint = "0.2" ethereum-hexutil = "0.2" diff --git a/jsontests/benches/performance.rs b/jsontests/benches/performance.rs index cb22405..3174ec4 100644 --- a/jsontests/benches/performance.rs +++ b/jsontests/benches/performance.rs @@ -2,7 +2,7 @@ #[macro_use] extern crate jsontests_derive; -extern crate evm; +extern crate ethereumvm; extern crate jsontests; #[macro_use] extern crate criterion; @@ -18,7 +18,7 @@ use std::time::Duration; struct _Performance; pub fn criterion_cfg() -> Criterion { - // Due to poor SputnikVM performance, there's no chance to get a lot of measurements + // Due to poor EthereumVM performance, there's no chance to get a lot of measurements // and higher threshold is needed Criterion::default() .sample_size(2) diff --git a/jsontests/jsontests-derive/src/lib.rs b/jsontests/jsontests-derive/src/lib.rs index d60e9d7..9720d41 100644 --- a/jsontests/jsontests-derive/src/lib.rs +++ b/jsontests/jsontests-derive/src/lib.rs @@ -176,6 +176,6 @@ fn derive_patch(config: &Config) -> (Ident, Ident) { if let Some(patch) = config.patch.as_ref() { (patch.name.clone(), patch.path.clone()) } else { - (Ident::from("VMTestPatch"), Ident::from("evm::VMTestPatch")) + (Ident::from("VMTestPatch"), Ident::from("ethereumvm::VMTestPatch")) } } diff --git a/jsontests/src/blockchain.rs b/jsontests/src/blockchain.rs index 11e5e84..6cb25f0 100644 --- a/jsontests/src/blockchain.rs +++ b/jsontests/src/blockchain.rs @@ -1,5 +1,5 @@ use bigint::{Address, Gas, H256, M256, U256}; -use evm::{AccountChange, AccountCommitment, Context, HeaderParams, Log}; +use ethereumvm::{AccountChange, AccountCommitment, Context, HeaderParams, Log}; use hexutil::*; use rlp; diff --git a/jsontests/src/lib.rs b/jsontests/src/lib.rs index 1aad9fc..82f0dea 100644 --- a/jsontests/src/lib.rs +++ b/jsontests/src/lib.rs @@ -2,7 +2,7 @@ extern crate bigint; extern crate criterion; extern crate env_logger; -extern crate evm; +extern crate ethereumvm; extern crate hexutil; extern crate rlp; extern crate serde_json; @@ -14,8 +14,8 @@ pub mod util; pub use self::blockchain::{create_block, create_context, JSONBlock}; use bigint::{Address, Gas, H256, M256, U256}; -use evm::errors::RequireError; -use evm::{Context, Patch, SeqContextVM, VMStatus, VM}; +use ethereumvm::errors::RequireError; +use ethereumvm::{Context, Patch, SeqContextVM, VMStatus, VM}; use hexutil::*; use serde_json::Value; use std::ops::Deref; diff --git a/jsontests/src/util.rs b/jsontests/src/util.rs index 2a79a60..2d7555a 100644 --- a/jsontests/src/util.rs +++ b/jsontests/src/util.rs @@ -1,4 +1,4 @@ -use evm::Patch; +use ethereumvm::Patch; use serde_json as json; use serde_json::Value; diff --git a/jsontests/tests/eiptests.rs b/jsontests/tests/eiptests.rs index ac25bce..c369682 100644 --- a/jsontests/tests/eiptests.rs +++ b/jsontests/tests/eiptests.rs @@ -6,7 +6,7 @@ extern crate jsontests_derive; use bigint::{Address, Gas}; -use evm::{EmbeddedAccountPatch, Patch, Precompiled, EMBEDDED_PRECOMPILEDS}; +use ethereumvm::{EmbeddedAccountPatch, Patch, Precompiled, EMBEDDED_PRECOMPILEDS}; // Shifting opcodes tests #[derive(JsonTests)] diff --git a/jsontests/tests/inputlimits.rs b/jsontests/tests/inputlimits.rs index f8bb6be..fbbffaa 100644 --- a/jsontests/tests/inputlimits.rs +++ b/jsontests/tests/inputlimits.rs @@ -1,6 +1,6 @@ #![allow(non_snake_case)] -use evm::VMTestPatch; +use ethereumvm::VMTestPatch; use jsontests::test_transaction; use serde_json::Value; diff --git a/network/classic/Cargo.toml b/network/classic/Cargo.toml index 6702ab5..8d01a5f 100644 --- a/network/classic/Cargo.toml +++ b/network/classic/Cargo.toml @@ -1,21 +1,21 @@ [package] -name = "evm-network-classic" +name = "ethereumvm-network-classic" version = "0.11.0" -description = "Ethereum Classic patches for SputnikVM. Deprecated and will be dropped in future releases: use evm-network instead" +description = "Ethereum Classic patches for EthereumVM. Deprecated and will be dropped in future releases: use ethereumvm-network instead" license = "Apache-2.0" authors = ["Wei Tang "] repository = "https://github.com/ethereumproject/evm-rs" edition = "2018" [dependencies] -evm = { version = "0.11", path = "../..", default-features = false } -evm-precompiled-bn128 = { version = "0.11", path = "../../precompiled/bn128", default-features = false} -evm-precompiled-modexp = { version = "0.11", path = "../../precompiled/modexp", default-features = false } +ethereumvm = { version = "0.11", path = "../..", default-features = false } +ethereumvm-precompiled-bn128 = { version = "0.11", path = "../../precompiled/bn128", default-features = false} +ethereumvm-precompiled-modexp = { version = "0.11", path = "../../precompiled/modexp", default-features = false } ethereum-bigint = { version = "0.2", default-features = false } [features] default = ["std", "rust-secp256k1"] rlp = ["ethereum-bigint/rlp"] -c-secp256k1 = ["evm/c-secp256k1", "evm-precompiled-bn128/c-secp256k1", "evm-precompiled-modexp/c-secp256k1"] -rust-secp256k1 = ["evm/rust-secp256k1", "evm-precompiled-bn128/rust-secp256k1", "evm-precompiled-modexp/rust-secp256k1"] -std = ["evm/std"] +c-secp256k1 = ["ethereumvm/c-secp256k1", "ethereumvm-precompiled-bn128/c-secp256k1", "ethereumvm-precompiled-modexp/c-secp256k1"] +rust-secp256k1 = ["ethereumvm/rust-secp256k1", "ethereumvm-precompiled-bn128/rust-secp256k1", "ethereumvm-precompiled-modexp/rust-secp256k1"] +std = ["ethereumvm/std"] diff --git a/network/classic/src/lib.rs b/network/classic/src/lib.rs index 1e2e5d0..ea22a70 100644 --- a/network/classic/src/lib.rs +++ b/network/classic/src/lib.rs @@ -1,9 +1,9 @@ use bigint::{Address, Gas, H160, U256}; -use evm::{ +use ethereumvm::{ AccountPatch, Patch, Precompiled, ECREC_PRECOMPILED, ID_PRECOMPILED, RIP160_PRECOMPILED, SHA256_PRECOMPILED, }; -use evm_precompiled_bn128::{BN128_ADD_PRECOMPILED, BN128_MUL_PRECOMPILED, BN128_PAIRING_PRECOMPILED}; -use evm_precompiled_modexp::MODEXP_PRECOMPILED; +use ethereumvm_precompiled_bn128::{BN128_ADD_PRECOMPILED, BN128_MUL_PRECOMPILED, BN128_PAIRING_PRECOMPILED}; +use ethereumvm_precompiled_modexp::MODEXP_PRECOMPILED; /// Mainnet account patch #[derive(Copy, Clone, Default)] diff --git a/network/dynamic/Cargo.toml b/network/dynamic/Cargo.toml index a41caa0..2f68f01 100644 --- a/network/dynamic/Cargo.toml +++ b/network/dynamic/Cargo.toml @@ -1,21 +1,21 @@ [package] -name = "evm-network" +name = "ethereumvm-network" version = "0.11.0" -description = "Network-agnostic patches for SputnikVM." +description = "Network-agnostic patches for EthereumVM." license = "Apache-2.0" authors = ["Wei Tang , Mike Lubinets "] repository = "https://github.com/ethereumproject/evm-rs" edition = "2018" [dependencies] -evm = { version = "0.11", path = "../..", default-features = false } -evm-precompiled-bn128 = { version = "0.11", path = "../../precompiled/bn128", default-features = false} -evm-precompiled-modexp = { version = "0.11", path = "../../precompiled/modexp", default-features = false } +ethereumvm = { version = "0.11", path = "../..", default-features = false } +ethereumvm-precompiled-bn128 = { version = "0.11", path = "../../precompiled/bn128", default-features = false} +ethereumvm-precompiled-modexp = { version = "0.11", path = "../../precompiled/modexp", default-features = false } ethereum-bigint = { version = "0.2", default-features = false } [features] default = ["std", "rust-secp256k1"] rlp = ["ethereum-bigint/rlp"] -c-secp256k1 = ["evm/c-secp256k1", "evm-precompiled-bn128/c-secp256k1", "evm-precompiled-modexp/c-secp256k1"] -rust-secp256k1 = ["evm/rust-secp256k1", "evm-precompiled-bn128/rust-secp256k1", "evm-precompiled-modexp/rust-secp256k1"] -std = ["evm/std"] +c-secp256k1 = ["ethereumvm/c-secp256k1", "ethereumvm-precompiled-bn128/c-secp256k1", "ethereumvm-precompiled-modexp/c-secp256k1"] +rust-secp256k1 = ["ethereumvm/rust-secp256k1", "ethereumvm-precompiled-bn128/rust-secp256k1", "ethereumvm-precompiled-modexp/rust-secp256k1"] +std = ["ethereumvm/std"] diff --git a/network/dynamic/src/lib.rs b/network/dynamic/src/lib.rs index 082da73..400bc21 100644 --- a/network/dynamic/src/lib.rs +++ b/network/dynamic/src/lib.rs @@ -1,4 +1,4 @@ -//! # Network-Agnostic SputnikVM Patches +//! # Network-Agnostic EthereumVM Patches //! //! This crate provides re-exports of the DynamicPatch API, and a set of precompiled contracts //! covering everything up to ETH Constantinople @@ -17,8 +17,8 @@ //! ### Example //! //! ``` -//! use evm::{SeqTransactionVM, ValidTransaction, TransactionAction, HeaderParams}; -//! use evm_network::{DynamicPatch, DynamicAccountPatch, PRECOMPILEDS}; +//! use ethereumvm::{SeqTransactionVM, ValidTransaction, TransactionAction, HeaderParams}; +//! use ethereumvm_network::{DynamicPatch, DynamicAccountPatch, PRECOMPILEDS}; //! use bigint::{Gas, U256, Address}; //! use std::rc::Rc; //! @@ -90,14 +90,14 @@ //! //! # Patch API //! -//! If you need just a single network or even a single feature-set, use the [Patch](evm::Patch) +//! If you need just a single network or even a single feature-set, use the [Patch](ethereumvm::Patch) //! trait directly, that allows to create custom feature sets without DynamicPatch's tiny overhead. //! //! ### Example //! //! ``` -//! use evm::{SeqTransactionVM, ValidTransaction, TransactionAction, HeaderParams, Precompiled}; -//! use evm_network::{AccountPatch, Patch, PRECOMPILEDS}; +//! use ethereumvm::{SeqTransactionVM, ValidTransaction, TransactionAction, HeaderParams, Precompiled}; +//! use ethereumvm_network::{AccountPatch, Patch, PRECOMPILEDS}; //! use bigint::{Gas, U256, Address}; //! use std::rc::Rc; //! @@ -179,12 +179,12 @@ //! ``` use bigint::{Address, H160}; -use evm::{Precompiled, ECREC_PRECOMPILED, ID_PRECOMPILED, RIP160_PRECOMPILED, SHA256_PRECOMPILED}; -use evm_precompiled_bn128::{BN128_ADD_PRECOMPILED, BN128_MUL_PRECOMPILED, BN128_PAIRING_PRECOMPILED}; -use evm_precompiled_modexp::MODEXP_PRECOMPILED; +use ethereumvm::{Precompiled, ECREC_PRECOMPILED, ID_PRECOMPILED, RIP160_PRECOMPILED, SHA256_PRECOMPILED}; +use ethereumvm_precompiled_bn128::{BN128_ADD_PRECOMPILED, BN128_MUL_PRECOMPILED, BN128_PAIRING_PRECOMPILED}; +use ethereumvm_precompiled_modexp::MODEXP_PRECOMPILED; // Re-export DynamicPatch and Patch APIs -pub use evm::{AccountPatch, DynamicAccountPatch, DynamicPatch, Patch}; +pub use ethereumvm::{AccountPatch, DynamicAccountPatch, DynamicPatch, Patch}; #[rustfmt::skip] pub static PRECOMPILEDS: [(Address, Option<&'static [u8]>, &'static Precompiled); 8] = [ diff --git a/network/ellaism/Cargo.toml b/network/ellaism/Cargo.toml index 9dfe9aa..392b3b8 100644 --- a/network/ellaism/Cargo.toml +++ b/network/ellaism/Cargo.toml @@ -1,19 +1,19 @@ [package] -name = "evm-network-ellaism" +name = "ethereumvm-network-ellaism" version = "0.11.0" -description = "Ellaism patches for SputnikVM. Deprecated and will be dropped in future releases: use evm-network instead" +description = "Ellaism patches for EthereumVM. Deprecated and will be dropped in future releases: use ethereumvm-network instead" license = "Apache-2.0" authors = ["Wei Tang "] repository = "https://github.com/ethereumproject/evm-rs" edition = "2018" [dependencies] -evm = { version = "0.11", path = "../..", default-features = false } +ethereumvm = { version = "0.11", path = "../..", default-features = false } ethereum-bigint = { version = "0.2", default-features = false } [features] default = ["std", "rust-secp256k1"] rlp = ["ethereum-bigint/rlp"] -c-secp256k1 = ["evm/c-secp256k1"] -rust-secp256k1 = ["evm/rust-secp256k1"] -std = ["evm/std"] +c-secp256k1 = ["ethereumvm/c-secp256k1"] +rust-secp256k1 = ["ethereumvm/rust-secp256k1"] +std = ["ethereumvm/std"] diff --git a/network/ellaism/src/lib.rs b/network/ellaism/src/lib.rs index 81e73af..1ff69f2 100644 --- a/network/ellaism/src/lib.rs +++ b/network/ellaism/src/lib.rs @@ -1,5 +1,5 @@ use bigint::{Address, Gas, H160, U256}; -use evm::{ +use ethereumvm::{ AccountPatch, Patch, Precompiled, ECREC_PRECOMPILED, ID_PRECOMPILED, RIP160_PRECOMPILED, SHA256_PRECOMPILED, }; diff --git a/network/expanse/Cargo.toml b/network/expanse/Cargo.toml index 3253a91..6cff0b5 100644 --- a/network/expanse/Cargo.toml +++ b/network/expanse/Cargo.toml @@ -1,21 +1,21 @@ [package] -name = "evm-network-expanse" +name = "ethereumvm-network-expanse" version = "0.11.0" -description = "Expanse patches for SputnikVM. Deprecated and will be dropped in future releases: use evm-network instead" +description = "Expanse patches for EthereumVM. Deprecated and will be dropped in future releases: use ethereumvm-network instead" license = "Apache-2.0" authors = ["Wei Tang "] repository = "https://github.com/ethereumproject/evm-rs" edition = "2018" [dependencies] -evm = { version = "0.11", path = "../..", default-features = false } -evm-precompiled-bn128 = { version = "0.11", path = "../../precompiled/bn128", default-features = false} -evm-precompiled-modexp = { version = "0.11", path = "../../precompiled/modexp", default-features = false } +ethereumvm = { version = "0.11", path = "../..", default-features = false } +ethereumvm-precompiled-bn128 = { version = "0.11", path = "../../precompiled/bn128", default-features = false} +ethereumvm-precompiled-modexp = { version = "0.11", path = "../../precompiled/modexp", default-features = false } ethereum-bigint = { version = "0.2", default-features = false } [features] default = ["std", "rust-secp256k1"] rlp = ["ethereum-bigint/rlp"] -c-secp256k1 = ["evm/c-secp256k1", "evm-precompiled-bn128/c-secp256k1", "evm-precompiled-modexp/c-secp256k1"] -rust-secp256k1 = ["evm/rust-secp256k1", "evm-precompiled-bn128/rust-secp256k1", "evm-precompiled-modexp/rust-secp256k1"] -std = ["evm/std"] +c-secp256k1 = ["ethereumvm/c-secp256k1", "ethereumvm-precompiled-bn128/c-secp256k1", "ethereumvm-precompiled-modexp/c-secp256k1"] +rust-secp256k1 = ["ethereumvm/rust-secp256k1", "ethereumvm-precompiled-bn128/rust-secp256k1", "ethereumvm-precompiled-modexp/rust-secp256k1"] +std = ["ethereumvm/std"] diff --git a/network/expanse/src/lib.rs b/network/expanse/src/lib.rs index 0499a4e..67976d5 100644 --- a/network/expanse/src/lib.rs +++ b/network/expanse/src/lib.rs @@ -1,9 +1,9 @@ use bigint::{Address, Gas, H160, U256}; -use evm::{ +use ethereumvm::{ AccountPatch, Patch, Precompiled, ECREC_PRECOMPILED, ID_PRECOMPILED, RIP160_PRECOMPILED, SHA256_PRECOMPILED, }; -use evm_precompiled_bn128::{BN128_ADD_PRECOMPILED, BN128_MUL_PRECOMPILED, BN128_PAIRING_PRECOMPILED}; -use evm_precompiled_modexp::MODEXP_PRECOMPILED; +use ethereumvm_precompiled_bn128::{BN128_ADD_PRECOMPILED, BN128_MUL_PRECOMPILED, BN128_PAIRING_PRECOMPILED}; +use ethereumvm_precompiled_modexp::MODEXP_PRECOMPILED; #[rustfmt::skip] pub static FRONTIER_PRECOMPILEDS: [(Address, Option<&'static [u8]>, &'static Precompiled); 4] = [ diff --git a/network/foundation/Cargo.toml b/network/foundation/Cargo.toml index ca9b7af..0b3a436 100644 --- a/network/foundation/Cargo.toml +++ b/network/foundation/Cargo.toml @@ -1,21 +1,21 @@ [package] -name = "evm-network-foundation" +name = "ethereumvm-network-foundation" version = "0.11.0" -description = "Ethereum patches for SputnikVM. Deprecated and will be dropped in future releases: use evm-network instead" +description = "Ethereum patches for EthereumVM. Deprecated and will be dropped in future releases: use ethereumvm-network instead" license = "Apache-2.0" authors = ["Wei Tang "] repository = "https://github.com/ethereumproject/evm-rs" edition = "2018" [dependencies] -evm = { version = "0.11", path = "../..", default-features = false } -evm-precompiled-bn128 = { version = "0.11", path = "../../precompiled/bn128", default-features = false} -evm-precompiled-modexp = { version = "0.11", path = "../../precompiled/modexp", default-features = false } +ethereumvm = { version = "0.11", path = "../..", default-features = false } +ethereumvm-precompiled-bn128 = { version = "0.11", path = "../../precompiled/bn128", default-features = false} +ethereumvm-precompiled-modexp = { version = "0.11", path = "../../precompiled/modexp", default-features = false } ethereum-bigint = { version = "0.2", default-features = false } [features] default = ["std", "rust-secp256k1"] rlp = ["ethereum-bigint/rlp"] -c-secp256k1 = ["evm/c-secp256k1", "evm-precompiled-bn128/c-secp256k1", "evm-precompiled-modexp/c-secp256k1"] -rust-secp256k1 = ["evm/rust-secp256k1", "evm-precompiled-bn128/rust-secp256k1", "evm-precompiled-modexp/rust-secp256k1"] -std = ["evm/std"] +c-secp256k1 = ["ethereumvm/c-secp256k1", "ethereumvm-precompiled-bn128/c-secp256k1", "ethereumvm-precompiled-modexp/c-secp256k1"] +rust-secp256k1 = ["ethereumvm/rust-secp256k1", "ethereumvm-precompiled-bn128/rust-secp256k1", "ethereumvm-precompiled-modexp/rust-secp256k1"] +std = ["ethereumvm/std"] diff --git a/network/foundation/src/lib.rs b/network/foundation/src/lib.rs index 749c6ec..4175f85 100644 --- a/network/foundation/src/lib.rs +++ b/network/foundation/src/lib.rs @@ -1,9 +1,9 @@ use bigint::{Address, Gas, H160, U256}; -use evm::{ +use ethereumvm::{ AccountPatch, Patch, Precompiled, ECREC_PRECOMPILED, ID_PRECOMPILED, RIP160_PRECOMPILED, SHA256_PRECOMPILED, }; -use evm_precompiled_bn128::{BN128_ADD_PRECOMPILED, BN128_MUL_PRECOMPILED, BN128_PAIRING_PRECOMPILED}; -use evm_precompiled_modexp::MODEXP_PRECOMPILED; +use ethereumvm_precompiled_bn128::{BN128_ADD_PRECOMPILED, BN128_MUL_PRECOMPILED, BN128_PAIRING_PRECOMPILED}; +use ethereumvm_precompiled_modexp::MODEXP_PRECOMPILED; #[rustfmt::skip] pub static FRONTIER_PRECOMPILEDS: [(Address, Option<&'static [u8]>, &'static Precompiled); 4] = [ diff --git a/network/musicoin/Cargo.toml b/network/musicoin/Cargo.toml index 1908dc8..da625b1 100644 --- a/network/musicoin/Cargo.toml +++ b/network/musicoin/Cargo.toml @@ -1,21 +1,21 @@ [package] -name = "evm-network-musicoin" +name = "ethereumvm-network-musicoin" version = "0.11.0" -description = "Musicoin patches for SputnikVM. Deprecated and will be dropped in future releases: use evm-network instead" +description = "Musicoin patches for EthereumVM. Deprecated and will be dropped in future releases: use ethereumvm-network instead" license = "Apache-2.0" authors = ["Wei Tang "] repository = "https://github.com/ethereumproject/evm-rs" edition = "2018" [dependencies] -evm = { version = "0.11", path = "../..", default-features = false } -evm-precompiled-bn128 = { version = "0.11", path = "../../precompiled/bn128", default-features = false} -evm-precompiled-modexp = { version = "0.11", path = "../../precompiled/modexp", default-features = false } +ethereumvm = { version = "0.11", path = "../..", default-features = false } +ethereumvm-precompiled-bn128 = { version = "0.11", path = "../../precompiled/bn128", default-features = false} +ethereumvm-precompiled-modexp = { version = "0.11", path = "../../precompiled/modexp", default-features = false } ethereum-bigint = { version = "0.2", default-features = false } [features] default = ["std", "rust-secp256k1"] rlp = ["ethereum-bigint/rlp"] -c-secp256k1 = ["evm/c-secp256k1", "evm-precompiled-bn128/c-secp256k1", "evm-precompiled-modexp/c-secp256k1"] -rust-secp256k1 = ["evm/rust-secp256k1", "evm-precompiled-bn128/rust-secp256k1", "evm-precompiled-modexp/rust-secp256k1"] -std = ["evm/std"] +c-secp256k1 = ["ethereumvm/c-secp256k1", "ethereumvm-precompiled-bn128/c-secp256k1", "ethereumvm-precompiled-modexp/c-secp256k1"] +rust-secp256k1 = ["ethereumvm/rust-secp256k1", "ethereumvm-precompiled-bn128/rust-secp256k1", "ethereumvm-precompiled-modexp/rust-secp256k1"] +std = ["ethereumvm/std"] diff --git a/network/musicoin/src/lib.rs b/network/musicoin/src/lib.rs index 75ed352..11925b4 100644 --- a/network/musicoin/src/lib.rs +++ b/network/musicoin/src/lib.rs @@ -1,5 +1,5 @@ use bigint::{Address, Gas, H160, U256}; -use evm::{ +use ethereumvm::{ AccountPatch, Patch, Precompiled, ECREC_PRECOMPILED, ID_PRECOMPILED, RIP160_PRECOMPILED, SHA256_PRECOMPILED, }; diff --git a/network/ubiq/Cargo.toml b/network/ubiq/Cargo.toml index f611527..f80d8ed 100644 --- a/network/ubiq/Cargo.toml +++ b/network/ubiq/Cargo.toml @@ -1,21 +1,21 @@ [package] -name = "evm-network-ubiq" +name = "ethereumvm-network-ubiq" version = "0.11.0" -description = "Ubiq patches for SputnikVM. Deprecated and will be dropped in future releases: use evm-network instead" +description = "Ubiq patches for EthereumVM. Deprecated and will be dropped in future releases: use ethereumvm-network instead" license = "Apache-2.0" authors = ["Wei Tang "] repository = "https://github.com/ethereumproject/evm-rs" edition = "2018" [dependencies] -evm = { version = "0.11", path = "../..", default-features = false } -evm-precompiled-bn128 = { version = "0.11", path = "../../precompiled/bn128", default-features = false} -evm-precompiled-modexp = { version = "0.11", path = "../../precompiled/modexp", default-features = false } +ethereumvm = { version = "0.11", path = "../..", default-features = false } +ethereumvm-precompiled-bn128 = { version = "0.11", path = "../../precompiled/bn128", default-features = false} +ethereumvm-precompiled-modexp = { version = "0.11", path = "../../precompiled/modexp", default-features = false } ethereum-bigint = { version = "0.2", default-features = false } [features] default = ["std", "rust-secp256k1"] rlp = ["ethereum-bigint/rlp"] -c-secp256k1 = ["evm/c-secp256k1", "evm-precompiled-bn128/c-secp256k1", "evm-precompiled-modexp/c-secp256k1"] -rust-secp256k1 = ["evm/rust-secp256k1", "evm-precompiled-bn128/rust-secp256k1", "evm-precompiled-modexp/rust-secp256k1"] -std = ["evm/std"] +c-secp256k1 = ["ethereumvm/c-secp256k1", "ethereumvm-precompiled-bn128/c-secp256k1", "ethereumvm-precompiled-modexp/c-secp256k1"] +rust-secp256k1 = ["ethereumvm/rust-secp256k1", "ethereumvm-precompiled-bn128/rust-secp256k1", "ethereumvm-precompiled-modexp/rust-secp256k1"] +std = ["ethereumvm/std"] diff --git a/network/ubiq/src/lib.rs b/network/ubiq/src/lib.rs index 1774cc1..00a5e23 100644 --- a/network/ubiq/src/lib.rs +++ b/network/ubiq/src/lib.rs @@ -1,5 +1,5 @@ use bigint::{Address, Gas, H160, U256}; -use evm::{ +use ethereumvm::{ AccountPatch, Patch, Precompiled, ECREC_PRECOMPILED, ID_PRECOMPILED, RIP160_PRECOMPILED, SHA256_PRECOMPILED, }; diff --git a/nightly.nix b/nightly.nix deleted file mode 100644 index 865d662..0000000 --- a/nightly.nix +++ /dev/null @@ -1,34 +0,0 @@ -let pkgs = ( - let - nixpkgs = import ; - pkgs_ = (nixpkgs {}); - rustOverlay = (pkgs_.fetchFromGitHub { - owner = "mozilla"; - repo = "nixpkgs-mozilla"; - rev = "6179dd876578ca2931f864627598ede16ba6cdef"; - sha256 = "1lim10a674621zayz90nhwiynlakxry8fyz1x209g9bdm38zy3av"; - }); - in (nixpkgs { - overlays = [ - (import (builtins.toPath "${rustOverlay}/rust-overlay.nix")) - (self: super: { - rust = { - rustc = super.rustChannels.nightly.rust; - cargo = super.rustChannels.nightly.cargo; - }; - rustPlatform = super.recurseIntoAttrs (super.makeRustPlatform { - rustc = super.rustChannels.nightly.rust; - cargo = super.rustChannels.nightly.cargo; - }); - }) - ]; - })); - -in with pkgs; - -stdenv.mkDerivation { - name = "sputnikvm-env"; - buildInputs = [ - rustc cargo gdb openssl pkgconfig valgrind - ]; -} diff --git a/precompiled/bn128/Cargo.toml b/precompiled/bn128/Cargo.toml index 1604d46..b1f0550 100644 --- a/precompiled/bn128/Cargo.toml +++ b/precompiled/bn128/Cargo.toml @@ -1,20 +1,20 @@ [package] -name = "evm-precompiled-bn128" +name = "ethereumvm-precompiled-bn128" version = "0.11.0" -description = "bn128 precompiled contracts for SputnikVM." +description = "bn128 precompiled contracts for EthereumVM." license = "Apache-2.0" authors = ["Wei Tang "] repository = "https://github.com/ethereumproject/evm-rs" edition = "2018" [dependencies] -evm = { version = "0.11", path = "../..", default-features = false } +ethereumvm = { version = "0.11", path = "../..", default-features = false } ethereum-bigint = { version = "0.2", default-features = false } bn-plus = { version = "0.4" } [features] default = ["std", "rust-secp256k1"] rlp = ["ethereum-bigint/rlp"] -c-secp256k1 = ["evm/c-secp256k1"] -rust-secp256k1 = ["evm/rust-secp256k1"] -std = ["evm/std"] +c-secp256k1 = ["ethereumvm/c-secp256k1"] +rust-secp256k1 = ["ethereumvm/rust-secp256k1"] +std = ["ethereumvm/std"] diff --git a/precompiled/bn128/src/lib.rs b/precompiled/bn128/src/lib.rs index 3c19e41..36195db 100644 --- a/precompiled/bn128/src/lib.rs +++ b/precompiled/bn128/src/lib.rs @@ -1,8 +1,8 @@ use bigint::{Gas, U256}; use std::rc::Rc; -use evm::errors::{OnChainError, RuntimeError}; -use evm::Precompiled; +use ethereumvm::errors::{OnChainError, RuntimeError}; +use ethereumvm::Precompiled; pub static BN128_ADD_PRECOMPILED: Bn128AddPrecompiled = Bn128AddPrecompiled; diff --git a/precompiled/modexp/Cargo.toml b/precompiled/modexp/Cargo.toml index efd6bb6..38fabf4 100644 --- a/precompiled/modexp/Cargo.toml +++ b/precompiled/modexp/Cargo.toml @@ -1,14 +1,14 @@ [package] -name = "evm-precompiled-modexp" +name = "ethereumvm-precompiled-modexp" version = "0.11.0" -description = "modexp precompiled contracts for SputnikVM." +description = "modexp precompiled contracts for EthereumVM." license = "Apache-2.0" authors = ["Wei Tang "] repository = "https://github.com/ethereumproject/evm-rs" edition = "2018" [dependencies] -evm = { version = "0.11", path = "../..", default-features = false } +ethereumvm = { version = "0.11", path = "../..", default-features = false } ethereum-bigint = { version = "0.2", default-features = false } num-bigint = "0.1" @@ -18,6 +18,6 @@ ethereum-hexutil = "0.2" [features] default = ["std", "rust-secp256k1"] rlp = ["ethereum-bigint/rlp"] -c-secp256k1 = ["evm/c-secp256k1"] -rust-secp256k1 = ["evm/rust-secp256k1"] -std = ["evm/std"] +c-secp256k1 = ["ethereumvm/c-secp256k1"] +rust-secp256k1 = ["ethereumvm/rust-secp256k1"] +std = ["ethereumvm/std"] diff --git a/precompiled/modexp/src/lib.rs b/precompiled/modexp/src/lib.rs index bb1cfa0..d302391 100644 --- a/precompiled/modexp/src/lib.rs +++ b/precompiled/modexp/src/lib.rs @@ -1,8 +1,8 @@ use bigint::{Gas, U256}; use std::rc::Rc; -use evm::errors::{NotSupportedError, OnChainError, RuntimeError}; -use evm::Precompiled; +use ethereumvm::errors::{NotSupportedError, OnChainError, RuntimeError}; +use ethereumvm::Precompiled; pub static MODEXP_PRECOMPILED: ModexpPrecompiled = ModexpPrecompiled; diff --git a/regtests/Cargo.toml b/regtests/Cargo.toml index a371d2b..b89a5ba 100644 --- a/regtests/Cargo.toml +++ b/regtests/Cargo.toml @@ -20,8 +20,8 @@ name = "regtests" path = "src/bin/main.rs" [dependencies] -evm = { path = '..' } -evm-network-classic = { path = "../network/classic" } +ethereumvm = { path = '..' } +ethereumvm-network-classic = { path = "../network/classic" } gethrpc = { path = '../gethrpc' } ethereum-block = "0.4" ethereum-bigint = "0.2" diff --git a/regtests/src/bin/main.rs b/regtests/src/bin/main.rs index 35544e9..5749fad 100644 --- a/regtests/src/bin/main.rs +++ b/regtests/src/bin/main.rs @@ -5,9 +5,9 @@ use std::str::FromStr; use bigint::{Address, Gas, H256, M256, U256}; use block::TransactionAction; -use evm::errors::RequireError; -use evm::{AccountChange, AccountCommitment, HeaderParams, Log, Patch, SeqTransactionVM, ValidTransaction, VM}; -use evm_network_classic::{MainnetEIP150Patch, MainnetEIP160Patch, MainnetFrontierPatch, MainnetHomesteadPatch}; +use ethereumvm::errors::RequireError; +use ethereumvm::{AccountChange, AccountCommitment, HeaderParams, Log, Patch, SeqTransactionVM, ValidTransaction, VM}; +use ethereumvm_network_classic::{MainnetEIP150Patch, MainnetEIP160Patch, MainnetFrontierPatch, MainnetHomesteadPatch}; use gethrpc::{ CachedGethRPCClient, GethRPCClient, NormalGethRPCClient, RPCBlock, RPCLog, RPCTransaction, RecordGethRPCClient, }; diff --git a/src/lib.rs b/src/lib.rs index 3dad357..f4e899e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,13 +1,13 @@ -//! SputnikVM implementation, traits and structs. +//! EthereumVM implementation, traits and structs. //! -//! SputnikVM works on two different levels. It handles: +//! EthereumVM works on two different levels. It handles: //! 1. a transaction, or //! 2. an Ethereum execution context. //! //! To interact with the virtual machine, you usually only need to //! work with [VM](trait.VM.html) methods. //! -//! ### A SputnikVM's Lifecycle +//! ### A EthereumVM's Lifecycle //! //! A VM can be started after it is given a `Transaction` (or //! `Context`) and a `BlockHeader`. The user can then `fire` or `step` @@ -35,7 +35,7 @@ //! multiple patches at the same time, it is recommended that you use //! trait objects. //! -//! The example below creates a new SputnikVM and stores the object in +//! The example below creates a new EthereumVM and stores the object in //! `vm` which can be used to `fire`, `step` or get status on. To do //! this, it must first create a transaction and a block header. The //! patch associated with the VM is either `EmbeddedPatch` or @@ -43,7 +43,7 @@ //! the beginning of the program. //! //! ``` -//! use evm::{EmbeddedPatch, VMTestPatch, +//! use ethereumvm::{EmbeddedPatch, VMTestPatch, //! HeaderParams, ValidTransaction, TransactionAction, //! VM, SeqTransactionVM}; //! use bigint::{Gas, U256, Address}; diff --git a/stateful/Cargo.toml b/stateful/Cargo.toml index 19c8391..5490129 100644 --- a/stateful/Cargo.toml +++ b/stateful/Cargo.toml @@ -1,14 +1,14 @@ [package] -name = "evm-stateful" +name = "ethereumvm-stateful" version = "0.11.0" license = "Apache-2.0" -description = "Stateful evm-rs wrapped with tries." +description = "Stateful ethereumvm wrapped with tries." authors = ["Wei Tang "] repository = "https://github.com/ethereumproject/evm-rs" edition = "2018" [dependencies] -evm = { version = "0.11", path = '..', default-features = false, features = ["std"] } +ethereumvm = { version = "0.11", path = '..', default-features = false, features = ["std"] } ethereum-bigint = { version = "0.2", default-features = false, features = ["std"] } ethereum-trie = { version = "0.3", default-features = false } ethereum-block = { version = "0.4", default-features = false } @@ -22,9 +22,9 @@ serde_derive = "1.0" serde_json = "1.0" lazy_static = "0.2" ethereum-hexutil = "0.2" -evm-network-classic = { version = "0.11", path = "../network/classic" } +ethereumvm-network-classic = { version = "0.11", path = "../network/classic" } [features] default = ["rust-secp256k1"] -c-secp256k1 = ["evm/c-secp256k1", "ethereum-block/c-secp256k1"] -rust-secp256k1 = ["evm/libsecp256k1", "ethereum-block/rust-secp256k1"] +c-secp256k1 = ["ethereumvm/c-secp256k1", "ethereum-block/c-secp256k1"] +rust-secp256k1 = ["ethereumvm/libsecp256k1", "ethereum-block/rust-secp256k1"] diff --git a/stateful/examples/parallel.rs b/stateful/examples/parallel.rs index 898056a..400903b 100644 --- a/stateful/examples/parallel.rs +++ b/stateful/examples/parallel.rs @@ -1,8 +1,8 @@ extern crate bigint; extern crate block; -extern crate evm; -extern crate evm_network_classic; -extern crate evm_stateful; +extern crate ethereumvm; +extern crate ethereumvm_network_classic; +extern crate ethereumvm_stateful; extern crate hexutil; extern crate trie; #[macro_use] @@ -10,9 +10,9 @@ extern crate lazy_static; use bigint::{Address, Gas, U256}; use block::TransactionAction; -use evm::{AccountChange, HeaderParams, SeqTransactionVM, Storage, ValidTransaction, VM}; -use evm_network_classic::MainnetEIP160Patch; -use evm_stateful::{LiteralAccount, MemoryStateful}; +use ethereumvm::{AccountChange, HeaderParams, SeqTransactionVM, Storage, ValidTransaction, VM}; +use ethereumvm_network_classic::MainnetEIP160Patch; +use ethereumvm_stateful::{LiteralAccount, MemoryStateful}; use hexutil::*; use std::collections::{HashMap, HashSet}; use std::ops::Deref; diff --git a/stateful/src/lib.rs b/stateful/src/lib.rs index 4471035..c350ad9 100644 --- a/stateful/src/lib.rs +++ b/stateful/src/lib.rs @@ -10,8 +10,8 @@ use bigint::{Address, H256, M256, U256}; use block::{Account, Transaction}; -use evm::errors::{PreExecutionError, RequireError}; -use evm::{ +use ethereumvm::errors::{PreExecutionError, RequireError}; +use ethereumvm::{ AccountChange, AccountCommitment, AccountState, HeaderParams, Memory, Patch, TransactionVM, ValidTransaction, VM, }; use sha3::{Digest, Keccak256}; diff --git a/stateful/tests/genesis.rs b/stateful/tests/genesis.rs index 3dfcf3e..28b706a 100644 --- a/stateful/tests/genesis.rs +++ b/stateful/tests/genesis.rs @@ -6,18 +6,18 @@ extern crate serde_derive; extern crate lazy_static; extern crate bigint; extern crate block; -extern crate evm; -extern crate evm_network_classic; -extern crate evm_stateful; +extern crate ethereumvm; +extern crate ethereumvm_network_classic; +extern crate ethereumvm_stateful; extern crate rand; extern crate sha3; extern crate trie; use bigint::{Address, Gas, H256, U256}; use block::TransactionAction; -use evm::{HeaderParams, SeqTransactionVM, VMStatus, ValidTransaction, VM}; -use evm_network_classic::MainnetEIP160Patch; -use evm_stateful::{LiteralAccount, MemoryStateful}; +use ethereumvm::{HeaderParams, SeqTransactionVM, VMStatus, ValidTransaction, VM}; +use ethereumvm_network_classic::MainnetEIP160Patch; +use ethereumvm_stateful::{LiteralAccount, MemoryStateful}; use rand::Rng; use sha3::{Digest, Keccak256}; use std::collections::HashMap;