mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 07:01:03 +00:00
* Make build * Formatting * Add migrations * Fixes * Fixes * Bump * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_preimage --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/ * Fixes * Fixes * Fixes * Missing files * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_scheduler --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/ * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_preimage --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/ * Fixes * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_scheduler --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/ * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_scheduler --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/ * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_preimage --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/ * Fixes * cargo run --quiet --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_preimage --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/ * Fixes Co-authored-by: Parity Bot <admin@parity.io>
This commit is contained in:
Generated
+182
-163
File diff suppressed because it is too large
Load Diff
@@ -58,6 +58,7 @@ pallet-mmr-primitives = { git = "https://github.com/paritytech/substrate", branc
|
||||
pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-nicks = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
@@ -143,6 +144,7 @@ std = [
|
||||
"pallet-multisig/std",
|
||||
"pallet-nicks/std",
|
||||
"pallet-offences/std",
|
||||
"pallet-preimage/std",
|
||||
"pallet-proxy/std",
|
||||
"pallet-recovery/std",
|
||||
"pallet-scheduler/std",
|
||||
@@ -199,6 +201,7 @@ runtime-benchmarks = [
|
||||
"pallet-indices/runtime-benchmarks",
|
||||
"pallet-membership/runtime-benchmarks",
|
||||
"pallet-multisig/runtime-benchmarks",
|
||||
"pallet-preimage/runtime-benchmarks",
|
||||
"pallet-proxy/runtime-benchmarks",
|
||||
"pallet-scheduler/runtime-benchmarks",
|
||||
"pallet-society/runtime-benchmarks",
|
||||
@@ -239,6 +242,7 @@ try-runtime = [
|
||||
"pallet-multisig/try-runtime",
|
||||
"pallet-nicks/try-runtime",
|
||||
"pallet-offences/try-runtime",
|
||||
"pallet-preimage/try-runtime",
|
||||
"pallet-proxy/try-runtime",
|
||||
"pallet-recovery/try-runtime",
|
||||
"pallet-scheduler/try-runtime",
|
||||
|
||||
@@ -189,6 +189,7 @@ parameter_types! {
|
||||
pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) *
|
||||
BlockWeights::get().max_block;
|
||||
pub const MaxScheduledPerBlock: u32 = 50;
|
||||
pub const NoPreimagePostponement: Option<u32> = Some(10);
|
||||
}
|
||||
|
||||
type ScheduleOrigin = EnsureOneOf<
|
||||
@@ -229,6 +230,24 @@ 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;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const PreimageMaxSize: u32 = 4096 * 1024;
|
||||
pub const PreimageBaseDeposit: Balance = deposit(2, 64);
|
||||
pub const PreimageByteDeposit: Balance = deposit(0, 1);
|
||||
}
|
||||
|
||||
impl pallet_preimage::Config for Runtime {
|
||||
type WeightInfo = weights::pallet_preimage::WeightInfo<Runtime>;
|
||||
type Event = Event;
|
||||
type Currency = Balances;
|
||||
type ManagerOrigin = EnsureRoot<AccountId>;
|
||||
type MaxSize = PreimageMaxSize;
|
||||
type BaseDeposit = PreimageBaseDeposit;
|
||||
type ByteDeposit = PreimageByteDeposit;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -562,8 +581,6 @@ parameter_types! {
|
||||
pub const MinimumDeposit: Balance = 100 * CENTS;
|
||||
pub const EnactmentPeriod: BlockNumber = 8 * DAYS;
|
||||
pub const CooloffPeriod: BlockNumber = 7 * DAYS;
|
||||
// One cent: $10,000 / MB
|
||||
pub const PreimageByteDeposit: Balance = 10 * MILLICENTS;
|
||||
pub const InstantAllowed: bool = true;
|
||||
pub const MaxVotes: u32 = 100;
|
||||
pub const MaxProposals: u32 = 100;
|
||||
@@ -1502,6 +1519,7 @@ construct_runtime! {
|
||||
TechnicalMembership: pallet_membership::<Instance1>::{Pallet, Call, Storage, Event<T>, Config<T>} = 17,
|
||||
Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event<T>} = 18,
|
||||
|
||||
|
||||
// Claims. Usable initially.
|
||||
Claims: claims::{Pallet, Call, Storage, Event<T>, Config<T>, ValidateUnsigned} = 19,
|
||||
|
||||
@@ -1529,6 +1547,9 @@ construct_runtime! {
|
||||
// Multisig module. Late addition.
|
||||
Multisig: pallet_multisig::{Pallet, Call, Storage, Event<T>} = 31,
|
||||
|
||||
// Preimage registrar.
|
||||
Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 32,
|
||||
|
||||
// Bounties module.
|
||||
Bounties: pallet_bounties::{Pallet, Call, Storage, Event<T>} = 35,
|
||||
|
||||
@@ -1599,11 +1620,30 @@ pub type Executive = frame_executive::Executive<
|
||||
frame_system::ChainContext<Runtime>,
|
||||
Runtime,
|
||||
AllPalletsWithSystem,
|
||||
(SessionHistoricalPalletPrefixMigration,),
|
||||
(SessionHistoricalPalletPrefixMigration, SchedulerMigrationV3),
|
||||
>;
|
||||
/// The payload being signed in the transactions.
|
||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
||||
|
||||
// Migration for scheduler pallet to move from a plain Call to a CallOrHash.
|
||||
pub struct SchedulerMigrationV3;
|
||||
|
||||
impl OnRuntimeUpgrade for SchedulerMigrationV3 {
|
||||
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
||||
Scheduler::migrate_v2_to_v3()
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn pre_upgrade() -> Result<(), &'static str> {
|
||||
Scheduler::pre_migrate_to_v3()
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade() -> Result<(), &'static str> {
|
||||
Scheduler::post_migrate_to_v3()
|
||||
}
|
||||
}
|
||||
|
||||
/// Migrate session-historical from `Session` to the new pallet prefix `Historical`
|
||||
pub struct SessionHistoricalPalletPrefixMigration;
|
||||
|
||||
@@ -1979,6 +2019,7 @@ sp_api::impl_runtime_apis! {
|
||||
list_benchmark!(list, extra, pallet_membership, TechnicalMembership);
|
||||
list_benchmark!(list, extra, pallet_multisig, Multisig);
|
||||
list_benchmark!(list, extra, pallet_offences, OffencesBench::<Runtime>);
|
||||
list_benchmark!(list, extra, pallet_preimage, Preimage);
|
||||
list_benchmark!(list, extra, pallet_proxy, Proxy);
|
||||
list_benchmark!(list, extra, pallet_scheduler, Scheduler);
|
||||
list_benchmark!(list, extra, pallet_session, SessionBench::<Runtime>);
|
||||
@@ -2058,6 +2099,7 @@ sp_api::impl_runtime_apis! {
|
||||
add_benchmark!(params, batches, pallet_membership, TechnicalMembership);
|
||||
add_benchmark!(params, batches, pallet_multisig, Multisig);
|
||||
add_benchmark!(params, batches, pallet_offences, OffencesBench::<Runtime>);
|
||||
add_benchmark!(params, batches, pallet_preimage, Preimage);
|
||||
add_benchmark!(params, batches, pallet_proxy, Proxy);
|
||||
add_benchmark!(params, batches, pallet_scheduler, Scheduler);
|
||||
add_benchmark!(params, batches, pallet_session, SessionBench::<Runtime>);
|
||||
|
||||
@@ -30,6 +30,7 @@ pub mod pallet_im_online;
|
||||
pub mod pallet_indices;
|
||||
pub mod pallet_membership;
|
||||
pub mod pallet_multisig;
|
||||
pub mod pallet_preimage;
|
||||
pub mod pallet_proxy;
|
||||
pub mod pallet_scheduler;
|
||||
pub mod pallet_session;
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
// Copyright 2017-2021 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
//! Autogenerated weights for `pallet_preimage`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-12-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
// target/release/polkadot
|
||||
// benchmark
|
||||
// --chain=kusama-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --pallet=pallet_preimage
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/polkadot/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_preimage`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_preimage::weights::WeightInfo for WeightInfo<T> {
|
||||
// Storage: Preimage PreimageFor (r:1 w:1)
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn note_preimage(s: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((3_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Preimage PreimageFor (r:1 w:1)
|
||||
// Storage: Preimage StatusFor (r:1 w:0)
|
||||
fn note_requested_preimage(s: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((3_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Preimage PreimageFor (r:1 w:1)
|
||||
// Storage: Preimage StatusFor (r:1 w:0)
|
||||
fn note_no_deposit_preimage(s: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((3_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
// Storage: Preimage PreimageFor (r:0 w:1)
|
||||
fn unnote_preimage() -> Weight {
|
||||
(57_735_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
// Storage: Preimage PreimageFor (r:0 w:1)
|
||||
fn unnote_no_deposit_preimage() -> Weight {
|
||||
(36_686_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn request_preimage() -> Weight {
|
||||
(54_443_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn request_no_deposit_preimage() -> Weight {
|
||||
(34_868_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn request_unnoted_preimage() -> Weight {
|
||||
(20_741_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn request_requested_preimage() -> Weight {
|
||||
(7_543_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
// Storage: Preimage PreimageFor (r:0 w:1)
|
||||
fn unrequest_preimage() -> Weight {
|
||||
(36_829_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
// Storage: Preimage PreimageFor (r:0 w:1)
|
||||
fn unrequest_unnoted_preimage() -> Weight {
|
||||
(21_581_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn unrequest_multi_referenced_preimage() -> Weight {
|
||||
(7_188_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2020 Parity Technologies (UK) Ltd.
|
||||
// Copyright 2017-2021 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot is free software: you can redistribute it and/or modify
|
||||
@@ -15,8 +15,8 @@
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
//! Autogenerated weights for `pallet_scheduler`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-12-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -33,6 +33,7 @@
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/kusama/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
@@ -42,31 +43,149 @@ 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> {
|
||||
fn schedule(s: u32) -> Weight {
|
||||
(28_202_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((42_000 as Weight).saturating_mul(s as Weight))
|
||||
// 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)
|
||||
fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight {
|
||||
(2_821_000 as Weight)
|
||||
// Standard Error: 39_000
|
||||
.saturating_add((39_671_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// 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)
|
||||
fn on_initialize_named_resolved(s: u32, ) -> Weight {
|
||||
(674_000 as Weight)
|
||||
// Standard Error: 36_000
|
||||
.saturating_add((31_391_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:2 w:2)
|
||||
// Storage: Preimage PreimageFor (r:1 w:1)
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn on_initialize_periodic_resolved(s: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 39_000
|
||||
.saturating_add((34_637_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
// Storage: Preimage PreimageFor (r:1 w:1)
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn on_initialize_resolved(s: u32, ) -> Weight {
|
||||
(3_619_000 as Weight)
|
||||
// Standard Error: 34_000
|
||||
.saturating_add((28_969_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:2 w:2)
|
||||
// Storage: Preimage PreimageFor (r:1 w:0)
|
||||
// Storage: Scheduler Lookup (r:0 w:1)
|
||||
fn on_initialize_named_aborted(s: u32, ) -> Weight {
|
||||
(8_846_000 as Weight)
|
||||
// Standard Error: 17_000
|
||||
.saturating_add((14_687_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:2 w:2)
|
||||
// Storage: Preimage PreimageFor (r:1 w:0)
|
||||
fn on_initialize_aborted(s: u32, ) -> Weight {
|
||||
(8_849_000 as Weight)
|
||||
// Standard Error: 19_000
|
||||
.saturating_add((9_900_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:2 w:2)
|
||||
// Storage: Scheduler Lookup (r:0 w:1)
|
||||
fn on_initialize_periodic_named(s: u32, ) -> Weight {
|
||||
(9_087_000 as Weight)
|
||||
// Standard Error: 31_000
|
||||
.saturating_add((22_780_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:2 w:2)
|
||||
fn on_initialize_periodic(s: u32, ) -> Weight {
|
||||
(10_653_000 as Weight)
|
||||
// Standard Error: 25_000
|
||||
.saturating_add((17_581_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
// Storage: Scheduler Lookup (r:0 w:1)
|
||||
fn on_initialize_named(s: u32, ) -> Weight {
|
||||
(13_412_000 as Weight)
|
||||
// Standard Error: 19_000
|
||||
.saturating_add((14_529_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn on_initialize(s: u32, ) -> Weight {
|
||||
(12_636_000 as Weight)
|
||||
// Standard Error: 18_000
|
||||
.saturating_add((12_548_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn cancel(s: u32) -> Weight {
|
||||
(27_640_000 as Weight)
|
||||
// Standard Error: 14_000
|
||||
.saturating_add((5_699_000 as Weight).saturating_mul(s as Weight))
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn schedule(s: u32, ) -> Weight {
|
||||
(23_530_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((38_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
// Storage: Scheduler Lookup (r:0 w:1)
|
||||
fn cancel(s: u32, ) -> Weight {
|
||||
(22_003_000 as Weight)
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((2_495_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn schedule_named(s: u32) -> Weight {
|
||||
(34_298_000 as Weight)
|
||||
// Storage: Scheduler Lookup (r:1 w:1)
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn schedule_named(s: u32, ) -> Weight {
|
||||
(28_604_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((56_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn cancel_named(s: u32) -> Weight {
|
||||
(29_004_000 as Weight)
|
||||
// Standard Error: 15_000
|
||||
.saturating_add((5_720_000 as Weight).saturating_mul(s as Weight))
|
||||
// Storage: Scheduler Lookup (r:1 w:1)
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn cancel_named(s: u32, ) -> Weight {
|
||||
(24_130_000 as Weight)
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((2_513_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ pallet-mmr-primitives = { git = "https://github.com/paritytech/substrate", branc
|
||||
pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-nicks = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
@@ -138,6 +139,7 @@ std = [
|
||||
"pallet-multisig/std",
|
||||
"pallet-nicks/std",
|
||||
"pallet-offences/std",
|
||||
"pallet-preimage/std",
|
||||
"pallet-proxy/std",
|
||||
"pallet-scheduler/std",
|
||||
"pallet-session/std",
|
||||
@@ -189,6 +191,7 @@ runtime-benchmarks = [
|
||||
"pallet-indices/runtime-benchmarks",
|
||||
"pallet-membership/runtime-benchmarks",
|
||||
"pallet-multisig/runtime-benchmarks",
|
||||
"pallet-preimage/runtime-benchmarks",
|
||||
"pallet-proxy/runtime-benchmarks",
|
||||
"pallet-scheduler/runtime-benchmarks",
|
||||
"pallet-staking/runtime-benchmarks",
|
||||
@@ -228,6 +231,7 @@ try-runtime = [
|
||||
"pallet-multisig/try-runtime",
|
||||
"pallet-nicks/try-runtime",
|
||||
"pallet-offences/try-runtime",
|
||||
"pallet-preimage/try-runtime",
|
||||
"pallet-proxy/try-runtime",
|
||||
"pallet-scheduler/try-runtime",
|
||||
"pallet-session/try-runtime",
|
||||
|
||||
@@ -152,6 +152,7 @@ impl Contains<Call> for BaseFilter {
|
||||
Call::PhragmenElection(_) |
|
||||
Call::System(_) |
|
||||
Call::Scheduler(_) |
|
||||
Call::Preimage(_) |
|
||||
Call::Indices(_) |
|
||||
Call::Babe(_) |
|
||||
Call::Timestamp(_) |
|
||||
@@ -232,6 +233,7 @@ parameter_types! {
|
||||
pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) *
|
||||
BlockWeights::get().max_block;
|
||||
pub const MaxScheduledPerBlock: u32 = 50;
|
||||
pub const NoPreimagePostponement: Option<u32> = Some(10);
|
||||
}
|
||||
|
||||
type ScheduleOrigin = EnsureOneOf<
|
||||
@@ -272,6 +274,24 @@ 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;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const PreimageMaxSize: u32 = 4096 * 1024;
|
||||
pub const PreimageBaseDeposit: Balance = deposit(2, 64);
|
||||
pub const PreimageByteDeposit: Balance = deposit(0, 1);
|
||||
}
|
||||
|
||||
impl pallet_preimage::Config for Runtime {
|
||||
type WeightInfo = pallet_preimage::weights::SubstrateWeight<Runtime>;
|
||||
type Event = Event;
|
||||
type Currency = Balances;
|
||||
type ManagerOrigin = EnsureRoot<AccountId>;
|
||||
type MaxSize = PreimageMaxSize;
|
||||
type BaseDeposit = PreimageBaseDeposit;
|
||||
type ByteDeposit = PreimageByteDeposit;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -582,8 +602,6 @@ parameter_types! {
|
||||
pub const MinimumDeposit: Balance = 100 * DOLLARS;
|
||||
pub const EnactmentPeriod: BlockNumber = 28 * DAYS;
|
||||
pub const CooloffPeriod: BlockNumber = 7 * DAYS;
|
||||
// One cent: $10,000 / MB
|
||||
pub const PreimageByteDeposit: Balance = 1 * CENTS;
|
||||
pub const InstantAllowed: bool = true;
|
||||
pub const MaxVotes: u32 = 100;
|
||||
pub const MaxProposals: u32 = 100;
|
||||
@@ -1438,6 +1456,7 @@ construct_runtime! {
|
||||
// Basic stuff; balances is uncallable initially.
|
||||
System: frame_system::{Pallet, Call, Storage, Config, Event<T>} = 0,
|
||||
Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event<T>} = 1,
|
||||
Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 10,
|
||||
|
||||
// Babe must be before session.
|
||||
Babe: pallet_babe::{Pallet, Call, Storage, Config, ValidateUnsigned} = 2,
|
||||
@@ -1467,6 +1486,7 @@ construct_runtime! {
|
||||
TechnicalMembership: pallet_membership::<Instance1>::{Pallet, Call, Storage, Event<T>, Config<T>} = 18,
|
||||
Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event<T>} = 19,
|
||||
|
||||
|
||||
// Claims. Usable initially.
|
||||
Claims: claims::{Pallet, Call, Storage, Event<T>, Config<T>, ValidateUnsigned} = 24,
|
||||
// Vesting. Usable initially, but removed once all vesting is finished.
|
||||
@@ -1550,11 +1570,30 @@ pub type Executive = frame_executive::Executive<
|
||||
frame_system::ChainContext<Runtime>,
|
||||
Runtime,
|
||||
AllPalletsWithSystem,
|
||||
(StakingBagsListMigrationV8, SessionHistoricalPalletPrefixMigration),
|
||||
(StakingBagsListMigrationV8, SessionHistoricalPalletPrefixMigration, SchedulerMigrationV3),
|
||||
>;
|
||||
/// The payload being signed in transactions.
|
||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
||||
|
||||
// Migration for scheduler pallet to move from a plain Call to a CallOrHash.
|
||||
pub struct SchedulerMigrationV3;
|
||||
|
||||
impl OnRuntimeUpgrade for SchedulerMigrationV3 {
|
||||
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
||||
Scheduler::migrate_v2_to_v3()
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn pre_upgrade() -> Result<(), &'static str> {
|
||||
Scheduler::pre_migrate_to_v3()
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade() -> Result<(), &'static str> {
|
||||
Scheduler::post_migrate_to_v3()
|
||||
}
|
||||
}
|
||||
|
||||
// Migration to generate pallet staking's `SortedListProvider` from pre-existing nominators.
|
||||
pub struct StakingBagsListMigrationV8;
|
||||
|
||||
@@ -1947,6 +1986,7 @@ sp_api::impl_runtime_apis! {
|
||||
list_benchmark!(list, extra, pallet_membership, TechnicalMembership);
|
||||
list_benchmark!(list, extra, pallet_multisig, Multisig);
|
||||
list_benchmark!(list, extra, pallet_offences, OffencesBench::<Runtime>);
|
||||
list_benchmark!(list, extra, pallet_preimage, Preimage);
|
||||
list_benchmark!(list, extra, pallet_proxy, Proxy);
|
||||
list_benchmark!(list, extra, pallet_scheduler, Scheduler);
|
||||
list_benchmark!(list, extra, pallet_session, SessionBench::<Runtime>);
|
||||
@@ -2023,6 +2063,7 @@ sp_api::impl_runtime_apis! {
|
||||
add_benchmark!(params, batches, pallet_membership, TechnicalMembership);
|
||||
add_benchmark!(params, batches, pallet_multisig, Multisig);
|
||||
add_benchmark!(params, batches, pallet_offences, OffencesBench::<Runtime>);
|
||||
add_benchmark!(params, batches, pallet_preimage, Preimage);
|
||||
add_benchmark!(params, batches, pallet_proxy, Proxy);
|
||||
add_benchmark!(params, batches, pallet_scheduler, Scheduler);
|
||||
add_benchmark!(params, batches, pallet_session, SessionBench::<Runtime>);
|
||||
|
||||
@@ -29,6 +29,7 @@ pub mod pallet_im_online;
|
||||
pub mod pallet_indices;
|
||||
pub mod pallet_membership;
|
||||
pub mod pallet_multisig;
|
||||
pub mod pallet_preimage;
|
||||
pub mod pallet_proxy;
|
||||
pub mod pallet_scheduler;
|
||||
pub mod pallet_session;
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
// Copyright 2017-2021 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
//! Autogenerated weights for `pallet_preimage`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-12-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
// target/release/polkadot
|
||||
// benchmark
|
||||
// --chain=polkadot-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --pallet=pallet_preimage
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/polkadot/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
/// Weight functions for `pallet_preimage`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_preimage::weights::WeightInfo for WeightInfo<T> {
|
||||
// Storage: Preimage PreimageFor (r:1 w:1)
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn note_preimage(s: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((3_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Preimage PreimageFor (r:1 w:1)
|
||||
// Storage: Preimage StatusFor (r:1 w:0)
|
||||
fn note_requested_preimage(s: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((3_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Preimage PreimageFor (r:1 w:1)
|
||||
// Storage: Preimage StatusFor (r:1 w:0)
|
||||
fn note_no_deposit_preimage(s: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((3_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
// Storage: Preimage PreimageFor (r:0 w:1)
|
||||
fn unnote_preimage() -> Weight {
|
||||
(56_144_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
// Storage: Preimage PreimageFor (r:0 w:1)
|
||||
fn unnote_no_deposit_preimage() -> Weight {
|
||||
(37_440_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn request_preimage() -> Weight {
|
||||
(53_361_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn request_no_deposit_preimage() -> Weight {
|
||||
(34_320_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn request_unnoted_preimage() -> Weight {
|
||||
(20_598_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn request_requested_preimage() -> Weight {
|
||||
(7_612_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
// Storage: Preimage PreimageFor (r:0 w:1)
|
||||
fn unrequest_preimage() -> Weight {
|
||||
(37_617_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
// Storage: Preimage PreimageFor (r:0 w:1)
|
||||
fn unrequest_unnoted_preimage() -> Weight {
|
||||
(22_042_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn unrequest_multi_referenced_preimage() -> Weight {
|
||||
(7_536_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2020 Parity Technologies (UK) Ltd.
|
||||
// Copyright 2017-2021 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot is free software: you can redistribute it and/or modify
|
||||
@@ -15,8 +15,8 @@
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
//! Autogenerated weights for `pallet_scheduler`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-07-01, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-12-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -33,6 +33,7 @@
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/polkadot/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
@@ -42,31 +43,149 @@ 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> {
|
||||
fn schedule(s: u32) -> Weight {
|
||||
(23_340_000 as Weight)
|
||||
// Standard Error: 0
|
||||
// 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)
|
||||
fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 48_000
|
||||
.saturating_add((40_013_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// 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)
|
||||
fn on_initialize_named_resolved(s: u32, ) -> Weight {
|
||||
(1_566_000 as Weight)
|
||||
// Standard Error: 44_000
|
||||
.saturating_add((31_257_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:2 w:2)
|
||||
// Storage: Preimage PreimageFor (r:1 w:1)
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn on_initialize_periodic_resolved(s: u32, ) -> Weight {
|
||||
(1_287_000 as Weight)
|
||||
// Standard Error: 37_000
|
||||
.saturating_add((34_241_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
// Storage: Preimage PreimageFor (r:1 w:1)
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn on_initialize_resolved(s: u32, ) -> Weight {
|
||||
(4_114_000 as Weight)
|
||||
// Standard Error: 36_000
|
||||
.saturating_add((28_866_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:2 w:2)
|
||||
// Storage: Preimage PreimageFor (r:1 w:0)
|
||||
// Storage: Scheduler Lookup (r:0 w:1)
|
||||
fn on_initialize_named_aborted(s: u32, ) -> Weight {
|
||||
(8_330_000 as Weight)
|
||||
// Standard Error: 23_000
|
||||
.saturating_add((14_865_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:2 w:2)
|
||||
// Storage: Preimage PreimageFor (r:1 w:0)
|
||||
fn on_initialize_aborted(s: u32, ) -> Weight {
|
||||
(9_651_000 as Weight)
|
||||
// Standard Error: 13_000
|
||||
.saturating_add((9_988_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:2 w:2)
|
||||
// Storage: Scheduler Lookup (r:0 w:1)
|
||||
fn on_initialize_periodic_named(s: u32, ) -> Weight {
|
||||
(10_615_000 as Weight)
|
||||
// Standard Error: 26_000
|
||||
.saturating_add((22_813_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:2 w:2)
|
||||
fn on_initialize_periodic(s: u32, ) -> Weight {
|
||||
(12_942_000 as Weight)
|
||||
// Standard Error: 22_000
|
||||
.saturating_add((17_319_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
// Storage: Scheduler Lookup (r:0 w:1)
|
||||
fn on_initialize_named(s: u32, ) -> Weight {
|
||||
(15_477_000 as Weight)
|
||||
// Standard Error: 19_000
|
||||
.saturating_add((14_459_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn on_initialize(s: u32, ) -> Weight {
|
||||
(14_600_000 as Weight)
|
||||
// Standard Error: 15_000
|
||||
.saturating_add((12_446_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn schedule(s: u32, ) -> Weight {
|
||||
(23_900_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((39_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn cancel(s: u32) -> Weight {
|
||||
(22_347_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((1_864_000 as Weight).saturating_mul(s as Weight))
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
// Storage: Scheduler Lookup (r:0 w:1)
|
||||
fn cancel(s: u32, ) -> Weight {
|
||||
(22_423_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((2_482_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn schedule_named(s: u32) -> Weight {
|
||||
(29_626_000 as Weight)
|
||||
// Storage: Scheduler Lookup (r:1 w:1)
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn schedule_named(s: u32, ) -> Weight {
|
||||
(29_054_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((58_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((52_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn cancel_named(s: u32) -> Weight {
|
||||
(25_024_000 as Weight)
|
||||
// Standard Error: 4_000
|
||||
.saturating_add((1_882_000 as Weight).saturating_mul(s as Weight))
|
||||
// Storage: Scheduler Lookup (r:1 w:1)
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn cancel_named(s: u32, ) -> Weight {
|
||||
(24_594_000 as Weight)
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((2_496_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ pallet-mmr-primitives = { git = "https://github.com/paritytech/substrate", branc
|
||||
pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-nicks = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
@@ -139,6 +140,7 @@ std = [
|
||||
"pallet-multisig/std",
|
||||
"pallet-nicks/std",
|
||||
"pallet-offences/std",
|
||||
"pallet-preimage/std",
|
||||
"pallet-proxy/std",
|
||||
"pallet-recovery/std",
|
||||
"pallet-scheduler/std",
|
||||
@@ -191,6 +193,7 @@ runtime-benchmarks = [
|
||||
"pallet-im-online/runtime-benchmarks",
|
||||
"pallet-indices/runtime-benchmarks",
|
||||
"pallet-multisig/runtime-benchmarks",
|
||||
"pallet-preimage/runtime-benchmarks",
|
||||
"pallet-proxy/runtime-benchmarks",
|
||||
"pallet-scheduler/runtime-benchmarks",
|
||||
"pallet-society/runtime-benchmarks",
|
||||
@@ -230,6 +233,7 @@ try-runtime = [
|
||||
"pallet-multisig/try-runtime",
|
||||
"pallet-nicks/try-runtime",
|
||||
"pallet-offences/try-runtime",
|
||||
"pallet-preimage/try-runtime",
|
||||
"pallet-proxy/try-runtime",
|
||||
"pallet-recovery/try-runtime",
|
||||
"pallet-scheduler/try-runtime",
|
||||
|
||||
@@ -184,6 +184,7 @@ parameter_types! {
|
||||
pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) *
|
||||
BlockWeights::get().max_block;
|
||||
pub const MaxScheduledPerBlock: u32 = 50;
|
||||
pub const NoPreimagePostponement: Option<u32> = Some(10);
|
||||
}
|
||||
|
||||
impl pallet_scheduler::Config for Runtime {
|
||||
@@ -196,6 +197,24 @@ impl pallet_scheduler::Config for Runtime {
|
||||
type MaxScheduledPerBlock = MaxScheduledPerBlock;
|
||||
type WeightInfo = weights::pallet_scheduler::WeightInfo<Runtime>;
|
||||
type OriginPrivilegeCmp = frame_support::traits::EqualPrivilegeOnly;
|
||||
type PreimageProvider = Preimage;
|
||||
type NoPreimagePostponement = NoPreimagePostponement;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const PreimageMaxSize: u32 = 4096 * 1024;
|
||||
pub const PreimageBaseDeposit: Balance = deposit(2, 64);
|
||||
pub const PreimageByteDeposit: Balance = deposit(0, 1);
|
||||
}
|
||||
|
||||
impl pallet_preimage::Config for Runtime {
|
||||
type WeightInfo = weights::pallet_preimage::WeightInfo<Runtime>;
|
||||
type Event = Event;
|
||||
type Currency = Balances;
|
||||
type ManagerOrigin = EnsureRoot<AccountId>;
|
||||
type MaxSize = PreimageMaxSize;
|
||||
type BaseDeposit = PreimageBaseDeposit;
|
||||
type ByteDeposit = PreimageByteDeposit;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -471,8 +490,6 @@ parameter_types! {
|
||||
pub const MinimumDeposit: Balance = 100 * CENTS;
|
||||
pub const EnactmentPeriod: BlockNumber = 8 * DAYS;
|
||||
pub const CooloffPeriod: BlockNumber = 7 * DAYS;
|
||||
// One cent: $10,000 / MB
|
||||
pub const PreimageByteDeposit: Balance = 10 * MILLICENTS;
|
||||
pub const InstantAllowed: bool = true;
|
||||
pub const MaxAuthorities: u32 = 100_000;
|
||||
}
|
||||
@@ -1098,6 +1115,9 @@ construct_runtime! {
|
||||
// System scheduler.
|
||||
Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event<T>} = 20,
|
||||
|
||||
// Preimage registrar.
|
||||
Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 28,
|
||||
|
||||
// Sudo.
|
||||
Sudo: pallet_sudo::{Pallet, Call, Storage, Event<T>, Config<T>} = 21,
|
||||
|
||||
@@ -1169,11 +1189,30 @@ pub type Executive = frame_executive::Executive<
|
||||
frame_system::ChainContext<Runtime>,
|
||||
Runtime,
|
||||
AllPalletsWithSystem,
|
||||
(SessionHistoricalPalletPrefixMigration,),
|
||||
(SessionHistoricalPalletPrefixMigration, SchedulerMigrationV3),
|
||||
>;
|
||||
/// The payload being signed in transactions.
|
||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
||||
|
||||
// Migration for scheduler pallet to move from a plain Call to a CallOrHash.
|
||||
pub struct SchedulerMigrationV3;
|
||||
|
||||
impl OnRuntimeUpgrade for SchedulerMigrationV3 {
|
||||
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
||||
Scheduler::migrate_v2_to_v3()
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn pre_upgrade() -> Result<(), &'static str> {
|
||||
Scheduler::pre_migrate_to_v3()
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade() -> Result<(), &'static str> {
|
||||
Scheduler::post_migrate_to_v3()
|
||||
}
|
||||
}
|
||||
|
||||
/// Migrate session-historical from `Session` to the new pallet prefix `Historical`
|
||||
pub struct SessionHistoricalPalletPrefixMigration;
|
||||
|
||||
@@ -1544,6 +1583,7 @@ sp_api::impl_runtime_apis! {
|
||||
list_benchmark!(list, extra, pallet_indices, Indices);
|
||||
list_benchmark!(list, extra, pallet_multisig, Multisig);
|
||||
list_benchmark!(list, extra, pallet_offences, OffencesBench::<Runtime>);
|
||||
list_benchmark!(list, extra, pallet_preimage, Preimage);
|
||||
list_benchmark!(list, extra, pallet_proxy, Proxy);
|
||||
list_benchmark!(list, extra, pallet_scheduler, Scheduler);
|
||||
list_benchmark!(list, extra, pallet_session, SessionBench::<Runtime>);
|
||||
@@ -1689,6 +1729,7 @@ sp_api::impl_runtime_apis! {
|
||||
add_benchmark!(params, batches, pallet_indices, Indices);
|
||||
add_benchmark!(params, batches, pallet_multisig, Multisig);
|
||||
add_benchmark!(params, batches, pallet_offences, OffencesBench::<Runtime>);
|
||||
add_benchmark!(params, batches, pallet_preimage, Preimage);
|
||||
add_benchmark!(params, batches, pallet_proxy, Proxy);
|
||||
add_benchmark!(params, batches, pallet_scheduler, Scheduler);
|
||||
add_benchmark!(params, batches, pallet_session, SessionBench::<Runtime>);
|
||||
|
||||
@@ -23,6 +23,7 @@ pub mod pallet_identity;
|
||||
pub mod pallet_im_online;
|
||||
pub mod pallet_indices;
|
||||
pub mod pallet_multisig;
|
||||
pub mod pallet_preimage;
|
||||
pub mod pallet_proxy;
|
||||
pub mod pallet_scheduler;
|
||||
pub mod pallet_session;
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
// Copyright 2017-2021 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot 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.
|
||||
|
||||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
//! Autogenerated weights for `pallet_preimage`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-12-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
// target/release/polkadot
|
||||
// benchmark
|
||||
// --chain=westend-dev
|
||||
// --steps=50
|
||||
// --repeat=20
|
||||
// --pallet=pallet_preimage
|
||||
// --extrinsic=*
|
||||
// --execution=wasm
|
||||
// --wasm-execution=compiled
|
||||
// --heap-pages=4096
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/westend/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use frame_support::{traits::Get, weights::Weight};
|
||||
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)
|
||||
fn note_preimage(s: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((3_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Preimage PreimageFor (r:1 w:1)
|
||||
// Storage: Preimage StatusFor (r:1 w:0)
|
||||
fn note_requested_preimage(s: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((3_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Preimage PreimageFor (r:1 w:1)
|
||||
// Storage: Preimage StatusFor (r:1 w:0)
|
||||
fn note_no_deposit_preimage(s: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((3_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
// Storage: Preimage PreimageFor (r:0 w:1)
|
||||
fn unnote_preimage() -> Weight {
|
||||
(58_618_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
// Storage: Preimage PreimageFor (r:0 w:1)
|
||||
fn unnote_no_deposit_preimage() -> Weight {
|
||||
(38_343_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn request_preimage() -> Weight {
|
||||
(54_935_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn request_no_deposit_preimage() -> Weight {
|
||||
(35_262_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn request_unnoted_preimage() -> Weight {
|
||||
(20_709_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn request_requested_preimage() -> Weight {
|
||||
(8_233_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
// Storage: Preimage PreimageFor (r:0 w:1)
|
||||
fn unrequest_preimage() -> Weight {
|
||||
(37_739_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
// Storage: Preimage PreimageFor (r:0 w:1)
|
||||
fn unrequest_unnoted_preimage() -> Weight {
|
||||
(22_624_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn unrequest_multi_referenced_preimage() -> Weight {
|
||||
(7_715_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2020 Parity Technologies (UK) Ltd.
|
||||
// Copyright 2017-2021 Parity Technologies (UK) Ltd.
|
||||
// This file is part of Polkadot.
|
||||
|
||||
// Polkadot is free software: you can redistribute it and/or modify
|
||||
@@ -15,8 +15,8 @@
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
//! Autogenerated weights for `pallet_scheduler`
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
||||
//! DATE: 2021-07-02, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||
//! DATE: 2021-12-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 128
|
||||
|
||||
// Executed Command:
|
||||
@@ -33,6 +33,7 @@
|
||||
// --header=./file_header.txt
|
||||
// --output=./runtime/westend/src/weights/
|
||||
|
||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#![allow(unused_parens)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
@@ -42,31 +43,149 @@ 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> {
|
||||
fn schedule(s: u32) -> Weight {
|
||||
(28_493_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((39_000 as Weight).saturating_mul(s as Weight))
|
||||
// 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)
|
||||
fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 37_000
|
||||
.saturating_add((39_315_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// 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)
|
||||
fn on_initialize_named_resolved(s: u32, ) -> Weight {
|
||||
(4_231_000 as Weight)
|
||||
// Standard Error: 32_000
|
||||
.saturating_add((30_830_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:2 w:2)
|
||||
// Storage: Preimage PreimageFor (r:1 w:1)
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn on_initialize_periodic_resolved(s: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 37_000
|
||||
.saturating_add((33_897_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
// Storage: Preimage PreimageFor (r:1 w:1)
|
||||
// Storage: Preimage StatusFor (r:1 w:1)
|
||||
fn on_initialize_resolved(s: u32, ) -> Weight {
|
||||
(3_095_000 as Weight)
|
||||
// Standard Error: 34_000
|
||||
.saturating_add((28_718_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:2 w:2)
|
||||
// Storage: Preimage PreimageFor (r:1 w:0)
|
||||
// Storage: Scheduler Lookup (r:0 w:1)
|
||||
fn on_initialize_named_aborted(s: u32, ) -> Weight {
|
||||
(8_499_000 as Weight)
|
||||
// Standard Error: 22_000
|
||||
.saturating_add((14_712_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:2 w:2)
|
||||
// Storage: Preimage PreimageFor (r:1 w:0)
|
||||
fn on_initialize_aborted(s: u32, ) -> Weight {
|
||||
(9_314_000 as Weight)
|
||||
// Standard Error: 17_000
|
||||
.saturating_add((9_745_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:2 w:2)
|
||||
// Storage: Scheduler Lookup (r:0 w:1)
|
||||
fn on_initialize_periodic_named(s: u32, ) -> Weight {
|
||||
(10_351_000 as Weight)
|
||||
// Standard Error: 25_000
|
||||
.saturating_add((22_248_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:2 w:2)
|
||||
fn on_initialize_periodic(s: u32, ) -> Weight {
|
||||
(12_597_000 as Weight)
|
||||
// Standard Error: 21_000
|
||||
.saturating_add((16_961_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
// Storage: Scheduler Lookup (r:0 w:1)
|
||||
fn on_initialize_named(s: u32, ) -> Weight {
|
||||
(14_024_000 as Weight)
|
||||
// Standard Error: 18_000
|
||||
.saturating_add((14_306_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn on_initialize(s: u32, ) -> Weight {
|
||||
(13_450_000 as Weight)
|
||||
// Standard Error: 19_000
|
||||
.saturating_add((12_353_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn cancel(s: u32) -> Weight {
|
||||
(27_793_000 as Weight)
|
||||
// Standard Error: 14_000
|
||||
.saturating_add((6_333_000 as Weight).saturating_mul(s as Weight))
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn schedule(s: u32, ) -> Weight {
|
||||
(22_805_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((38_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
// Storage: Scheduler Lookup (r:0 w:1)
|
||||
fn cancel(s: u32, ) -> Weight {
|
||||
(20_933_000 as Weight)
|
||||
// Standard Error: 5_000
|
||||
.saturating_add((2_267_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn schedule_named(s: u32) -> Weight {
|
||||
(34_482_000 as Weight)
|
||||
// Storage: Scheduler Lookup (r:1 w:1)
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn schedule_named(s: u32, ) -> Weight {
|
||||
(28_047_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((56_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add((49_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn cancel_named(s: u32) -> Weight {
|
||||
(29_087_000 as Weight)
|
||||
// Standard Error: 14_000
|
||||
.saturating_add((6_341_000 as Weight).saturating_mul(s as Weight))
|
||||
// Storage: Scheduler Lookup (r:1 w:1)
|
||||
// Storage: Scheduler Agenda (r:1 w:1)
|
||||
fn cancel_named(s: u32, ) -> Weight {
|
||||
(23_474_000 as Weight)
|
||||
// Standard Error: 6_000
|
||||
.saturating_add((2_242_000 as Weight).saturating_mul(s as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user