mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 07:01:03 +00:00
Storage Layer for All FRAME Extrinsics (#11431)
* add new trait * implement DispatchableWithStorageLayer * at least one transactional * all dispatch is at least transactional * storage_layer api * add test * storage layer tests * deprecate transactional tag * i guess no reason to deprecate * remove transactional from batch_all * update tests * extend trait * cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_balances --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/balances/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * fix copy paste name * cargo run --quiet --profile=production --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_utility --extrinsic=* --execution=wasm --wasm-execution=compiled --output=./frame/utility/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Create run_all_benchmarks.sh * uncomment build * update number of steps and repeats * add skip build * Update run_all_benchmarks.sh * Update run_all_benchmarks.sh * new benchmarks * Update frame/support/src/traits/dispatch.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/support/src/traits/dispatch.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/support/test/tests/storage_layers.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/support/test/tests/storage_layers.rs * weights * Update dispatch.rs * doc link * decl_macro support Co-authored-by: Parity Bot <admin@parity.io> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
//! Autogenerated weights for pallet_election_provider_multi_phase
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2022-05-22, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! DATE: 2022-05-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
|
||||
|
||||
// Executed Command:
|
||||
@@ -68,33 +68,33 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: Staking ForceEra (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
|
||||
fn on_initialize_nothing() -> Weight {
|
||||
(12_920_000 as Weight)
|
||||
(13_495_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(8 as Weight))
|
||||
}
|
||||
// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1)
|
||||
fn on_initialize_open_signed() -> Weight {
|
||||
(13_366_000 as Weight)
|
||||
(14_114_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1)
|
||||
fn on_initialize_open_unsigned() -> Weight {
|
||||
(13_487_000 as Weight)
|
||||
(13_756_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase QueuedSolution (r:0 w:1)
|
||||
fn finalize_signed_phase_accept_solution() -> Weight {
|
||||
(28_656_000 as Weight)
|
||||
(28_467_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn finalize_signed_phase_reject_solution() -> Weight {
|
||||
(21_910_000 as Weight)
|
||||
(21_991_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
@@ -102,11 +102,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1)
|
||||
fn create_snapshot_internal(v: u32, t: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
(3_186_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((210_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add((202_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((77_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add((60_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1)
|
||||
@@ -119,11 +119,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1)
|
||||
fn elect_queued(a: u32, d: u32, ) -> Weight {
|
||||
(97_857_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((651_000 as Weight).saturating_mul(a as Weight))
|
||||
(137_653_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((133_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add((640_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((48_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
||||
}
|
||||
@@ -134,7 +134,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1)
|
||||
fn submit() -> Weight {
|
||||
(43_892_000 as Weight)
|
||||
(49_313_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
@@ -148,13 +148,13 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((900_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((141_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 11_000
|
||||
.saturating_add((6_817_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 17_000
|
||||
.saturating_add((1_533_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add((867_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 7_000
|
||||
.saturating_add((107_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((6_907_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 18_000
|
||||
.saturating_add((1_427_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
@@ -164,14 +164,14 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0)
|
||||
fn feasibility_check(v: u32, t: u32, a: u32, d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((885_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((205_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 11_000
|
||||
.saturating_add((5_532_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 16_000
|
||||
.saturating_add((1_138_000 as Weight).saturating_mul(d as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((844_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((150_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 8_000
|
||||
.saturating_add((5_421_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((1_167_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
}
|
||||
}
|
||||
@@ -187,33 +187,33 @@ impl WeightInfo for () {
|
||||
// Storage: Staking ForceEra (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
|
||||
fn on_initialize_nothing() -> Weight {
|
||||
(12_920_000 as Weight)
|
||||
(13_495_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(8 as Weight))
|
||||
}
|
||||
// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1)
|
||||
fn on_initialize_open_signed() -> Weight {
|
||||
(13_366_000 as Weight)
|
||||
(14_114_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: ElectionProviderMultiPhase Round (r:1 w:0)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1)
|
||||
fn on_initialize_open_unsigned() -> Weight {
|
||||
(13_487_000 as Weight)
|
||||
(13_756_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase QueuedSolution (r:0 w:1)
|
||||
fn finalize_signed_phase_accept_solution() -> Weight {
|
||||
(28_656_000 as Weight)
|
||||
(28_467_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: System Account (r:1 w:1)
|
||||
fn finalize_signed_phase_reject_solution() -> Weight {
|
||||
(21_910_000 as Weight)
|
||||
(21_991_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
@@ -221,11 +221,11 @@ impl WeightInfo for () {
|
||||
// Storage: ElectionProviderMultiPhase DesiredTargets (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1)
|
||||
fn create_snapshot_internal(v: u32, t: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
(3_186_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((210_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add((202_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((77_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add((60_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
// Storage: ElectionProviderMultiPhase SignedSubmissionIndices (r:1 w:1)
|
||||
@@ -238,11 +238,11 @@ impl WeightInfo for () {
|
||||
// Storage: ElectionProviderMultiPhase Snapshot (r:0 w:1)
|
||||
// Storage: ElectionProviderMultiPhase CurrentPhase (r:0 w:1)
|
||||
fn elect_queued(a: u32, d: u32, ) -> Weight {
|
||||
(97_857_000 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((651_000 as Weight).saturating_mul(a as Weight))
|
||||
(137_653_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((133_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add((640_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((48_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(8 as Weight))
|
||||
}
|
||||
@@ -253,7 +253,7 @@ impl WeightInfo for () {
|
||||
// Storage: ElectionProviderMultiPhase SignedSubmissionNextIndex (r:1 w:1)
|
||||
// Storage: ElectionProviderMultiPhase SignedSubmissionsMap (r:0 w:1)
|
||||
fn submit() -> Weight {
|
||||
(43_892_000 as Weight)
|
||||
(49_313_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
@@ -267,13 +267,13 @@ impl WeightInfo for () {
|
||||
fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((900_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((141_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 11_000
|
||||
.saturating_add((6_817_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 17_000
|
||||
.saturating_add((1_533_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add((867_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 7_000
|
||||
.saturating_add((107_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((6_907_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 18_000
|
||||
.saturating_add((1_427_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
@@ -283,14 +283,14 @@ impl WeightInfo for () {
|
||||
// Storage: ElectionProviderMultiPhase Snapshot (r:1 w:0)
|
||||
fn feasibility_check(v: u32, t: u32, a: u32, d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 3_000
|
||||
.saturating_add((885_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((205_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 11_000
|
||||
.saturating_add((5_532_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 16_000
|
||||
.saturating_add((1_138_000 as Weight).saturating_mul(d as Weight))
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((844_000 as Weight).saturating_mul(v as Weight))
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((150_000 as Weight).saturating_mul(t as Weight))
|
||||
// Standard Error: 8_000
|
||||
.saturating_add((5_421_000 as Weight).saturating_mul(a as Weight))
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((1_167_000 as Weight).saturating_mul(d as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user