-
Notifications
You must be signed in to change notification settings - Fork 509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proper Precompile Gas Consumption #337
Merged
sorpaas
merged 48 commits into
polkadot-evm:master
from
moonbeam-foundation:notlesh-precompile-gas
Apr 22, 2021
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
323703a
First pass at Modexp precompile gas calculation
notlesh e15510e
Incremental WIP adding modexp-eip2565.json tests
notlesh 4190349
Include Modexp in precompile set
notlesh 32bd18f
Working impl for ethereum test cases
notlesh 8741c70
Cleanup
notlesh 173c1eb
Add Ethereum consensus tests in Modexp unit tests
notlesh 9f38a16
Return gas cost from Modexp::execute()
notlesh 33dc225
Add (not very DRY) ethereum tests for Blake2 precompile
notlesh 2b9f4df
Fixes for Blake2F precompile
notlesh 1328579
Implement EIP1108 gas costs for bn128 precompiles
notlesh 2d39fd0
Make precompile consensus test generic
notlesh 2402503
Move test_precompile_consensus_tests to fp_evm
notlesh 907349c
Clean up precompile testdata
notlesh df397b7
Improve test_precompile_consensus_tests error handling
notlesh 13d291f
Change ECRecover to return "" on error; add related tests
notlesh 60b2dde
Add clarifying comment
notlesh 32cd435
Add sha256 and ripem160 precompile test vectors
notlesh cecc514
Add bn128 test vectors
notlesh 354f01e
Remove non-existent mod declaration
notlesh 3c90389
Implement Blake2 gas cost
notlesh af60d3e
Remove ecrecover tests that expect bytes 33-63 to matter
notlesh 32abb10
Merge branch 'master' into notlesh-precompile-gas
notlesh 197996e
editorconfig
notlesh 344f850
Remove version specification from local crate references
notlesh b71086c
Remove modexp_eip2565 ts-tests (now redundant)
notlesh 56562ed
Use 'core::cmp::max'
notlesh 9af65c3
Resolve compilation warnings
notlesh 4315777
Handle target_gas properly
notlesh cb3e617
Revert from_ne_bytes -> from_le_bytes with comment about the logic
notlesh 497d7cc
Bump precompile versions
notlesh dd650dc
Use 1.1.0 instead of 1.0.1 for new precompile versions
notlesh 471c257
Bump fp-evm to 1.0.1-dev
notlesh 53cbb93
Reflect new fp-evm version in crates which depend on it
notlesh 5ed6577
Remove unused log dependency in modexp precompile
notlesh d5ba52d
Move eth "consensus tests" utility to its own crate
notlesh 3f1771f
Modify remaining precompile tests to use pallet_evm_test_vector_support
notlesh 4dbbb9b
Leave primitives/evm/src/precompile.r untouched
notlesh f695773
Add missing files
notlesh d712378
Use 1.0.1-dev as version for pallet-evm-test-vector-support
notlesh d4a1e92
Chain 'std' for 'fp-evm'
notlesh 065215d
Specify paritytech/frontier as the repo in all Cargo.toml files
notlesh 1898b3f
Merge branch 'master' into notlesh-precompile-gas
notlesh 132933a
Bump versions
notlesh 69d35b5
Bump fp-storage to 1.0.1-dev
notlesh c3a27de
Bump fp-rpc to 1.0.1-dev
notlesh 565ea71
Bump fc-consensus to 1.0.1-dev
notlesh c173557
Merge branch 'master' into notlesh-precompile-gas
notlesh b29dd13
Merge branch 'master' into notlesh-precompile-gas
notlesh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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" } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please also update |
||
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All bumps should be recursive so
fc-consensus
needs to be bumped!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 565ea71. And I think that should cover it: every crate that was modified got a bump with
-dev
unless it was already at-dev
. The exception is the node template and runtime, which appear to not be versioned. Hope I got it right this time.