From 9db14a49a1ea9c82d47d3ed191a9eb6fd47cbde2 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Tue, 14 May 2019 11:17:37 +0200 Subject: [PATCH 01/13] docs: Update evmbin to use rustup instead of multirust --- evmbin/benches/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evmbin/benches/mod.rs b/evmbin/benches/mod.rs index 7807464dd32..e1f0714d3b0 100644 --- a/evmbin/benches/mod.rs +++ b/evmbin/benches/mod.rs @@ -17,7 +17,7 @@ //! benchmarking for EVM //! should be started with: //! ```bash -//! multirust run nightly cargo bench +//! rustup run nightly cargo bench //! ``` #![feature(test)] From e2d4d4f453a77dff9ff47ee64104521866510d21 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Tue, 14 May 2019 11:18:48 +0200 Subject: [PATCH 02/13] docs: Update evmbin with Rustdocs overview, usage, comments --- evmbin/src/main.rs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/evmbin/src/main.rs b/evmbin/src/main.rs index 6e1260189e1..5d3498ce3fb 100644 --- a/evmbin/src/main.rs +++ b/evmbin/src/main.rs @@ -14,7 +14,21 @@ // You should have received a copy of the GNU General Public License // along with Parity Ethereum. If not, see . -//! Parity EVM interpreter binary. +//! Parity EVM Interpreter Binary. +//! +//! ## Overview +//! +//! The Parity EVM interpreter binary is an additional tool in the Parity +//! Ethereum toolchain. It is an EVM implementation for Parity Ethereum that +//! may be used to run a standalone version of the EVM interpreter. +//! +//! ## Usage +//! +//! Build Parity Ethereum from source, then start it with: +//! ```bash +//! cd evmbin && cargo build --release && cd .. +//! ./target/release/parity-evmbin --help +//! ``` #![warn(missing_docs)] @@ -268,6 +282,7 @@ struct Args { } impl Args { + /// Set the Gas Limit. Defaults to max value to allow code to run for whatever time is required. pub fn gas(&self) -> Result { match self.flag_gas { Some(ref gas) => gas.parse().map_err(to_string), @@ -275,6 +290,9 @@ impl Args { } } + /// Set the Gas Price. Defaults to zero to allow the code to run even if an account with no balance + /// is used, otherwise such accounts would not have sufficient funds to pay the transaction fee. + /// Defaulting to zero also makes testing easier since it is not necessary to specify a special configuration file. pub fn gas_price(&self) -> Result { match self.flag_gas_price { Some(ref gas_price) => gas_price.parse().map_err(to_string), From e851609a3a34434100aff1a481d9093580976926 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Tue, 14 May 2019 19:01:25 +0200 Subject: [PATCH 03/13] review-fix: Simplify evmbin usage commands --- evmbin/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/evmbin/src/main.rs b/evmbin/src/main.rs index 5d3498ce3fb..7021d749411 100644 --- a/evmbin/src/main.rs +++ b/evmbin/src/main.rs @@ -26,8 +26,8 @@ //! //! Build Parity Ethereum from source, then start it with: //! ```bash -//! cd evmbin && cargo build --release && cd .. -//! ./target/release/parity-evmbin --help +//! cd evmbin && cargo build -p evmbin && cd .. +//! ./target/debug/parity-evm --help //! ``` #![warn(missing_docs)] From 1d2cee6f8efb5138b90929b1e40baa14bf6dcb9a Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Wed, 15 May 2019 11:11:08 +0200 Subject: [PATCH 04/13] docs: Update evmbin Overview typo Co-Authored-By: David --- evmbin/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evmbin/src/main.rs b/evmbin/src/main.rs index 7021d749411..0545196abf1 100644 --- a/evmbin/src/main.rs +++ b/evmbin/src/main.rs @@ -18,7 +18,7 @@ //! //! ## Overview //! -//! The Parity EVM interpreter binary is an additional tool in the Parity +//! The Parity EVM interpreter binary is a tool in the Parity //! Ethereum toolchain. It is an EVM implementation for Parity Ethereum that //! may be used to run a standalone version of the EVM interpreter. //! From 17c41688d7e23c4c29372b54ca3819da8af93041 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Wed, 15 May 2019 11:11:52 +0200 Subject: [PATCH 05/13] docs: Update evmbin Overview grammer Co-Authored-By: David --- evmbin/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evmbin/src/main.rs b/evmbin/src/main.rs index 0545196abf1..d80e8a13d22 100644 --- a/evmbin/src/main.rs +++ b/evmbin/src/main.rs @@ -20,7 +20,7 @@ //! //! The Parity EVM interpreter binary is a tool in the Parity //! Ethereum toolchain. It is an EVM implementation for Parity Ethereum that -//! may be used to run a standalone version of the EVM interpreter. +//! is used to run a standalone version of the EVM interpreter. //! //! ## Usage //! From 57ad53816594880fc2269a9082cfe9c79d43cc94 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Wed, 15 May 2019 11:12:56 +0200 Subject: [PATCH 06/13] docs: Update evmbin Rust comments to be lowercase Co-Authored-By: David --- evmbin/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evmbin/src/main.rs b/evmbin/src/main.rs index d80e8a13d22..dcfda2b5f56 100644 --- a/evmbin/src/main.rs +++ b/evmbin/src/main.rs @@ -282,7 +282,7 @@ struct Args { } impl Args { - /// Set the Gas Limit. Defaults to max value to allow code to run for whatever time is required. + /// Set the gas limit. Defaults to max value to allow code to run for whatever time is required. pub fn gas(&self) -> Result { match self.flag_gas { Some(ref gas) => gas.parse().map_err(to_string), From eaca30a0690f43c4e39d5f5d354bef4641e18550 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Wed, 15 May 2019 11:13:20 +0200 Subject: [PATCH 07/13] docs: Update evmbin Rust comments to be lowercase for gas price Co-Authored-By: David --- evmbin/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evmbin/src/main.rs b/evmbin/src/main.rs index dcfda2b5f56..a0367b5ea98 100644 --- a/evmbin/src/main.rs +++ b/evmbin/src/main.rs @@ -290,7 +290,7 @@ impl Args { } } - /// Set the Gas Price. Defaults to zero to allow the code to run even if an account with no balance + /// Set the gas price. Defaults to zero to allow the code to run even if an account with no balance /// is used, otherwise such accounts would not have sufficient funds to pay the transaction fee. /// Defaulting to zero also makes testing easier since it is not necessary to specify a special configuration file. pub fn gas_price(&self) -> Result { From e928c33f3fc7d536f328978dc11b3742cb0ec70f Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Wed, 15 May 2019 11:16:14 +0200 Subject: [PATCH 08/13] docs: Update evmbin build command Rust docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Tomasz Drwięga --- evmbin/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evmbin/src/main.rs b/evmbin/src/main.rs index a0367b5ea98..8d3d08df388 100644 --- a/evmbin/src/main.rs +++ b/evmbin/src/main.rs @@ -26,7 +26,7 @@ //! //! Build Parity Ethereum from source, then start it with: //! ```bash -//! cd evmbin && cargo build -p evmbin && cd .. +//! cargo build -p evmbin //! ./target/debug/parity-evm --help //! ``` From d33a0edf0e50a0f1f7fd2924e977676319ecaf05 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Wed, 15 May 2019 11:20:57 +0200 Subject: [PATCH 09/13] review-fix: Update evmbin Overview to create release per dvdplm comment --- evmbin/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/evmbin/src/main.rs b/evmbin/src/main.rs index 8d3d08df388..1a234886378 100644 --- a/evmbin/src/main.rs +++ b/evmbin/src/main.rs @@ -26,8 +26,8 @@ //! //! Build Parity Ethereum from source, then start it with: //! ```bash -//! cargo build -p evmbin -//! ./target/debug/parity-evm --help +//! cargo build -p evmbin --release +//! ./target/release/parity-evm --help //! ``` #![warn(missing_docs)] From abc071f85dd85b0c18a59c64379ab65af7a4bf90 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Wed, 15 May 2019 11:25:59 +0200 Subject: [PATCH 10/13] review-fix: Fix explanation in usage section --- evmbin/src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/evmbin/src/main.rs b/evmbin/src/main.rs index 1a234886378..d698848670d 100644 --- a/evmbin/src/main.rs +++ b/evmbin/src/main.rs @@ -24,7 +24,9 @@ //! //! ## Usage //! -//! Build Parity Ethereum from source, then start it with: +//! The evmbin tool is not distributed with regular Parity Ethereum releases +//! so you need to build it from source and run it like so: +//! //! ```bash //! cargo build -p evmbin --release //! ./target/release/parity-evm --help From b6294e2023fcdee21f39f26f986d36c7a4969aea Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Wed, 15 May 2019 12:26:28 +0200 Subject: [PATCH 11/13] review-fix: Update evmbin usage suggesting user to copy the executable to PATH or create symlink --- evmbin/src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/evmbin/src/main.rs b/evmbin/src/main.rs index d698848670d..de3c6b31642 100644 --- a/evmbin/src/main.rs +++ b/evmbin/src/main.rs @@ -31,6 +31,10 @@ //! cargo build -p evmbin --release //! ./target/release/parity-evm --help //! ``` +//! +//! If you wish to run `parity-evm` from any directory, then either copy the +//! executable file itself to a directory that is in your PATH, or just create +//! a symlink to it. #![warn(missing_docs)] From 27323a4c48760e6c4efde3125d2d060eaa2a5d0d Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Thu, 16 May 2019 15:42:56 +0200 Subject: [PATCH 12/13] review-fix: Update evmbin executable in path sentence --- evmbin/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/evmbin/src/main.rs b/evmbin/src/main.rs index de3c6b31642..f34f3d95551 100644 --- a/evmbin/src/main.rs +++ b/evmbin/src/main.rs @@ -32,9 +32,9 @@ //! ./target/release/parity-evm --help //! ``` //! -//! If you wish to run `parity-evm` from any directory, then either copy the -//! executable file itself to a directory that is in your PATH, or just create -//! a symlink to it. +//! If you wish to run parity-evm from any directory then copy the executable +//! from ./target/release to a directory in your $PATH, +//! e.g. ~/bin or /usr/local/bin. #![warn(missing_docs)] From 46c597a1a234ecda875986cbfd158b4887b25338 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Fri, 17 May 2019 13:40:38 +0200 Subject: [PATCH 13/13] review-fix: Remove explaining to users how to use binaries since out of scope of docs --- evmbin/src/main.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/evmbin/src/main.rs b/evmbin/src/main.rs index f34f3d95551..d698848670d 100644 --- a/evmbin/src/main.rs +++ b/evmbin/src/main.rs @@ -31,10 +31,6 @@ //! cargo build -p evmbin --release //! ./target/release/parity-evm --help //! ``` -//! -//! If you wish to run parity-evm from any directory then copy the executable -//! from ./target/release to a directory in your $PATH, -//! e.g. ~/bin or /usr/local/bin. #![warn(missing_docs)]