Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

contracts: Add automated weights for wasm instructions #7361

Merged
42 commits merged into from
Nov 9, 2020
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
2e82ebb
pallet_contracts: Inline benchmark helper that is only used once
athei Sep 29, 2020
ef6176c
Move all max_* Schedule items into a new struct
athei Oct 9, 2020
1f09405
Limit the number of globals a module can declare
athei Oct 9, 2020
9051f9a
The current limits are too high for wasmi to even execute
athei Oct 9, 2020
611f2b9
Limit the amount of parameters any wasm function is allowed to have
athei Oct 14, 2020
daaa15d
Limit the size the BrTable's immediate value
athei Oct 14, 2020
89b926a
Add instruction benchmarks
athei Sep 29, 2020
13bde4e
Add new benchmarks to the schedule and make use of it
athei Oct 20, 2020
52a721f
Add Benchmark Results generated by the bench bot
Oct 20, 2020
b3b6099
Add proc macro that implements `Debug` for `Schedule`
athei Oct 21, 2020
d761b60
Add missing imports necessary for no_std build
athei Oct 22, 2020
9164ad5
Make the WeightDebug macro available for no_std
athei Oct 22, 2020
f1a64d5
Merge remote-tracking branch 'origin/master' into at-seal-instr-bench…
athei Oct 22, 2020
96629d5
Rework instr_memory_grow benchmark to use only the maximum amount of …
athei Oct 22, 2020
6dca153
Add maximum amount of memory when benching (seal_)call/instantiate
athei Oct 22, 2020
023eab4
cargo run --release --features runtime-benchmarks --manifest-path bin…
Oct 22, 2020
4d5b334
Added utility benchmark that allows pretty printing of the real schedule
athei Oct 22, 2020
1df1a14
Merge branch 'master' into at-seal-instr-benchmark
athei Oct 26, 2020
b387191
Merge branch 'master' into at-seal-instr-benchmark
athei Oct 27, 2020
5d13571
Merge branch 'master' into at-seal-instr-benchmark
athei Oct 27, 2020
bbae16d
review: Add missing header to the proc-macro lib.rs
athei Oct 27, 2020
6ba5e0b
review: Clarify why #[allow(dead_code)] attribute is there
athei Oct 27, 2020
743bba1
review: Fix pwasm-utils line
athei Oct 27, 2020
39ccd14
review: Fixup rand usage
athei Oct 27, 2020
3887b1a
review: Fix typo
athei Oct 27, 2020
dbf02b4
review: Imported -> Exported
athei Oct 27, 2020
21f7d8a
Merge branch 'master' into at-seal-instr-benchmark
athei Oct 27, 2020
521e349
cargo run --release --features=runtime-benchmarks --manifest-path=bin…
Oct 27, 2020
c878054
contracts: Adapt to new weight structure
athei Oct 27, 2020
08e7f7a
contracts: Fixup runtime WeightInfo
athei Oct 27, 2020
09da4c5
contracts: Remove unneeded fullpath of WeightInfo type
athei Oct 28, 2020
dfe160e
Merge branch 'master' into at-seal-instr-benchmark
athei Oct 29, 2020
ee83eee
Apply suggestions from code review
athei Nov 6, 2020
8822ecc
Fix typo in schedule.rs
athei Nov 6, 2020
4f4350e
Fix docs in schedule.rs
athei Nov 6, 2020
2b8fcc5
Merge branch 'master' into at-seal-instr-benchmark
athei Nov 6, 2020
e49c4fb
Apply suggestions from code review
athei Nov 9, 2020
74593e4
Merge branch 'master' into at-seal-instr-benchmark
athei Nov 9, 2020
6d77f23
Don't publish proc-macro crate until 3.0.0 is ready
athei Nov 9, 2020
12617c2
Optimize imports for less repetition
athei Nov 9, 2020
315c557
Break overlong line
athei Nov 9, 2020
226da38
Merge branch 'master' into at-seal-instr-benchmark
athei Nov 9, 2020
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
27 changes: 25 additions & 2 deletions Cargo.lock

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

5 changes: 1 addition & 4 deletions bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ pub mod constants;
use constants::{time::*, currency::*};
use sp_runtime::generic::Era;

/// Weights for pallets used in the runtime.
mod weights;

// Make the WASM binary available.
#[cfg(feature = "std")]
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
Expand Down Expand Up @@ -697,7 +694,7 @@ impl pallet_contracts::Trait for Runtime {
type MaxDepth = pallet_contracts::DefaultMaxDepth;
type MaxValueSize = pallet_contracts::DefaultMaxValueSize;
type WeightPrice = pallet_transaction_payment::Module<Self>;
type WeightInfo = weights::pallet_contracts::WeightInfo<Self>;
type WeightInfo = pallet_contracts::weights::SubstrateWeight<Self>;
}

impl pallet_sudo::Trait for Runtime {
Expand Down
18 changes: 0 additions & 18 deletions bin/node/runtime/src/weights/mod.rs

This file was deleted.

294 changes: 0 additions & 294 deletions bin/node/runtime/src/weights/pallet_contracts.rs

This file was deleted.

Loading