forked from polkadot-evm/frontier
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proper Precompile Gas Consumption (polkadot-evm#337)
* First pass at Modexp precompile gas calculation * Incremental WIP adding modexp-eip2565.json tests * Include Modexp in precompile set * Working impl for ethereum test cases * Cleanup * Add Ethereum consensus tests in Modexp unit tests * Return gas cost from Modexp::execute() * Add (not very DRY) ethereum tests for Blake2 precompile * Fixes for Blake2F precompile * Implement EIP1108 gas costs for bn128 precompiles * Make precompile consensus test generic * Move test_precompile_consensus_tests to fp_evm * Clean up precompile testdata * Improve test_precompile_consensus_tests error handling * Change ECRecover to return "" on error; add related tests * Add clarifying comment * Add sha256 and ripem160 precompile test vectors * Add bn128 test vectors * Remove non-existent mod declaration * Implement Blake2 gas cost * Remove ecrecover tests that expect bytes 33-63 to matter * editorconfig * Remove version specification from local crate references * Remove modexp_eip2565 ts-tests (now redundant) * Use 'core::cmp::max' * Resolve compilation warnings * Handle target_gas properly * Revert from_ne_bytes -> from_le_bytes with comment about the logic * Bump precompile versions * Use 1.1.0 instead of 1.0.1 for new precompile versions Co-authored-by: Wei Tang <[email protected]> * Bump fp-evm to 1.0.1-dev * Reflect new fp-evm version in crates which depend on it * Remove unused log dependency in modexp precompile * Move eth "consensus tests" utility to its own crate * Modify remaining precompile tests to use pallet_evm_test_vector_support * Leave primitives/evm/src/precompile.r untouched * Add missing files * Use 1.0.1-dev as version for pallet-evm-test-vector-support * Chain 'std' for 'fp-evm' * Specify paritytech/frontier as the repo in all Cargo.toml files * Bump versions * Bump fp-storage to 1.0.1-dev * Bump fp-rpc to 1.0.1-dev * Bump fc-consensus to 1.0.1-dev Co-authored-by: Wei Tang <[email protected]>
- Loading branch information
Showing
34 changed files
with
650 additions
and
135 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "fc-consensus" | ||
version = "1.0.0" | ||
version = "1.0.1-dev" | ||
authors = ["Parity Technologies <[email protected]>"] | ||
description = "Frontier consensus for substrate" | ||
edition = "2018" | ||
|
@@ -17,7 +17,7 @@ sc-client-api = { version = "3.0.0", git = "https://github.com/paritytech/substr | |
sp-block-builder = { version = "3.0.0", git = "https://github.com/paritytech/substrate.git", branch = "frontier" } | ||
sp-inherents = { version = "3.0.0", git = "https://github.com/paritytech/substrate.git", branch = "frontier" } | ||
fp-consensus = { version = "1.0.0", path = "../../primitives/consensus" } | ||
fp-rpc = { version = "1.0.0", path = "../../primitives/rpc" } | ||
fp-rpc = { version = "1.0.1-dev", path = "../../primitives/rpc" } | ||
fc-db = { version = "1.0.0", path = "../db" } | ||
sp-consensus = { version = "0.9.0", git = "https://github.com/paritytech/substrate.git", branch = "frontier" } | ||
log = "0.4.8" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
[package] | ||
name = "pallet-evm" | ||
version = "3.0.0" | ||
version = "3.0.1-dev" | ||
authors = ["Parity Technologies <[email protected]>"] | ||
edition = "2018" | ||
license = "Apache-2.0" | ||
homepage = "https://substrate.dev" | ||
repository = "https://github.com/paritytech/substrate/" | ||
repository = "https://github.com/paritytech/frontier/" | ||
description = "FRAME EVM contracts pallet" | ||
readme = "README.md" | ||
|
||
|
@@ -23,7 +23,7 @@ sp-core = { version = "3.0.0", default-features = false, git = "https://github.c | |
sp-runtime = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "frontier" } | ||
sp-std = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "frontier" } | ||
sp-io = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "frontier" } | ||
fp-evm = { version = "1.0.0", default-features = false, path = "../../primitives/evm" } | ||
fp-evm = { version = "1.0.1-dev", default-features = false, path = "../../primitives/evm" } | ||
primitive-types = { version = "0.9.0", default-features = false, features = ["rlp", "byteorder"] } | ||
rlp = { version = "0.5", default-features = false } | ||
evm = { version = "0.25.0", default-features = false, features = ["with-codec"] } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
[package] | ||
name = "pallet-evm-precompile-blake2" | ||
version = "1.0.0" | ||
version = "1.1.0-dev" | ||
authors = ["Parity Technologies <[email protected]>"] | ||
edition = "2018" | ||
license = "Apache-2.0" | ||
homepage = "https://substrate.dev" | ||
repository = "https://github.com/paritytech/substrate/" | ||
repository = "https://github.com/paritytech/frontier/" | ||
description = "BLAKE2 precompiles for EVM pallet." | ||
|
||
[dependencies] | ||
sp-core = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "frontier" } | ||
sp-io = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "frontier" } | ||
fp-evm = { version = "1.0.0", default-features = false, path = "../../../../primitives/evm" } | ||
fp-evm = { version = "1.0.1-dev", default-features = false, path = "../../../../primitives/evm" } | ||
evm = { version = "0.25.0", default-features = false, features = ["with-codec"] } | ||
|
||
[dev-dependencies] | ||
pallet-evm-test-vector-support = { version = "1.0.0-dev", path = "../../test-vector-support" } | ||
|
||
[features] | ||
default = ["std"] | ||
std = [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,16 +5,19 @@ authors = ["Parity Technologies <[email protected]>"] | |
edition = "2018" | ||
license = "Apache-2.0" | ||
homepage = "https://substrate.dev" | ||
repository = "https://github.com/paritytech/substrate/" | ||
repository = "https://github.com/paritytech/frontier/" | ||
description = "BN128 precompiles for EVM pallet." | ||
|
||
[dependencies] | ||
sp-core = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "frontier" } | ||
sp-io = { version = "3.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "frontier" } | ||
fp-evm = { version = "1.0.0", default-features = false, path = "../../../../primitives/evm" } | ||
fp-evm = { version = "1.0.1-dev", default-features = false, path = "../../../../primitives/evm" } | ||
evm = { version = "0.25.0", default-features = false, features = ["with-codec"] } | ||
bn = { package = "substrate-bn", version = "0.6", default-features = false } | ||
|
||
[dev-dependencies] | ||
pallet-evm-test-vector-support = { version = "1.0.0-dev", path = "../../test-vector-support" } | ||
|
||
[features] | ||
default = ["std"] | ||
std = [ | ||
|
Oops, something went wrong.