Companion for #11649: Bound uses of Call (#5729)

* Fixes

* Clear out old weights

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Resolve merges

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix weight traits

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* polkadot runtime: Clippy

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* rococo runtime: update pallet configs

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add preimage migration

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add all migrations

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Democracy is not on Westend

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* [Migration] Refund stored multisig calls (#6075)

* Add Preimages to referenda config

Needed since Gov V2 just merged.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update weights

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add multisig migration to Westend+Rococo

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix Executive syntax

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Bump Substrate

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: parity-processbot <>
Co-authored-by: Roman Useinov <roman.useinov@gmail.com>
This commit is contained in:
Gavin Wood
2022-10-05 22:17:59 +01:00
committed by GitHub
parent 4aea71a95f
commit 9a3cf4cd1f
19 changed files with 786 additions and 1249 deletions
+15 -10
View File
@@ -70,8 +70,8 @@ use sp_mmr_primitives as mmr;
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
traits::{
AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, Extrinsic as ExtrinsicT,
Keccak256, OpaqueKeys, SaturatedConversion, Verify,
AccountIdLookup, BlakeTwo256, Block as BlockT, ConstU32, ConvertInto,
Extrinsic as ExtrinsicT, Keccak256, OpaqueKeys, SaturatedConversion, Verify,
},
transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity},
ApplyExtrinsicResult, KeyTypeId, Perbill, Percent, Permill,
@@ -216,12 +216,10 @@ impl pallet_scheduler::Config for Runtime {
type MaxScheduledPerBlock = MaxScheduledPerBlock;
type WeightInfo = weights::pallet_scheduler::WeightInfo<Runtime>;
type OriginPrivilegeCmp = OriginPrivilegeCmp;
type PreimageProvider = Preimage;
type NoPreimagePostponement = NoPreimagePostponement;
type Preimages = Preimage;
}
parameter_types! {
pub const PreimageMaxSize: u32 = 4096 * 1024;
pub const PreimageBaseDeposit: Balance = deposit(2, 64);
pub const PreimageByteDeposit: Balance = deposit(0, 1);
}
@@ -231,7 +229,6 @@ impl pallet_preimage::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type ManagerOrigin = EnsureRoot<AccountId>;
type MaxSize = PreimageMaxSize;
type BaseDeposit = PreimageBaseDeposit;
type ByteDeposit = PreimageByteDeposit;
}
@@ -399,7 +396,6 @@ parameter_types! {
}
impl pallet_democracy::Config for Runtime {
type Proposal = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type EnactmentPeriod = EnactmentPeriod;
@@ -441,14 +437,15 @@ impl pallet_democracy::Config for Runtime {
// only do it once and it lasts only for the cooloff period.
type VetoOrigin = pallet_collective::EnsureMember<AccountId, TechnicalCollective>;
type CooloffPeriod = CooloffPeriod;
type PreimageByteDeposit = PreimageByteDeposit;
type OperationalPreimageOrigin = pallet_collective::EnsureMember<AccountId, CouncilCollective>;
type Slash = Treasury;
type Scheduler = Scheduler;
type PalletsOrigin = OriginCaller;
type MaxVotes = MaxVotes;
type WeightInfo = weights::pallet_democracy::WeightInfo<Runtime>;
type MaxProposals = MaxProposals;
type Preimages = Preimage;
type MaxDeposits = ConstU32<100>;
type MaxBlacklisted = ConstU32<100>;
}
parameter_types! {
@@ -1453,7 +1450,15 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
(parachains_configuration::migration::v3::MigrateToV3<Runtime>,),
(
// "Bound uses of call" <https://github.com/paritytech/polkadot/pull/5729>
pallet_preimage::migration::v1::Migration<Runtime>,
pallet_scheduler::migration::v3::MigrateToV4<Runtime>,
pallet_democracy::migrations::v1::Migration<Runtime>,
pallet_multisig::migrations::v1::MigrateToV1<Runtime>,
// "Properly migrate weights to v2" <https://github.com/paritytech/polkadot/pull/6091>
parachains_configuration::migration::v3::MigrateToV3<Runtime>,
),
>;
/// The payload being signed in transactions.
pub type SignedPayload = generic::SignedPayload<RuntimeCall, SignedExtra>;
@@ -16,8 +16,8 @@
//! Autogenerated weights for `pallet_democracy`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-08-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! DATE: 2022-10-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024
// Executed Command:
@@ -32,7 +32,7 @@
// --execution=wasm
// --wasm-execution=compiled
// --header=./file_header.txt
// --output=./runtime/rococo/src/weights/pallet_democracy.rs
// --output=./runtime/rococo/src/weights
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -49,134 +49,103 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Storage: Democracy Blacklist (r:1 w:0)
// Storage: Democracy DepositOf (r:0 w:1)
fn propose() -> Weight {
Weight::from_ref_time(37_453_000 as u64)
Weight::from_ref_time(41_783_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: Democracy DepositOf (r:1 w:1)
/// The range of component `s` is `[0, 100]`.
fn second(s: u32, ) -> Weight {
Weight::from_ref_time(27_807_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(69_000 as u64).saturating_mul(s as u64))
fn second() -> Weight {
Weight::from_ref_time(38_362_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
// Storage: Democracy VotingOf (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
/// The range of component `r` is `[1, 99]`.
fn vote_new(r: u32, ) -> Weight {
Weight::from_ref_time(35_336_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(120_000 as u64).saturating_mul(r as u64))
fn vote_new() -> Weight {
Weight::from_ref_time(48_307_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
// Storage: Democracy VotingOf (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
/// The range of component `r` is `[1, 99]`.
fn vote_existing(r: u32, ) -> Weight {
Weight::from_ref_time(35_107_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(123_000 as u64).saturating_mul(r as u64))
fn vote_existing() -> Weight {
Weight::from_ref_time(48_500_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
// Storage: Democracy Cancellations (r:1 w:1)
fn emergency_cancel() -> Weight {
Weight::from_ref_time(17_752_000 as u64)
Weight::from_ref_time(20_294_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Democracy PublicProps (r:1 w:1)
// Storage: Democracy DepositOf (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: Democracy NextExternal (r:1 w:1)
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
// Storage: Democracy Blacklist (r:0 w:1)
// Storage: Democracy DepositOf (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `p` is `[1, 100]`.
fn blacklist(p: u32, ) -> Weight {
Weight::from_ref_time(52_116_000 as u64)
// Standard Error: 6_000
.saturating_add(Weight::from_ref_time(194_000 as u64).saturating_mul(p as u64))
fn blacklist() -> Weight {
Weight::from_ref_time(75_191_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(6 as u64))
}
// Storage: Democracy NextExternal (r:1 w:1)
// Storage: Democracy Blacklist (r:1 w:0)
/// The range of component `v` is `[1, 100]`.
fn external_propose(v: u32, ) -> Weight {
Weight::from_ref_time(10_194_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(10_000 as u64).saturating_mul(v as u64))
fn external_propose() -> Weight {
Weight::from_ref_time(16_369_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Democracy NextExternal (r:0 w:1)
fn external_propose_majority() -> Weight {
Weight::from_ref_time(3_700_000 as u64)
Weight::from_ref_time(4_767_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Democracy NextExternal (r:0 w:1)
fn external_propose_default() -> Weight {
Weight::from_ref_time(3_713_000 as u64)
Weight::from_ref_time(4_866_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Democracy NextExternal (r:1 w:1)
// Storage: Democracy ReferendumCount (r:1 w:1)
// Storage: Democracy ReferendumInfoOf (r:0 w:1)
fn fast_track() -> Weight {
Weight::from_ref_time(17_441_000 as u64)
Weight::from_ref_time(19_986_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: Democracy NextExternal (r:1 w:1)
// Storage: Democracy Blacklist (r:1 w:1)
/// The range of component `v` is `[0, 100]`.
fn veto_external(v: u32, ) -> Weight {
Weight::from_ref_time(18_536_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(42_000 as u64).saturating_mul(v as u64))
fn veto_external() -> Weight {
Weight::from_ref_time(25_291_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Democracy PublicProps (r:1 w:1)
// Storage: Democracy DepositOf (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `p` is `[1, 100]`.
fn cancel_proposal(p: u32, ) -> Weight {
Weight::from_ref_time(42_174_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(164_000 as u64).saturating_mul(p as u64))
fn cancel_proposal() -> Weight {
Weight::from_ref_time(63_703_000 as u64)
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: Democracy ReferendumInfoOf (r:0 w:1)
fn cancel_referendum() -> Weight {
Weight::from_ref_time(11_892_000 as u64)
Weight::from_ref_time(13_235_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Scheduler Lookup (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
/// The range of component `r` is `[1, 99]`.
fn cancel_queued(r: u32, ) -> Weight {
Weight::from_ref_time(23_252_000 as u64)
// Standard Error: 5_000
.saturating_add(Weight::from_ref_time(2_242_000 as u64).saturating_mul(r as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Democracy LowestUnbaked (r:1 w:1)
// Storage: Democracy ReferendumCount (r:1 w:0)
// Storage: Democracy ReferendumInfoOf (r:1 w:0)
/// The range of component `r` is `[1, 99]`.
// Storage: Democracy ReferendumInfoOf (r:2 w:0)
/// The range of component `r` is `[0, 99]`.
fn on_initialize_base(r: u32, ) -> Weight {
Weight::from_ref_time(1_457_000 as u64)
// Standard Error: 3_000
.saturating_add(Weight::from_ref_time(2_956_000 as u64).saturating_mul(r as u64))
Weight::from_ref_time(5_980_000 as u64)
// Standard Error: 2_131
.saturating_add(Weight::from_ref_time(2_104_197 as u64).saturating_mul(r as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64)))
.saturating_add(T::DbWeight::get().writes(1 as u64))
@@ -186,36 +155,36 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
// Storage: Democracy LastTabledWasExternal (r:1 w:0)
// Storage: Democracy NextExternal (r:1 w:0)
// Storage: Democracy PublicProps (r:1 w:0)
// Storage: Democracy ReferendumInfoOf (r:1 w:0)
/// The range of component `r` is `[1, 99]`.
// Storage: Democracy ReferendumInfoOf (r:2 w:0)
/// The range of component `r` is `[0, 99]`.
fn on_initialize_base_with_launch_period(r: u32, ) -> Weight {
Weight::from_ref_time(6_240_000 as u64)
// Standard Error: 3_000
.saturating_add(Weight::from_ref_time(2_963_000 as u64).saturating_mul(r as u64))
Weight::from_ref_time(8_351_000 as u64)
// Standard Error: 2_308
.saturating_add(Weight::from_ref_time(2_117_411 as u64).saturating_mul(r as u64))
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64)))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Democracy VotingOf (r:3 w:3)
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
/// The range of component `r` is `[1, 99]`.
// Storage: Democracy ReferendumInfoOf (r:2 w:2)
/// The range of component `r` is `[0, 99]`.
fn delegate(r: u32, ) -> Weight {
Weight::from_ref_time(34_480_000 as u64)
// Standard Error: 5_000
.saturating_add(Weight::from_ref_time(3_908_000 as u64).saturating_mul(r as u64))
Weight::from_ref_time(40_303_000 as u64)
// Standard Error: 3_789
.saturating_add(Weight::from_ref_time(3_031_594 as u64).saturating_mul(r as u64))
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64)))
.saturating_add(T::DbWeight::get().writes(4 as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(r as u64)))
}
// Storage: Democracy VotingOf (r:2 w:2)
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
/// The range of component `r` is `[1, 99]`.
// Storage: Democracy ReferendumInfoOf (r:2 w:2)
/// The range of component `r` is `[0, 99]`.
fn undelegate(r: u32, ) -> Weight {
Weight::from_ref_time(17_446_000 as u64)
// Standard Error: 6_000
.saturating_add(Weight::from_ref_time(3_917_000 as u64).saturating_mul(r as u64))
Weight::from_ref_time(24_342_000 as u64)
// Standard Error: 2_624
.saturating_add(Weight::from_ref_time(2_962_125 as u64).saturating_mul(r as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(r as u64)))
.saturating_add(T::DbWeight::get().writes(2 as u64))
@@ -223,76 +192,48 @@ impl<T: frame_system::Config> pallet_democracy::WeightInfo for WeightInfo<T> {
}
// Storage: Democracy PublicProps (r:0 w:1)
fn clear_public_proposals() -> Weight {
Weight::from_ref_time(3_727_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Democracy Preimages (r:1 w:1)
/// The range of component `b` is `[0, 16384]`.
fn note_preimage(b: u32, ) -> Weight {
Weight::from_ref_time(25_720_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Democracy Preimages (r:1 w:1)
/// The range of component `b` is `[0, 16384]`.
fn note_imminent_preimage(b: u32, ) -> Weight {
Weight::from_ref_time(17_884_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Democracy Preimages (r:1 w:1)
// Storage: System Account (r:1 w:0)
/// The range of component `b` is `[0, 16384]`.
fn reap_preimage(b: u32, ) -> Weight {
Weight::from_ref_time(24_695_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
Weight::from_ref_time(5_811_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Democracy VotingOf (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `r` is `[1, 99]`.
/// The range of component `r` is `[0, 99]`.
fn unlock_remove(r: u32, ) -> Weight {
Weight::from_ref_time(22_207_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(36_000 as u64).saturating_mul(r as u64))
Weight::from_ref_time(22_894_000 as u64)
// Standard Error: 2_967
.saturating_add(Weight::from_ref_time(142_001 as u64).saturating_mul(r as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: Democracy VotingOf (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
// Storage: System Account (r:1 w:1)
/// The range of component `r` is `[1, 99]`.
/// The range of component `r` is `[0, 99]`.
fn unlock_set(r: u32, ) -> Weight {
Weight::from_ref_time(21_561_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(110_000 as u64).saturating_mul(r as u64))
Weight::from_ref_time(28_227_000 as u64)
// Standard Error: 673
.saturating_add(Weight::from_ref_time(87_748 as u64).saturating_mul(r as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
// Storage: Democracy VotingOf (r:1 w:1)
/// The range of component `r` is `[1, 99]`.
/// The range of component `r` is `[1, 100]`.
fn remove_vote(r: u32, ) -> Weight {
Weight::from_ref_time(13_204_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(105_000 as u64).saturating_mul(r as u64))
Weight::from_ref_time(15_578_000 as u64)
// Standard Error: 1_035
.saturating_add(Weight::from_ref_time(105_378 as u64).saturating_mul(r as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Democracy ReferendumInfoOf (r:1 w:1)
// Storage: Democracy VotingOf (r:1 w:1)
/// The range of component `r` is `[1, 99]`.
/// The range of component `r` is `[1, 100]`.
fn remove_other_vote(r: u32, ) -> Weight {
Weight::from_ref_time(12_994_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(106_000 as u64).saturating_mul(r as u64))
Weight::from_ref_time(15_542_000 as u64)
// Standard Error: 1_104
.saturating_add(Weight::from_ref_time(109_552 as u64).saturating_mul(r as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
@@ -16,8 +16,8 @@
//! Autogenerated weights for `pallet_preimage`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-08-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! DATE: 2022-10-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024
// Executed Command:
@@ -32,7 +32,7 @@
// --execution=wasm
// --wasm-execution=compiled
// --header=./file_header.txt
// --output=./runtime/rococo/src/weights/pallet_preimage.rs
// --output=./runtime/rococo/src/weights
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -44,91 +44,90 @@ use sp_std::marker::PhantomData;
/// Weight functions for `pallet_preimage`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> {
// Storage: Preimage PreimageFor (r:1 w:1)
// Storage: Preimage StatusFor (r:1 w:1)
// Storage: Preimage PreimageFor (r:0 w:1)
/// The range of component `s` is `[0, 4194304]`.
fn note_preimage(s: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
Weight::from_ref_time(29_017_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(Weight::from_ref_time(2_113 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Preimage PreimageFor (r:1 w:1)
// Storage: Preimage StatusFor (r:1 w:0)
// Storage: Preimage StatusFor (r:1 w:1)
// Storage: Preimage PreimageFor (r:0 w:1)
/// The range of component `s` is `[0, 4194304]`.
fn note_requested_preimage(s: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
Weight::from_ref_time(19_793_000 as u64)
// Standard Error: 1
.saturating_add(Weight::from_ref_time(2_115 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Preimage PreimageFor (r:1 w:1)
// Storage: Preimage StatusFor (r:1 w:0)
// Storage: Preimage StatusFor (r:1 w:1)
// Storage: Preimage PreimageFor (r:0 w:1)
/// The range of component `s` is `[0, 4194304]`.
fn note_no_deposit_preimage(s: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
Weight::from_ref_time(18_854_000 as u64)
// Standard Error: 1
.saturating_add(Weight::from_ref_time(2_115 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Preimage StatusFor (r:1 w:1)
// Storage: Preimage PreimageFor (r:0 w:1)
fn unnote_preimage() -> Weight {
Weight::from_ref_time(35_236_000 as u64)
Weight::from_ref_time(38_886_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Preimage StatusFor (r:1 w:1)
// Storage: Preimage PreimageFor (r:0 w:1)
fn unnote_no_deposit_preimage() -> Weight {
Weight::from_ref_time(23_396_000 as u64)
Weight::from_ref_time(27_017_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Preimage StatusFor (r:1 w:1)
fn request_preimage() -> Weight {
Weight::from_ref_time(33_944_000 as u64)
Weight::from_ref_time(25_041_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Preimage StatusFor (r:1 w:1)
fn request_no_deposit_preimage() -> Weight {
Weight::from_ref_time(22_151_000 as u64)
Weight::from_ref_time(13_933_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Preimage StatusFor (r:1 w:1)
fn request_unnoted_preimage() -> Weight {
Weight::from_ref_time(16_617_000 as u64)
Weight::from_ref_time(17_760_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Preimage StatusFor (r:1 w:1)
fn request_requested_preimage() -> Weight {
Weight::from_ref_time(6_552_000 as u64)
Weight::from_ref_time(8_816_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Preimage StatusFor (r:1 w:1)
// Storage: Preimage PreimageFor (r:0 w:1)
fn unrequest_preimage() -> Weight {
Weight::from_ref_time(23_787_000 as u64)
Weight::from_ref_time(25_068_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Preimage StatusFor (r:1 w:1)
// Storage: Preimage PreimageFor (r:0 w:1)
fn unrequest_unnoted_preimage() -> Weight {
Weight::from_ref_time(16_327_000 as u64)
Weight::from_ref_time(8_917_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Preimage StatusFor (r:1 w:1)
fn unrequest_multi_referenced_preimage() -> Weight {
Weight::from_ref_time(6_289_000 as u64)
Weight::from_ref_time(8_915_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
@@ -16,8 +16,8 @@
//! Autogenerated weights for `pallet_scheduler`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-08-19, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm4`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! DATE: 2022-10-03, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("rococo-dev"), DB CACHE: 1024
// Executed Command:
@@ -32,7 +32,7 @@
// --execution=wasm
// --wasm-execution=compiled
// --header=./file_header.txt
// --output=./runtime/rococo/src/weights/pallet_scheduler.rs
// --output=./runtime/rococo/src/weights
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
@@ -44,133 +44,57 @@ use sp_std::marker::PhantomData;
/// Weight functions for `pallet_scheduler`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> {
// Storage: Scheduler Agenda (r:2 w:2)
// Storage: Preimage PreimageFor (r:1 w:1)
// Storage: Preimage StatusFor (r:1 w:1)
// Storage: Scheduler Lookup (r:0 w:1)
/// The range of component `s` is `[1, 50]`.
fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight {
Weight::from_ref_time(1_256_000 as u64)
// Standard Error: 42_000
.saturating_add(Weight::from_ref_time(26_925_000 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(s as u64)))
.saturating_add(T::DbWeight::get().writes(1 as u64))
.saturating_add(T::DbWeight::get().writes((4 as u64).saturating_mul(s as u64)))
}
// Storage: Scheduler Agenda (r:1 w:1)
// Storage: Preimage PreimageFor (r:1 w:1)
// Storage: Preimage StatusFor (r:1 w:1)
// Storage: Scheduler Lookup (r:0 w:1)
/// The range of component `s` is `[1, 50]`.
fn on_initialize_named_resolved(s: u32, ) -> Weight {
Weight::from_ref_time(921_000 as u64)
// Standard Error: 35_000
.saturating_add(Weight::from_ref_time(21_922_000 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(s as u64)))
.saturating_add(T::DbWeight::get().writes(1 as u64))
.saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(s as u64)))
}
// Storage: Scheduler Agenda (r:2 w:2)
// Storage: Preimage PreimageFor (r:1 w:1)
// Storage: Preimage StatusFor (r:1 w:1)
/// The range of component `s` is `[1, 50]`.
fn on_initialize_periodic_resolved(s: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 62_000
.saturating_add(Weight::from_ref_time(24_926_000 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(s as u64)))
.saturating_add(T::DbWeight::get().writes(1 as u64))
.saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(s as u64)))
}
// Storage: Scheduler Agenda (r:1 w:1)
// Storage: Preimage PreimageFor (r:1 w:1)
// Storage: Preimage StatusFor (r:1 w:1)
/// The range of component `s` is `[1, 50]`.
fn on_initialize_resolved(s: u32, ) -> Weight {
Weight::from_ref_time(10_674_000 as u64)
// Standard Error: 31_000
.saturating_add(Weight::from_ref_time(20_631_000 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(s as u64)))
.saturating_add(T::DbWeight::get().writes(1 as u64))
.saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(s as u64)))
}
// Storage: Scheduler Agenda (r:2 w:2)
// Storage: Preimage PreimageFor (r:1 w:0)
// Storage: Scheduler Lookup (r:0 w:1)
/// The range of component `s` is `[1, 50]`.
fn on_initialize_named_aborted(s: u32, ) -> Weight {
Weight::from_ref_time(2_607_000 as u64)
// Standard Error: 20_000
.saturating_add(Weight::from_ref_time(10_009_000 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64)))
.saturating_add(T::DbWeight::get().writes(2 as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64)))
}
// Storage: Scheduler Agenda (r:2 w:2)
// Storage: Preimage PreimageFor (r:1 w:0)
/// The range of component `s` is `[1, 50]`.
fn on_initialize_aborted(s: u32, ) -> Weight {
Weight::from_ref_time(3_381_000 as u64)
// Standard Error: 17_000
.saturating_add(Weight::from_ref_time(7_945_000 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64)))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Scheduler Agenda (r:2 w:2)
// Storage: Scheduler Lookup (r:0 w:1)
/// The range of component `s` is `[1, 50]`.
fn on_initialize_periodic_named(s: u32, ) -> Weight {
Weight::from_ref_time(6_676_000 as u64)
// Standard Error: 25_000
.saturating_add(Weight::from_ref_time(16_966_000 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64)))
.saturating_add(T::DbWeight::get().writes(1 as u64))
.saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(s as u64)))
}
// Storage: Scheduler Agenda (r:2 w:2)
/// The range of component `s` is `[1, 50]`.
fn on_initialize_periodic(s: u32, ) -> Weight {
Weight::from_ref_time(8_899_000 as u64)
// Standard Error: 24_000
.saturating_add(Weight::from_ref_time(14_630_000 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64)))
.saturating_add(T::DbWeight::get().writes(1 as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64)))
}
// Storage: Scheduler Agenda (r:1 w:1)
// Storage: Scheduler Lookup (r:0 w:1)
/// The range of component `s` is `[1, 50]`.
fn on_initialize_named(s: u32, ) -> Weight {
Weight::from_ref_time(8_583_000 as u64)
// Standard Error: 19_000
.saturating_add(Weight::from_ref_time(12_228_000 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64)))
}
// Storage: Scheduler Agenda (r:1 w:1)
/// The range of component `s` is `[1, 50]`.
fn on_initialize(s: u32, ) -> Weight {
Weight::from_ref_time(8_544_000 as u64)
// Standard Error: 19_000
.saturating_add(Weight::from_ref_time(11_364_000 as u64).saturating_mul(s as u64))
// Storage: Scheduler IncompleteSince (r:1 w:1)
fn service_agendas_base() -> Weight {
Weight::from_ref_time(4_700_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Scheduler Agenda (r:1 w:1)
/// The range of component `s` is `[0, 50]`.
fn service_agenda_base(s: u32, ) -> Weight {
Weight::from_ref_time(3_868_000 as u64)
// Standard Error: 2_747
.saturating_add(Weight::from_ref_time(629_992 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
fn service_task_base() -> Weight {
Weight::from_ref_time(12_316_000 as u64)
}
// Storage: Preimage PreimageFor (r:1 w:1)
// Storage: Preimage StatusFor (r:1 w:1)
/// The range of component `s` is `[128, 4194304]`.
fn service_task_fetched(s: u32, ) -> Weight {
Weight::from_ref_time(24_103_000 as u64)
// Standard Error: 5
.saturating_add(Weight::from_ref_time(1_154 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Scheduler Lookup (r:0 w:1)
fn service_task_named() -> Weight {
Weight::from_ref_time(13_408_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Scheduler Agenda (r:1 w:1)
fn service_task_periodic() -> Weight {
Weight::from_ref_time(19_302_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
fn execute_dispatch_signed() -> Weight {
Weight::from_ref_time(3_885_000 as u64)
}
fn execute_dispatch_unsigned() -> Weight {
Weight::from_ref_time(4_037_000 as u64)
}
// Storage: Scheduler Agenda (r:1 w:1)
/// The range of component `s` is `[0, 49]`.
fn schedule(s: u32, ) -> Weight {
Weight::from_ref_time(19_060_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(46_000 as u64).saturating_mul(s as u64))
Weight::from_ref_time(16_768_000 as u64)
// Standard Error: 3_650
.saturating_add(Weight::from_ref_time(667_428 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
@@ -178,19 +102,19 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> {
// Storage: Scheduler Lookup (r:0 w:1)
/// The range of component `s` is `[1, 50]`.
fn cancel(s: u32, ) -> Weight {
Weight::from_ref_time(17_694_000 as u64)
// Standard Error: 7_000
.saturating_add(Weight::from_ref_time(2_368_000 as u64).saturating_mul(s as u64))
Weight::from_ref_time(19_239_000 as u64)
// Standard Error: 1_456
.saturating_add(Weight::from_ref_time(578_125 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Scheduler Lookup (r:1 w:1)
// Storage: Scheduler Agenda (r:1 w:1)
/// The range of component `s` is `[0, 50]`.
/// The range of component `s` is `[0, 49]`.
fn schedule_named(s: u32, ) -> Weight {
Weight::from_ref_time(22_258_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(60_000 as u64).saturating_mul(s as u64))
Weight::from_ref_time(19_065_000 as u64)
// Standard Error: 4_027
.saturating_add(Weight::from_ref_time(719_766 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
@@ -198,9 +122,9 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> {
// Storage: Scheduler Agenda (r:1 w:1)
/// The range of component `s` is `[1, 50]`.
fn cancel_named(s: u32, ) -> Weight {
Weight::from_ref_time(18_882_000 as u64)
// Standard Error: 7_000
.saturating_add(Weight::from_ref_time(2_379_000 as u64).saturating_mul(s as u64))
Weight::from_ref_time(20_039_000 as u64)
// Standard Error: 2_179
.saturating_add(Weight::from_ref_time(627_335 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}