Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
2036358
bench evm tx to calc ratio between gas and weight
ermalkaleci Nov 25, 2021
3e4fbe7
Merge remote-tracking branch 'origin/master' into benchmark_evm
ermalkaleci Nov 25, 2021
61064e6
fix
ermalkaleci Nov 25, 2021
b72020a
generate gas_to_weight file
ermalkaleci Nov 25, 2021
ba7526b
impl evm-bench
ermalkaleci Nov 30, 2021
741c0b6
udpate evm-bench
ermalkaleci Nov 30, 2021
af4c082
bench-evm script
ermalkaleci Dec 1, 2021
e440c6d
move bench into separate dir
ermalkaleci Dec 2, 2021
47777a3
create benchmark for evm_call, evm_create and evm_create2
ermalkaleci Dec 3, 2021
ba24b7a
update weight helper methods
ermalkaleci Dec 3, 2021
c4c6381
benchmark create_predeploy_contract and create_network_contract
ermalkaleci Dec 5, 2021
0091105
Merge master into benchmark_evm
ermalkaleci Dec 5, 2021
7528634
update evm-bench
ermalkaleci Dec 5, 2021
954333f
update weight templates
ermalkaleci Dec 6, 2021
0049d1a
fix makefile
ermalkaleci Dec 6, 2021
dc4dbfb
remove inline
ermalkaleci Dec 6, 2021
6343926
fix stable-asset commit
ermalkaleci Dec 6, 2021
3a204b2
fix predeploy-contract commit
ermalkaleci Dec 6, 2021
fb800f7
update evm-bench
ermalkaleci Dec 7, 2021
5cca7ba
inline bench evm cmd
ermalkaleci Dec 7, 2021
efb4fb8
Merge remote-tracking branch 'origin/master' into benchmark_evm
Dec 8, 2021
4cd89b5
make bench-evm
Dec 8, 2021
8f5c5f5
Merge remote-tracking branch 'origin/master' into benchmark_evm
Dec 8, 2021
01fc1d3
cleanup
ermalkaleci Dec 9, 2021
a508735
Merge remote-tracking branch 'origin/master' into benchmark_evm
ermalkaleci Dec 9, 2021
57240fc
update orml
ermalkaleci Dec 13, 2021
c5a774f
Merge remote-tracking branch 'origin/master' into benchmark_evm
ermalkaleci Dec 13, 2021
18d12f7
Merge remote-tracking branch 'origin/master' into benchmark_evm
ermalkaleci Dec 15, 2021
0349874
update benchmark
ermalkaleci Dec 15, 2021
d3db3bc
cargo run --release --color=never --bin=acala --features=runtime-benc…
Dec 15, 2021
8238def
undo unnecessary change
ermalkaleci Dec 15, 2021
240d4d7
cargo run --release --color=never --bin=acala --features=runtime-benc…
Dec 15, 2021
071b6ba
update ts-tests
ermalkaleci Dec 15, 2021
6c19c9d
update ts-tests weightFee
ermalkaleci Dec 15, 2021
04b3c64
Merge remote-tracking branch 'origin/master' into benchmark_evm
ermalkaleci Jan 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "stable-asset"]
path = ecosystem-modules/stable-asset
url = https://github.com/nutsfinance/stable-asset.git
[submodule "evm-bench"]
path = evm-bench
url = https://github.com/AcalaNetwork/evm-bench.git
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,7 @@ benchmark-acala:
.PHONY: clippy-fix
clippy-fix:
CARGO_INCREMENTAL=0 ./orml/scripts/run-clippy.sh --fix -Z unstable-options --broken-code --allow-dirty

.PHONY: bench-evm
bench-evm:
cargo bench -p module-evm --features bench | evm-bench/analyze_benches.js runtime/common/src/gas_to_weight_ratio.rs
1 change: 1 addition & 0 deletions evm-bench
Submodule evm-bench added at 5c7084
33 changes: 29 additions & 4 deletions modules/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ version = "2.1.3"
authors = ["Acala Developers"]
edition = "2021"

[[bench]]
name = "orml_benches"
harness = false
required-features = ["bench"]

[dependencies]
codec = { package = "parity-scale-codec", version = "2.3.1", default-features = false }
hex-literal = { version = "0.3.1" }
Expand All @@ -15,27 +20,30 @@ serde = { version = "1.0.124", optional = true, features = ["derive"] }
sha3 = { version = "0.9.1", default-features = false }
tiny-keccak = { version = "2.0", features = ["fips202"] }
scale-info = { version = "1.0", default-features = false, features = ["derive"] }
serde_json = { version = "1.0", default-features = false, features = ["alloc"], optional = true }
hex = { version = "0.4", default-features = false, features = ["alloc"], optional = true }

frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false, optional = true }

sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false }
orml-traits = { path = "../../orml/traits", default-features = false }
orml-bencher = { path = "../../orml/bencher", default-features = false, optional = true }
orml-currencies = { path = "../../orml/currencies", default-features = false, optional = true }
orml-tokens = { path = "../../orml/tokens", default-features = false, optional = true }

module-support = { path = "../support", default-features = false }
module-evm-utiltity = { path = "../evm-utiltity", default-features = false }
primitives = { package = "acala-primitives", path = "../../primitives", default-features = false }
module-idle-scheduler = { path = "../idle-scheduler", default-features = false, optional = true }

[dev-dependencies]
env_logger = "0.9.0"
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
orml-currencies = { path = "../../orml/currencies" }
orml-tokens = { path = "../../orml/tokens" }
module-idle-scheduler = { path = "../idle-scheduler" }

[features]
default = ["std"]
Expand All @@ -54,11 +62,28 @@ std = [
"module-evm-utiltity/std",
"primitive-types/std",
"pallet-timestamp/std",
"pallet-balances/std",
"ripemd160/std",
"primitives/std",
"orml-traits/std",
"module-support/std",
"orml-bencher/std",
"orml-currencies/std",
"orml-tokens/std",
"module-idle-scheduler/std"
]
with-ethereum-compatibility = []
try-runtime = ["frame-support/try-runtime"]
tracing = ["module-evm-utiltity/tracing"]
bench = [
"pallet-balances",
"orml-currencies",
"orml-tokens",
"orml-bencher/bench",
"frame-support/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"serde_json",
"hex",
"module-idle-scheduler"
]
20 changes: 20 additions & 0 deletions modules/evm/benches/orml_benches.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// This file is part of Acala.

// Copyright (C) 2020-2021 Acala Foundation.
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

use module_evm::bench::mock::{AllPalletsWithSystem, Block};
orml_bencher::run_benches!(AllPalletsWithSystem, Block);
Loading