mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +00:00
add fast-unstsake pallet to all runtimes (#6050)
* add fast-unstsake pallet to all runtimes * ".git/.scripts/fmt.sh" 1 * ".git/.scripts/bench-bot.sh" runtime polkadot-dev pallet_fast_unstake * ".git/.scripts/bench-bot.sh" runtime westend-dev pallet_fast_unstake * fix up all the weight stuff * update substrate * update mistake in kusama * add stub file * Update runtime/polkadot/src/lib.rs Co-authored-by: Nitwit <47109040+BustaNit@users.noreply.github.com> * Update runtime/westend/src/lib.rs Co-authored-by: Nitwit <47109040+BustaNit@users.noreply.github.com> * cargo update -p sp-io * add signed extension as well * Revert "add signed extension as well" This reverts commit deb936fe5a9a13a62d02757045b1dfa40dccb190. * cargo update -p sp-io * ".git/.scripts/bench-bot.sh" runtime kusama-dev pallet_fast_unstake * ".git/.scripts/bench-bot.sh" runtime polkadot-dev pallet_fast_unstake * update sub * integrate latest substrate changes * ".git/.scripts/fmt.sh" 1 * ".git/.scripts/bench-bot.sh" runtime westend-dev pallet_fast_unstake Co-authored-by: command-bot <> Co-authored-by: Nitwit <47109040+BustaNit@users.noreply.github.com>
This commit is contained in:
Generated
+197
-173
File diff suppressed because it is too large
Load Diff
@@ -50,6 +50,7 @@ pallet-collective = { git = "https://github.com/paritytech/substrate", branch =
|
|||||||
pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
|
pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-gilt = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-gilt = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -143,6 +144,7 @@ std = [
|
|||||||
"pallet-collective/std",
|
"pallet-collective/std",
|
||||||
"pallet-elections-phragmen/std",
|
"pallet-elections-phragmen/std",
|
||||||
"pallet-election-provider-multi-phase/std",
|
"pallet-election-provider-multi-phase/std",
|
||||||
|
"pallet-fast-unstake/std",
|
||||||
"pallet-democracy/std",
|
"pallet-democracy/std",
|
||||||
"pallet-gilt/std",
|
"pallet-gilt/std",
|
||||||
"pallet-grandpa/std",
|
"pallet-grandpa/std",
|
||||||
@@ -206,6 +208,7 @@ runtime-benchmarks = [
|
|||||||
"pallet-elections-phragmen/runtime-benchmarks",
|
"pallet-elections-phragmen/runtime-benchmarks",
|
||||||
"pallet-election-provider-multi-phase/runtime-benchmarks",
|
"pallet-election-provider-multi-phase/runtime-benchmarks",
|
||||||
"pallet-election-provider-support-benchmarking/runtime-benchmarks",
|
"pallet-election-provider-support-benchmarking/runtime-benchmarks",
|
||||||
|
"pallet-fast-unstake/runtime-benchmarks",
|
||||||
"pallet-gilt/runtime-benchmarks",
|
"pallet-gilt/runtime-benchmarks",
|
||||||
"pallet-grandpa/runtime-benchmarks",
|
"pallet-grandpa/runtime-benchmarks",
|
||||||
"pallet-identity/runtime-benchmarks",
|
"pallet-identity/runtime-benchmarks",
|
||||||
@@ -251,6 +254,7 @@ try-runtime = [
|
|||||||
"pallet-collective/try-runtime",
|
"pallet-collective/try-runtime",
|
||||||
"pallet-elections-phragmen/try-runtime",
|
"pallet-elections-phragmen/try-runtime",
|
||||||
"pallet-election-provider-multi-phase/try-runtime",
|
"pallet-election-provider-multi-phase/try-runtime",
|
||||||
|
"pallet-fast-unstake/try-runtime",
|
||||||
"pallet-democracy/try-runtime",
|
"pallet-democracy/try-runtime",
|
||||||
"pallet-gilt/try-runtime",
|
"pallet-gilt/try-runtime",
|
||||||
"pallet-grandpa/try-runtime",
|
"pallet-grandpa/try-runtime",
|
||||||
|
|||||||
@@ -621,6 +621,17 @@ impl pallet_staking::Config for Runtime {
|
|||||||
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl pallet_fast_unstake::Config for Runtime {
|
||||||
|
type RuntimeEvent = RuntimeEvent;
|
||||||
|
type DepositCurrency = Balances;
|
||||||
|
type Deposit = frame_support::traits::ConstU128<{ CENTS * 100 }>;
|
||||||
|
type ControlOrigin = EitherOfDiverse<
|
||||||
|
EnsureRoot<AccountId>,
|
||||||
|
pallet_collective::EnsureProportionAtLeast<AccountId, CouncilCollective, 1, 2>,
|
||||||
|
>;
|
||||||
|
type WeightInfo = weights::pallet_fast_unstake::WeightInfo<Runtime>;
|
||||||
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const ProposalBond: Permill = Permill::from_percent(5);
|
pub const ProposalBond: Permill = Permill::from_percent(5);
|
||||||
pub const ProposalBondMinimum: Balance = 2000 * CENTS;
|
pub const ProposalBondMinimum: Balance = 2000 * CENTS;
|
||||||
@@ -1045,7 +1056,8 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
|||||||
RuntimeCall::Slots(..) |
|
RuntimeCall::Slots(..) |
|
||||||
RuntimeCall::Auctions(..) | // Specifically omitting the entire XCM Pallet
|
RuntimeCall::Auctions(..) | // Specifically omitting the entire XCM Pallet
|
||||||
RuntimeCall::VoterList(..) |
|
RuntimeCall::VoterList(..) |
|
||||||
RuntimeCall::NominationPools(..)
|
RuntimeCall::NominationPools(..) |
|
||||||
|
RuntimeCall::FastUnstake(..)
|
||||||
),
|
),
|
||||||
ProxyType::Governance =>
|
ProxyType::Governance =>
|
||||||
matches!(
|
matches!(
|
||||||
@@ -1061,7 +1073,9 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
|||||||
ProxyType::Staking => {
|
ProxyType::Staking => {
|
||||||
matches!(
|
matches!(
|
||||||
c,
|
c,
|
||||||
RuntimeCall::Staking(..) | RuntimeCall::Session(..) | RuntimeCall::Utility(..)
|
RuntimeCall::Staking(..) |
|
||||||
|
RuntimeCall::Session(..) | RuntimeCall::Utility(..) |
|
||||||
|
RuntimeCall::FastUnstake(..)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
ProxyType::IdentityJudgement => matches!(
|
ProxyType::IdentityJudgement => matches!(
|
||||||
@@ -1389,6 +1403,9 @@ construct_runtime! {
|
|||||||
// nomination pools: extension to staking.
|
// nomination pools: extension to staking.
|
||||||
NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event<T>, Config<T>} = 41,
|
NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event<T>, Config<T>} = 41,
|
||||||
|
|
||||||
|
// Fast unstake pallet: extension to staking.
|
||||||
|
FastUnstake: pallet_fast_unstake = 42,
|
||||||
|
|
||||||
// Parachains pallets. Start indices at 50 to leave room.
|
// Parachains pallets. Start indices at 50 to leave room.
|
||||||
ParachainsOrigin: parachains_origin::{Pallet, Origin} = 50,
|
ParachainsOrigin: parachains_origin::{Pallet, Origin} = 50,
|
||||||
Configuration: parachains_configuration::{Pallet, Call, Storage, Config<T>} = 51,
|
Configuration: parachains_configuration::{Pallet, Call, Storage, Config<T>} = 51,
|
||||||
@@ -1500,6 +1517,7 @@ mod benches {
|
|||||||
[pallet_elections_phragmen, PhragmenElection]
|
[pallet_elections_phragmen, PhragmenElection]
|
||||||
[pallet_election_provider_multi_phase, ElectionProviderMultiPhase]
|
[pallet_election_provider_multi_phase, ElectionProviderMultiPhase]
|
||||||
[frame_election_provider_support, ElectionProviderBench::<Runtime>]
|
[frame_election_provider_support, ElectionProviderBench::<Runtime>]
|
||||||
|
[pallet_fast_unstake, FastUnstake]
|
||||||
[pallet_gilt, Gilt]
|
[pallet_gilt, Gilt]
|
||||||
[pallet_identity, Identity]
|
[pallet_identity, Identity]
|
||||||
[pallet_im_online, ImOnline]
|
[pallet_im_online, ImOnline]
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ pub mod pallet_collective_technical_committee;
|
|||||||
pub mod pallet_democracy;
|
pub mod pallet_democracy;
|
||||||
pub mod pallet_election_provider_multi_phase;
|
pub mod pallet_election_provider_multi_phase;
|
||||||
pub mod pallet_elections_phragmen;
|
pub mod pallet_elections_phragmen;
|
||||||
|
pub mod pallet_fast_unstake;
|
||||||
pub mod pallet_gilt;
|
pub mod pallet_gilt;
|
||||||
pub mod pallet_identity;
|
pub mod pallet_identity;
|
||||||
pub mod pallet_im_online;
|
pub mod pallet_im_online;
|
||||||
|
|||||||
@@ -0,0 +1,114 @@
|
|||||||
|
// Copyright 2017-2022 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_fast_unstake`
|
||||||
|
//!
|
||||||
|
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||||
|
//! DATE: 2022-09-27, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||||
|
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||||
|
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||||
|
|
||||||
|
// Executed Command:
|
||||||
|
// /home/benchbot/cargo_target_dir/production/polkadot
|
||||||
|
// benchmark
|
||||||
|
// pallet
|
||||||
|
// --steps=50
|
||||||
|
// --repeat=20
|
||||||
|
// --extrinsic=*
|
||||||
|
// --execution=wasm
|
||||||
|
// --wasm-execution=compiled
|
||||||
|
// --heap-pages=4096
|
||||||
|
// --pallet=pallet_fast_unstake
|
||||||
|
// --chain=kusama-dev
|
||||||
|
// --header=./file_header.txt
|
||||||
|
// --output=./runtime/kusama/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_fast_unstake`.
|
||||||
|
pub struct WeightInfo<T>(PhantomData<T>);
|
||||||
|
impl<T: frame_system::Config> pallet_fast_unstake::WeightInfo for WeightInfo<T> {
|
||||||
|
// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
|
||||||
|
// Storage: Staking ValidatorCount (r:1 w:0)
|
||||||
|
// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
|
||||||
|
// Storage: FastUnstake Head (r:1 w:1)
|
||||||
|
// Storage: Staking CurrentEra (r:1 w:0)
|
||||||
|
// Storage: Staking SlashingSpans (r:1 w:0)
|
||||||
|
// Storage: Staking Bonded (r:1 w:1)
|
||||||
|
// Storage: Staking Validators (r:1 w:0)
|
||||||
|
// Storage: Staking Nominators (r:1 w:0)
|
||||||
|
// Storage: System Account (r:1 w:1)
|
||||||
|
// Storage: Balances Locks (r:1 w:1)
|
||||||
|
// Storage: Staking Ledger (r:0 w:1)
|
||||||
|
// Storage: Staking Payee (r:0 w:1)
|
||||||
|
fn on_idle_unstake() -> Weight {
|
||||||
|
Weight::from_ref_time(64_798_000 as u64)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(11 as u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6 as u64))
|
||||||
|
}
|
||||||
|
// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
|
||||||
|
// Storage: Staking ValidatorCount (r:1 w:0)
|
||||||
|
// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
|
||||||
|
// Storage: FastUnstake Head (r:1 w:1)
|
||||||
|
// Storage: FastUnstake Queue (r:2 w:1)
|
||||||
|
// Storage: FastUnstake CounterForQueue (r:1 w:1)
|
||||||
|
// Storage: Staking CurrentEra (r:1 w:0)
|
||||||
|
// Storage: Staking ErasStakers (r:56 w:0)
|
||||||
|
/// The range of component `x` is `[28, 3584]`.
|
||||||
|
fn on_idle_check(x: u32, ) -> Weight {
|
||||||
|
Weight::from_ref_time(412_389_000 as u64)
|
||||||
|
// Standard Error: 10_902
|
||||||
|
.saturating_add(Weight::from_ref_time(10_950_753 as u64).saturating_mul(x as u64))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(64 as u64))
|
||||||
|
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(x as u64)))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(3 as u64))
|
||||||
|
}
|
||||||
|
// Storage: Staking Ledger (r:1 w:1)
|
||||||
|
// Storage: FastUnstake Queue (r:1 w:1)
|
||||||
|
// Storage: FastUnstake Head (r:1 w:0)
|
||||||
|
// Storage: Staking Validators (r:1 w:0)
|
||||||
|
// Storage: Staking Nominators (r:1 w:1)
|
||||||
|
// Storage: Staking CounterForNominators (r:1 w:1)
|
||||||
|
// Storage: VoterList ListNodes (r:1 w:1)
|
||||||
|
// Storage: VoterList ListBags (r:1 w:1)
|
||||||
|
// Storage: VoterList CounterForListNodes (r:1 w:1)
|
||||||
|
// Storage: Staking CurrentEra (r:1 w:0)
|
||||||
|
// Storage: Balances Locks (r:1 w:1)
|
||||||
|
// Storage: FastUnstake CounterForQueue (r:1 w:1)
|
||||||
|
fn register_fast_unstake() -> Weight {
|
||||||
|
Weight::from_ref_time(84_738_000 as u64)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(12 as u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(9 as u64))
|
||||||
|
}
|
||||||
|
// Storage: Staking Ledger (r:1 w:0)
|
||||||
|
// Storage: FastUnstake Queue (r:1 w:1)
|
||||||
|
// Storage: FastUnstake Head (r:1 w:0)
|
||||||
|
// Storage: FastUnstake CounterForQueue (r:1 w:1)
|
||||||
|
fn deregister() -> Weight {
|
||||||
|
Weight::from_ref_time(23_369_000 as u64)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(4 as u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(2 as u64))
|
||||||
|
}
|
||||||
|
// Storage: FastUnstake ErasToCheckPerBlock (r:0 w:1)
|
||||||
|
fn control() -> Weight {
|
||||||
|
Weight::from_ref_time(3_991_000 as u64)
|
||||||
|
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -47,6 +47,7 @@ pallet-collective = { git = "https://github.com/paritytech/substrate", branch =
|
|||||||
pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
|
pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -139,6 +140,7 @@ std = [
|
|||||||
"pallet-elections-phragmen/std",
|
"pallet-elections-phragmen/std",
|
||||||
"pallet-election-provider-multi-phase/std",
|
"pallet-election-provider-multi-phase/std",
|
||||||
"pallet-democracy/std",
|
"pallet-democracy/std",
|
||||||
|
"pallet-fast-unstake/std",
|
||||||
"pallet-grandpa/std",
|
"pallet-grandpa/std",
|
||||||
"pallet-identity/std",
|
"pallet-identity/std",
|
||||||
"pallet-im-online/std",
|
"pallet-im-online/std",
|
||||||
@@ -194,6 +196,7 @@ runtime-benchmarks = [
|
|||||||
"pallet-elections-phragmen/runtime-benchmarks",
|
"pallet-elections-phragmen/runtime-benchmarks",
|
||||||
"pallet-election-provider-multi-phase/runtime-benchmarks",
|
"pallet-election-provider-multi-phase/runtime-benchmarks",
|
||||||
"pallet-election-provider-support-benchmarking/runtime-benchmarks",
|
"pallet-election-provider-support-benchmarking/runtime-benchmarks",
|
||||||
|
"pallet-fast-unstake/runtime-benchmarks",
|
||||||
"pallet-grandpa/runtime-benchmarks",
|
"pallet-grandpa/runtime-benchmarks",
|
||||||
"pallet-identity/runtime-benchmarks",
|
"pallet-identity/runtime-benchmarks",
|
||||||
"pallet-im-online/runtime-benchmarks",
|
"pallet-im-online/runtime-benchmarks",
|
||||||
@@ -237,6 +240,7 @@ try-runtime = [
|
|||||||
"pallet-collective/try-runtime",
|
"pallet-collective/try-runtime",
|
||||||
"pallet-elections-phragmen/try-runtime",
|
"pallet-elections-phragmen/try-runtime",
|
||||||
"pallet-election-provider-multi-phase/try-runtime",
|
"pallet-election-provider-multi-phase/try-runtime",
|
||||||
|
"pallet-fast-unstake/try-runtime",
|
||||||
"pallet-democracy/try-runtime",
|
"pallet-democracy/try-runtime",
|
||||||
"pallet-grandpa/try-runtime",
|
"pallet-grandpa/try-runtime",
|
||||||
"pallet-identity/try-runtime",
|
"pallet-identity/try-runtime",
|
||||||
|
|||||||
@@ -566,6 +566,17 @@ impl pallet_staking::Config for Runtime {
|
|||||||
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl pallet_fast_unstake::Config for Runtime {
|
||||||
|
type RuntimeEvent = RuntimeEvent;
|
||||||
|
type DepositCurrency = Balances;
|
||||||
|
type Deposit = frame_support::traits::ConstU128<{ UNITS }>;
|
||||||
|
type ControlOrigin = EitherOfDiverse<
|
||||||
|
EnsureRoot<AccountId>,
|
||||||
|
pallet_collective::EnsureProportionAtLeast<AccountId, CouncilCollective, 1, 2>,
|
||||||
|
>;
|
||||||
|
type WeightInfo = weights::pallet_fast_unstake::WeightInfo<Runtime>;
|
||||||
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
// Minimum 4 CENTS/byte
|
// Minimum 4 CENTS/byte
|
||||||
pub const BasicDeposit: Balance = deposit(1, 258);
|
pub const BasicDeposit: Balance = deposit(1, 258);
|
||||||
@@ -1133,7 +1144,8 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
|||||||
RuntimeCall::Slots(..) |
|
RuntimeCall::Slots(..) |
|
||||||
RuntimeCall::Auctions(..) | // Specifically omitting the entire XCM Pallet
|
RuntimeCall::Auctions(..) | // Specifically omitting the entire XCM Pallet
|
||||||
RuntimeCall::VoterList(..) |
|
RuntimeCall::VoterList(..) |
|
||||||
RuntimeCall::NominationPools(..)
|
RuntimeCall::NominationPools(..) |
|
||||||
|
RuntimeCall::FastUnstake(..)
|
||||||
),
|
),
|
||||||
ProxyType::Governance =>
|
ProxyType::Governance =>
|
||||||
matches!(
|
matches!(
|
||||||
@@ -1149,7 +1161,9 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
|||||||
ProxyType::Staking => {
|
ProxyType::Staking => {
|
||||||
matches!(
|
matches!(
|
||||||
c,
|
c,
|
||||||
RuntimeCall::Staking(..) | RuntimeCall::Session(..) | RuntimeCall::Utility(..)
|
RuntimeCall::Staking(..) |
|
||||||
|
RuntimeCall::Session(..) | RuntimeCall::Utility(..) |
|
||||||
|
RuntimeCall::FastUnstake(..)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
ProxyType::IdentityJudgement => matches!(
|
ProxyType::IdentityJudgement => matches!(
|
||||||
@@ -1467,9 +1481,12 @@ construct_runtime! {
|
|||||||
// Provides a semi-sorted list of nominators for staking.
|
// Provides a semi-sorted list of nominators for staking.
|
||||||
VoterList: pallet_bags_list::<Instance1>::{Pallet, Call, Storage, Event<T>} = 37,
|
VoterList: pallet_bags_list::<Instance1>::{Pallet, Call, Storage, Event<T>} = 37,
|
||||||
|
|
||||||
// nomination pools: extension to staking.
|
// Nomination pools: extension to staking.
|
||||||
NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event<T>, Config<T>} = 39,
|
NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event<T>, Config<T>} = 39,
|
||||||
|
|
||||||
|
// Fast unstake pallet: extension to staking.
|
||||||
|
FastUnstake: pallet_fast_unstake = 40,
|
||||||
|
|
||||||
// Parachains pallets. Start indices at 50 to leave room.
|
// Parachains pallets. Start indices at 50 to leave room.
|
||||||
ParachainsOrigin: parachains_origin::{Pallet, Origin} = 50,
|
ParachainsOrigin: parachains_origin::{Pallet, Origin} = 50,
|
||||||
Configuration: parachains_configuration::{Pallet, Call, Storage, Config<T>} = 51,
|
Configuration: parachains_configuration::{Pallet, Call, Storage, Config<T>} = 51,
|
||||||
@@ -1582,6 +1599,7 @@ mod benches {
|
|||||||
[pallet_elections_phragmen, PhragmenElection]
|
[pallet_elections_phragmen, PhragmenElection]
|
||||||
[pallet_election_provider_multi_phase, ElectionProviderMultiPhase]
|
[pallet_election_provider_multi_phase, ElectionProviderMultiPhase]
|
||||||
[frame_election_provider_support, ElectionProviderBench::<Runtime>]
|
[frame_election_provider_support, ElectionProviderBench::<Runtime>]
|
||||||
|
[pallet_fast_unstake, FastUnstake]
|
||||||
[pallet_identity, Identity]
|
[pallet_identity, Identity]
|
||||||
[pallet_im_online, ImOnline]
|
[pallet_im_online, ImOnline]
|
||||||
[pallet_indices, Indices]
|
[pallet_indices, Indices]
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ pub mod pallet_collective_technical_committee;
|
|||||||
pub mod pallet_democracy;
|
pub mod pallet_democracy;
|
||||||
pub mod pallet_election_provider_multi_phase;
|
pub mod pallet_election_provider_multi_phase;
|
||||||
pub mod pallet_elections_phragmen;
|
pub mod pallet_elections_phragmen;
|
||||||
|
pub mod pallet_fast_unstake;
|
||||||
pub mod pallet_identity;
|
pub mod pallet_identity;
|
||||||
pub mod pallet_im_online;
|
pub mod pallet_im_online;
|
||||||
pub mod pallet_indices;
|
pub mod pallet_indices;
|
||||||
|
|||||||
@@ -0,0 +1,114 @@
|
|||||||
|
// Copyright 2017-2022 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_fast_unstake`
|
||||||
|
//!
|
||||||
|
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||||
|
//! DATE: 2022-09-27, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||||
|
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||||
|
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024
|
||||||
|
|
||||||
|
// Executed Command:
|
||||||
|
// /home/benchbot/cargo_target_dir/production/polkadot
|
||||||
|
// benchmark
|
||||||
|
// pallet
|
||||||
|
// --steps=50
|
||||||
|
// --repeat=20
|
||||||
|
// --extrinsic=*
|
||||||
|
// --execution=wasm
|
||||||
|
// --wasm-execution=compiled
|
||||||
|
// --heap-pages=4096
|
||||||
|
// --pallet=pallet_fast_unstake
|
||||||
|
// --chain=polkadot-dev
|
||||||
|
// --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_fast_unstake`.
|
||||||
|
pub struct WeightInfo<T>(PhantomData<T>);
|
||||||
|
impl<T: frame_system::Config> pallet_fast_unstake::WeightInfo for WeightInfo<T> {
|
||||||
|
// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
|
||||||
|
// Storage: Staking ValidatorCount (r:1 w:0)
|
||||||
|
// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
|
||||||
|
// Storage: FastUnstake Head (r:1 w:1)
|
||||||
|
// Storage: Staking CurrentEra (r:1 w:0)
|
||||||
|
// Storage: Staking SlashingSpans (r:1 w:0)
|
||||||
|
// Storage: Staking Bonded (r:1 w:1)
|
||||||
|
// Storage: Staking Validators (r:1 w:0)
|
||||||
|
// Storage: Staking Nominators (r:1 w:0)
|
||||||
|
// Storage: System Account (r:1 w:1)
|
||||||
|
// Storage: Balances Locks (r:1 w:1)
|
||||||
|
// Storage: Staking Ledger (r:0 w:1)
|
||||||
|
// Storage: Staking Payee (r:0 w:1)
|
||||||
|
fn on_idle_unstake() -> Weight {
|
||||||
|
Weight::from_ref_time(67_082_000 as u64)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(11 as u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6 as u64))
|
||||||
|
}
|
||||||
|
// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
|
||||||
|
// Storage: Staking ValidatorCount (r:1 w:0)
|
||||||
|
// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
|
||||||
|
// Storage: FastUnstake Head (r:1 w:1)
|
||||||
|
// Storage: FastUnstake Queue (r:2 w:1)
|
||||||
|
// Storage: FastUnstake CounterForQueue (r:1 w:1)
|
||||||
|
// Storage: Staking CurrentEra (r:1 w:0)
|
||||||
|
// Storage: Staking ErasStakers (r:56 w:0)
|
||||||
|
/// The range of component `x` is `[28, 3584]`.
|
||||||
|
fn on_idle_check(x: u32, ) -> Weight {
|
||||||
|
Weight::from_ref_time(504_317_000 as u64)
|
||||||
|
// Standard Error: 18_023
|
||||||
|
.saturating_add(Weight::from_ref_time(14_203_535 as u64).saturating_mul(x as u64))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(64 as u64))
|
||||||
|
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(x as u64)))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(3 as u64))
|
||||||
|
}
|
||||||
|
// Storage: Staking Ledger (r:1 w:1)
|
||||||
|
// Storage: FastUnstake Queue (r:1 w:1)
|
||||||
|
// Storage: FastUnstake Head (r:1 w:0)
|
||||||
|
// Storage: Staking Validators (r:1 w:0)
|
||||||
|
// Storage: Staking Nominators (r:1 w:1)
|
||||||
|
// Storage: Staking CounterForNominators (r:1 w:1)
|
||||||
|
// Storage: VoterList ListNodes (r:2 w:2)
|
||||||
|
// Storage: VoterList ListBags (r:1 w:1)
|
||||||
|
// Storage: VoterList CounterForListNodes (r:1 w:1)
|
||||||
|
// Storage: Staking CurrentEra (r:1 w:0)
|
||||||
|
// Storage: Balances Locks (r:1 w:1)
|
||||||
|
// Storage: FastUnstake CounterForQueue (r:1 w:1)
|
||||||
|
fn register_fast_unstake() -> Weight {
|
||||||
|
Weight::from_ref_time(90_682_000 as u64)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(13 as u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(10 as u64))
|
||||||
|
}
|
||||||
|
// Storage: Staking Ledger (r:1 w:0)
|
||||||
|
// Storage: FastUnstake Queue (r:1 w:1)
|
||||||
|
// Storage: FastUnstake Head (r:1 w:0)
|
||||||
|
// Storage: FastUnstake CounterForQueue (r:1 w:1)
|
||||||
|
fn deregister() -> Weight {
|
||||||
|
Weight::from_ref_time(23_926_000 as u64)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(4 as u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(2 as u64))
|
||||||
|
}
|
||||||
|
// Storage: FastUnstake ErasToCheckPerBlock (r:0 w:1)
|
||||||
|
fn control() -> Weight {
|
||||||
|
Weight::from_ref_time(3_899_000 as u64)
|
||||||
|
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -48,6 +48,7 @@ pallet-collective = { git = "https://github.com/paritytech/substrate", branch =
|
|||||||
pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-elections-phragmen = { package = "pallet-elections-phragmen", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-elections-phragmen = { package = "pallet-elections-phragmen", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
|
pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -135,6 +136,7 @@ std = [
|
|||||||
"pallet-collective/std",
|
"pallet-collective/std",
|
||||||
"pallet-elections-phragmen/std",
|
"pallet-elections-phragmen/std",
|
||||||
"pallet-election-provider-multi-phase/std",
|
"pallet-election-provider-multi-phase/std",
|
||||||
|
"pallet-fast-unstake/std",
|
||||||
"pallet-democracy/std",
|
"pallet-democracy/std",
|
||||||
"pallet-grandpa/std",
|
"pallet-grandpa/std",
|
||||||
"pallet-identity/std",
|
"pallet-identity/std",
|
||||||
@@ -196,6 +198,7 @@ runtime-benchmarks = [
|
|||||||
"pallet-elections-phragmen/runtime-benchmarks",
|
"pallet-elections-phragmen/runtime-benchmarks",
|
||||||
"pallet-election-provider-multi-phase/runtime-benchmarks",
|
"pallet-election-provider-multi-phase/runtime-benchmarks",
|
||||||
"pallet-election-provider-support-benchmarking/runtime-benchmarks",
|
"pallet-election-provider-support-benchmarking/runtime-benchmarks",
|
||||||
|
"pallet-fast-unstake/runtime-benchmarks",
|
||||||
"pallet-grandpa/runtime-benchmarks",
|
"pallet-grandpa/runtime-benchmarks",
|
||||||
"pallet-identity/runtime-benchmarks",
|
"pallet-identity/runtime-benchmarks",
|
||||||
"pallet-im-online/runtime-benchmarks",
|
"pallet-im-online/runtime-benchmarks",
|
||||||
@@ -235,6 +238,7 @@ try-runtime = [
|
|||||||
"pallet-collective/try-runtime",
|
"pallet-collective/try-runtime",
|
||||||
"pallet-elections-phragmen/try-runtime",
|
"pallet-elections-phragmen/try-runtime",
|
||||||
"pallet-election-provider-multi-phase/try-runtime",
|
"pallet-election-provider-multi-phase/try-runtime",
|
||||||
|
"pallet-fast-unstake/try-runtime",
|
||||||
"pallet-democracy/try-runtime",
|
"pallet-democracy/try-runtime",
|
||||||
"pallet-grandpa/try-runtime",
|
"pallet-grandpa/try-runtime",
|
||||||
"pallet-identity/try-runtime",
|
"pallet-identity/try-runtime",
|
||||||
|
|||||||
@@ -517,6 +517,14 @@ impl pallet_staking::Config for Runtime {
|
|||||||
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl pallet_fast_unstake::Config for Runtime {
|
||||||
|
type RuntimeEvent = RuntimeEvent;
|
||||||
|
type DepositCurrency = Balances;
|
||||||
|
type Deposit = frame_support::traits::ConstU128<{ UNITS }>;
|
||||||
|
type ControlOrigin = EnsureRoot<AccountId>;
|
||||||
|
type WeightInfo = weights::pallet_fast_unstake::WeightInfo<Runtime>;
|
||||||
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const MaxAuthorities: u32 = 100_000;
|
pub const MaxAuthorities: u32 = 100_000;
|
||||||
}
|
}
|
||||||
@@ -804,12 +812,15 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
|
|||||||
RuntimeCall::Slots(..) |
|
RuntimeCall::Slots(..) |
|
||||||
RuntimeCall::Auctions(..) | // Specifically omitting the entire XCM Pallet
|
RuntimeCall::Auctions(..) | // Specifically omitting the entire XCM Pallet
|
||||||
RuntimeCall::VoterList(..) |
|
RuntimeCall::VoterList(..) |
|
||||||
RuntimeCall::NominationPools(..)
|
RuntimeCall::NominationPools(..) |
|
||||||
|
RuntimeCall::FastUnstake(..)
|
||||||
),
|
),
|
||||||
ProxyType::Staking => {
|
ProxyType::Staking => {
|
||||||
matches!(
|
matches!(
|
||||||
c,
|
c,
|
||||||
RuntimeCall::Staking(..) | RuntimeCall::Session(..) | RuntimeCall::Utility(..)
|
RuntimeCall::Staking(..) |
|
||||||
|
RuntimeCall::Session(..) | RuntimeCall::Utility(..) |
|
||||||
|
RuntimeCall::FastUnstake(..)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
ProxyType::SudoBalances => match c {
|
ProxyType::SudoBalances => match c {
|
||||||
@@ -1126,6 +1137,9 @@ construct_runtime! {
|
|||||||
// Nomination pools for staking.
|
// Nomination pools for staking.
|
||||||
NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event<T>, Config<T>} = 29,
|
NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event<T>, Config<T>} = 29,
|
||||||
|
|
||||||
|
// Fast unstake pallet: extension to staking.
|
||||||
|
FastUnstake: pallet_fast_unstake = 30,
|
||||||
|
|
||||||
// Parachains pallets. Start indices at 40 to leave room.
|
// Parachains pallets. Start indices at 40 to leave room.
|
||||||
ParachainsOrigin: parachains_origin::{Pallet, Origin} = 41,
|
ParachainsOrigin: parachains_origin::{Pallet, Origin} = 41,
|
||||||
Configuration: parachains_configuration::{Pallet, Call, Storage, Config<T>} = 42,
|
Configuration: parachains_configuration::{Pallet, Call, Storage, Config<T>} = 42,
|
||||||
@@ -1233,6 +1247,7 @@ mod benches {
|
|||||||
[pallet_balances, Balances]
|
[pallet_balances, Balances]
|
||||||
[pallet_election_provider_multi_phase, ElectionProviderMultiPhase]
|
[pallet_election_provider_multi_phase, ElectionProviderMultiPhase]
|
||||||
[frame_election_provider_support, ElectionProviderBench::<Runtime>]
|
[frame_election_provider_support, ElectionProviderBench::<Runtime>]
|
||||||
|
[pallet_fast_unstake, FastUnstake]
|
||||||
[pallet_identity, Identity]
|
[pallet_identity, Identity]
|
||||||
[pallet_im_online, ImOnline]
|
[pallet_im_online, ImOnline]
|
||||||
[pallet_indices, Indices]
|
[pallet_indices, Indices]
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ pub mod frame_system;
|
|||||||
pub mod pallet_bags_list;
|
pub mod pallet_bags_list;
|
||||||
pub mod pallet_balances;
|
pub mod pallet_balances;
|
||||||
pub mod pallet_election_provider_multi_phase;
|
pub mod pallet_election_provider_multi_phase;
|
||||||
|
pub mod pallet_fast_unstake;
|
||||||
pub mod pallet_identity;
|
pub mod pallet_identity;
|
||||||
pub mod pallet_im_online;
|
pub mod pallet_im_online;
|
||||||
pub mod pallet_indices;
|
pub mod pallet_indices;
|
||||||
|
|||||||
@@ -0,0 +1,116 @@
|
|||||||
|
// Copyright 2017-2022 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_fast_unstake`
|
||||||
|
//!
|
||||||
|
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||||
|
//! DATE: 2022-09-28, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||||
|
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
|
||||||
|
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024
|
||||||
|
|
||||||
|
// Executed Command:
|
||||||
|
// /home/benchbot/cargo_target_dir/production/polkadot
|
||||||
|
// benchmark
|
||||||
|
// pallet
|
||||||
|
// --steps=50
|
||||||
|
// --repeat=20
|
||||||
|
// --extrinsic=*
|
||||||
|
// --execution=wasm
|
||||||
|
// --wasm-execution=compiled
|
||||||
|
// --heap-pages=4096
|
||||||
|
// --pallet=pallet_fast_unstake
|
||||||
|
// --chain=westend-dev
|
||||||
|
// --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_fast_unstake`.
|
||||||
|
pub struct WeightInfo<T>(PhantomData<T>);
|
||||||
|
impl<T: frame_system::Config> pallet_fast_unstake::WeightInfo for WeightInfo<T> {
|
||||||
|
// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
|
||||||
|
// Storage: Staking ValidatorCount (r:1 w:0)
|
||||||
|
// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
|
||||||
|
// Storage: FastUnstake Head (r:1 w:1)
|
||||||
|
// Storage: Staking CurrentEra (r:1 w:0)
|
||||||
|
// Storage: Staking SlashingSpans (r:1 w:0)
|
||||||
|
// Storage: Staking Bonded (r:1 w:1)
|
||||||
|
// Storage: Staking Validators (r:1 w:0)
|
||||||
|
// Storage: Staking Nominators (r:1 w:0)
|
||||||
|
// Storage: System Account (r:1 w:1)
|
||||||
|
// Storage: Balances Locks (r:1 w:1)
|
||||||
|
// Storage: Staking Ledger (r:0 w:1)
|
||||||
|
// Storage: Staking Payee (r:0 w:1)
|
||||||
|
fn on_idle_unstake() -> Weight {
|
||||||
|
Weight::from_ref_time(71_751_000 as u64)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(11 as u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(6 as u64))
|
||||||
|
}
|
||||||
|
// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
|
||||||
|
// Storage: Staking ValidatorCount (r:1 w:0)
|
||||||
|
// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0)
|
||||||
|
// Storage: FastUnstake Head (r:1 w:1)
|
||||||
|
// Storage: FastUnstake Queue (r:2 w:1)
|
||||||
|
// Storage: FastUnstake CounterForQueue (r:1 w:1)
|
||||||
|
// Storage: Staking CurrentEra (r:1 w:0)
|
||||||
|
// Storage: Staking ErasStakers (r:4 w:0)
|
||||||
|
/// The range of component `x` is `[2, 256]`.
|
||||||
|
fn on_idle_check(x: u32, ) -> Weight {
|
||||||
|
Weight::from_ref_time(68_336_000 as u64)
|
||||||
|
// Standard Error: 9_399
|
||||||
|
.saturating_add(Weight::from_ref_time(13_544_336 as u64).saturating_mul(x as u64))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(12 as u64))
|
||||||
|
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(x as u64)))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(3 as u64))
|
||||||
|
}
|
||||||
|
// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
|
||||||
|
// Storage: Staking Ledger (r:1 w:1)
|
||||||
|
// Storage: FastUnstake Queue (r:1 w:1)
|
||||||
|
// Storage: FastUnstake Head (r:1 w:0)
|
||||||
|
// Storage: Staking Validators (r:1 w:0)
|
||||||
|
// Storage: Staking Nominators (r:1 w:1)
|
||||||
|
// Storage: Staking CounterForNominators (r:1 w:1)
|
||||||
|
// Storage: VoterList ListNodes (r:1 w:1)
|
||||||
|
// Storage: VoterList ListBags (r:1 w:1)
|
||||||
|
// Storage: VoterList CounterForListNodes (r:1 w:1)
|
||||||
|
// Storage: Staking CurrentEra (r:1 w:0)
|
||||||
|
// Storage: Balances Locks (r:1 w:1)
|
||||||
|
// Storage: FastUnstake CounterForQueue (r:1 w:1)
|
||||||
|
fn register_fast_unstake() -> Weight {
|
||||||
|
Weight::from_ref_time(93_252_000 as u64)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(13 as u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(9 as u64))
|
||||||
|
}
|
||||||
|
// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0)
|
||||||
|
// Storage: Staking Ledger (r:1 w:0)
|
||||||
|
// Storage: FastUnstake Queue (r:1 w:1)
|
||||||
|
// Storage: FastUnstake Head (r:1 w:0)
|
||||||
|
// Storage: FastUnstake CounterForQueue (r:1 w:1)
|
||||||
|
fn deregister() -> Weight {
|
||||||
|
Weight::from_ref_time(40_994_000 as u64)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(5 as u64))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(2 as u64))
|
||||||
|
}
|
||||||
|
// Storage: FastUnstake ErasToCheckPerBlock (r:0 w:1)
|
||||||
|
fn control() -> Weight {
|
||||||
|
Weight::from_ref_time(4_420_000 as u64)
|
||||||
|
.saturating_add(T::DbWeight::get().writes(1 as u64))
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user