mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 14:01:02 +00:00
Add Nomination Pools to Kusama (#5447)
* add nomination pools to kusama * Update runtime/kusama/src/lib.rs Co-authored-by: Mara Robin B. <mara@broda.me> * Update runtime/kusama/src/lib.rs * probably fix build * really fix build * fix benches * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark pallet --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/ * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark pallet --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/ * whitelist transactional storage limit * make defensive * fix * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark pallet --chain=westend-dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/ * update * fix benches * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark pallet --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/ * change head * fmt Co-authored-by: Mara Robin B. <mara@broda.me> Co-authored-by: Parity Bot <admin@parity.io>
This commit is contained in:
Generated
+2
@@ -3364,6 +3364,8 @@ dependencies = [
|
|||||||
"pallet-membership",
|
"pallet-membership",
|
||||||
"pallet-multisig",
|
"pallet-multisig",
|
||||||
"pallet-nicks",
|
"pallet-nicks",
|
||||||
|
"pallet-nomination-pools",
|
||||||
|
"pallet-nomination-pools-benchmarking",
|
||||||
"pallet-offences",
|
"pallet-offences",
|
||||||
"pallet-offences-benchmarking",
|
"pallet-offences-benchmarking",
|
||||||
"pallet-preimage",
|
"pallet-preimage",
|
||||||
|
|||||||
@@ -767,6 +767,7 @@ fn kusama_staging_testnet_config_genesis(wasm_binary: &[u8]) -> kusama::GenesisC
|
|||||||
gilt: Default::default(),
|
gilt: Default::default(),
|
||||||
paras: Default::default(),
|
paras: Default::default(),
|
||||||
xcm_pallet: Default::default(),
|
xcm_pallet: Default::default(),
|
||||||
|
nomination_pools: Default::default(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1471,6 +1472,7 @@ pub fn kusama_testnet_genesis(
|
|||||||
gilt: Default::default(),
|
gilt: Default::default(),
|
||||||
paras: Default::default(),
|
paras: Default::default(),
|
||||||
xcm_pallet: Default::default(),
|
xcm_pallet: Default::default(),
|
||||||
|
nomination_pools: Default::default(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1551,12 +1553,7 @@ pub fn westend_testnet_genesis(
|
|||||||
next_free_para_id: polkadot_primitives::v2::LOWEST_PUBLIC_ID,
|
next_free_para_id: polkadot_primitives::v2::LOWEST_PUBLIC_ID,
|
||||||
},
|
},
|
||||||
xcm_pallet: Default::default(),
|
xcm_pallet: Default::default(),
|
||||||
nomination_pools: westend_runtime::NominationPoolsConfig {
|
nomination_pools: Default::default(),
|
||||||
max_pools: Some(128),
|
|
||||||
min_join_bond: WND,
|
|
||||||
min_create_bond: 100 * WND,
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "ma
|
|||||||
pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
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-nicks = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
|
pallet-nomination-pools = { 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-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-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-proxy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -83,6 +84,7 @@ frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch =
|
|||||||
frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
||||||
pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
||||||
pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
||||||
|
pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
||||||
frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
||||||
pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
||||||
hex-literal = { version = "0.3.4", optional = true }
|
hex-literal = { version = "0.3.4", optional = true }
|
||||||
@@ -147,6 +149,7 @@ std = [
|
|||||||
"pallet-membership/std",
|
"pallet-membership/std",
|
||||||
"pallet-multisig/std",
|
"pallet-multisig/std",
|
||||||
"pallet-nicks/std",
|
"pallet-nicks/std",
|
||||||
|
"pallet-nomination-pools/std",
|
||||||
"pallet-offences/std",
|
"pallet-offences/std",
|
||||||
"pallet-preimage/std",
|
"pallet-preimage/std",
|
||||||
"pallet-proxy/std",
|
"pallet-proxy/std",
|
||||||
@@ -207,6 +210,8 @@ runtime-benchmarks = [
|
|||||||
"pallet-indices/runtime-benchmarks",
|
"pallet-indices/runtime-benchmarks",
|
||||||
"pallet-membership/runtime-benchmarks",
|
"pallet-membership/runtime-benchmarks",
|
||||||
"pallet-multisig/runtime-benchmarks",
|
"pallet-multisig/runtime-benchmarks",
|
||||||
|
"pallet-nomination-pools/runtime-benchmarks",
|
||||||
|
"pallet-nomination-pools-benchmarking",
|
||||||
"pallet-preimage/runtime-benchmarks",
|
"pallet-preimage/runtime-benchmarks",
|
||||||
"pallet-proxy/runtime-benchmarks",
|
"pallet-proxy/runtime-benchmarks",
|
||||||
"pallet-scheduler/runtime-benchmarks",
|
"pallet-scheduler/runtime-benchmarks",
|
||||||
|
|||||||
@@ -52,7 +52,8 @@ use frame_election_provider_support::{
|
|||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, parameter_types,
|
construct_runtime, parameter_types,
|
||||||
traits::{
|
traits::{
|
||||||
Contains, EnsureOneOf, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, PrivilegeCmp,
|
ConstU32, Contains, EnsureOneOf, InstanceFilter, KeyOwnerProofSystem, LockIdentifier,
|
||||||
|
OnRuntimeUpgrade, PrivilegeCmp,
|
||||||
},
|
},
|
||||||
weights::ConstantMultiplier,
|
weights::ConstantMultiplier,
|
||||||
PalletId, RuntimeDebug,
|
PalletId, RuntimeDebug,
|
||||||
@@ -1397,6 +1398,64 @@ impl pallet_gilt::Config for Runtime {
|
|||||||
type WeightInfo = weights::pallet_gilt::WeightInfo<Runtime>;
|
type WeightInfo = weights::pallet_gilt::WeightInfo<Runtime>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub struct BalanceToU256;
|
||||||
|
impl sp_runtime::traits::Convert<Balance, sp_core::U256> for BalanceToU256 {
|
||||||
|
fn convert(n: Balance) -> sp_core::U256 {
|
||||||
|
n.into()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pub struct U256ToBalance;
|
||||||
|
impl sp_runtime::traits::Convert<sp_core::U256, Balance> for U256ToBalance {
|
||||||
|
fn convert(n: sp_core::U256) -> Balance {
|
||||||
|
use frame_support::traits::Defensive;
|
||||||
|
n.try_into().defensive_unwrap_or(Balance::MAX)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
parameter_types! {
|
||||||
|
pub const PoolsPalletId: PalletId = PalletId(*b"py/nopls");
|
||||||
|
}
|
||||||
|
|
||||||
|
impl pallet_nomination_pools::Config for Runtime {
|
||||||
|
type Event = Event;
|
||||||
|
type WeightInfo = weights::pallet_nomination_pools::WeightInfo<Self>;
|
||||||
|
type Currency = Balances;
|
||||||
|
type BalanceToU256 = BalanceToU256;
|
||||||
|
type U256ToBalance = U256ToBalance;
|
||||||
|
type StakingInterface = Staking;
|
||||||
|
type PostUnbondingPoolsWindow = ConstU32<4>;
|
||||||
|
type MaxMetadataLen = ConstU32<256>;
|
||||||
|
// we use the same number of allowed unlocking chunks as with staking.
|
||||||
|
type MaxUnbonding = <Self as pallet_staking::Config>::MaxUnlockingChunks;
|
||||||
|
type PalletId = PoolsPalletId;
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct InitiatePoolConfigs;
|
||||||
|
impl OnRuntimeUpgrade for InitiatePoolConfigs {
|
||||||
|
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
||||||
|
// we use one as an indicator if this has already been set.
|
||||||
|
if pallet_nomination_pools::MaxPools::<Runtime>::get().is_none() {
|
||||||
|
// 1/600 KSM to join a pool.
|
||||||
|
pallet_nomination_pools::MinJoinBond::<Runtime>::put(50 * CENTS);
|
||||||
|
// 1 KSM to create a pool.
|
||||||
|
pallet_nomination_pools::MinCreateBond::<Runtime>::put(UNITS);
|
||||||
|
|
||||||
|
// 128 initial pools: only for initial safety: can be set to infinity when needed.
|
||||||
|
pallet_nomination_pools::MaxPools::<Runtime>::put(128);
|
||||||
|
// 64k total pool members: only for initial safety: can be set to infinity when needed.
|
||||||
|
pallet_nomination_pools::MaxPoolMembers::<Runtime>::put(64 * 1024);
|
||||||
|
// 1024 members per pool: only for initial safety: can be set to infinity when needed.
|
||||||
|
pallet_nomination_pools::MaxPoolMembersPerPool::<Runtime>::put(1024);
|
||||||
|
|
||||||
|
log::info!(target: "runtime::kusama", "pools config initiated 🎉");
|
||||||
|
<Runtime as frame_system::Config>::DbWeight::get().reads_writes(1, 5)
|
||||||
|
} else {
|
||||||
|
log::info!(target: "runtime::kusama", "pools config already initiated 😏");
|
||||||
|
<Runtime as frame_system::Config>::DbWeight::get().reads(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
construct_runtime! {
|
construct_runtime! {
|
||||||
pub enum Runtime where
|
pub enum Runtime where
|
||||||
Block = Block,
|
Block = Block,
|
||||||
@@ -1481,6 +1540,9 @@ construct_runtime! {
|
|||||||
// Provides a semi-sorted list of nominators for staking.
|
// Provides a semi-sorted list of nominators for staking.
|
||||||
BagsList: pallet_bags_list::{Pallet, Call, Storage, Event<T>} = 39,
|
BagsList: pallet_bags_list::{Pallet, Call, Storage, Event<T>} = 39,
|
||||||
|
|
||||||
|
// nomination pools: extension to staking.
|
||||||
|
NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event<T>, Config<T>} = 41,
|
||||||
|
|
||||||
// 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,
|
||||||
@@ -1537,7 +1599,7 @@ pub type Executive = frame_executive::Executive<
|
|||||||
frame_system::ChainContext<Runtime>,
|
frame_system::ChainContext<Runtime>,
|
||||||
Runtime,
|
Runtime,
|
||||||
AllPalletsWithSystem,
|
AllPalletsWithSystem,
|
||||||
(),
|
InitiatePoolConfigs,
|
||||||
>;
|
>;
|
||||||
/// The payload being signed in the transactions.
|
/// The payload being signed in the transactions.
|
||||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
||||||
@@ -1582,6 +1644,7 @@ mod benches {
|
|||||||
[pallet_indices, Indices]
|
[pallet_indices, Indices]
|
||||||
[pallet_membership, TechnicalMembership]
|
[pallet_membership, TechnicalMembership]
|
||||||
[pallet_multisig, Multisig]
|
[pallet_multisig, Multisig]
|
||||||
|
[pallet_nomination_pools, NominationPoolsBench::<Runtime>]
|
||||||
[pallet_offences, OffencesBench::<Runtime>]
|
[pallet_offences, OffencesBench::<Runtime>]
|
||||||
[pallet_preimage, Preimage]
|
[pallet_preimage, Preimage]
|
||||||
[pallet_proxy, Proxy]
|
[pallet_proxy, Proxy]
|
||||||
@@ -1966,6 +2029,7 @@ sp_api::impl_runtime_apis! {
|
|||||||
use pallet_offences_benchmarking::Pallet as OffencesBench;
|
use pallet_offences_benchmarking::Pallet as OffencesBench;
|
||||||
use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench;
|
use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench;
|
||||||
use frame_system_benchmarking::Pallet as SystemBench;
|
use frame_system_benchmarking::Pallet as SystemBench;
|
||||||
|
use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench;
|
||||||
use frame_benchmarking::baseline::Pallet as Baseline;
|
use frame_benchmarking::baseline::Pallet as Baseline;
|
||||||
|
|
||||||
let mut list = Vec::<BenchmarkList>::new();
|
let mut list = Vec::<BenchmarkList>::new();
|
||||||
@@ -1988,6 +2052,7 @@ sp_api::impl_runtime_apis! {
|
|||||||
use pallet_offences_benchmarking::Pallet as OffencesBench;
|
use pallet_offences_benchmarking::Pallet as OffencesBench;
|
||||||
use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench;
|
use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench;
|
||||||
use frame_system_benchmarking::Pallet as SystemBench;
|
use frame_system_benchmarking::Pallet as SystemBench;
|
||||||
|
use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench;
|
||||||
use frame_benchmarking::baseline::Pallet as Baseline;
|
use frame_benchmarking::baseline::Pallet as Baseline;
|
||||||
use xcm::latest::prelude::*;
|
use xcm::latest::prelude::*;
|
||||||
use xcm_config::{CheckAccount, KsmLocation, SovereignAccountOf, Statemine, XcmConfig};
|
use xcm_config::{CheckAccount, KsmLocation, SovereignAccountOf, Statemine, XcmConfig};
|
||||||
@@ -1997,6 +2062,7 @@ sp_api::impl_runtime_apis! {
|
|||||||
impl pallet_election_provider_support_benchmarking::Config for Runtime {}
|
impl pallet_election_provider_support_benchmarking::Config for Runtime {}
|
||||||
impl frame_system_benchmarking::Config for Runtime {}
|
impl frame_system_benchmarking::Config for Runtime {}
|
||||||
impl frame_benchmarking::baseline::Config for Runtime {}
|
impl frame_benchmarking::baseline::Config for Runtime {}
|
||||||
|
impl pallet_nomination_pools_benchmarking::Config for Runtime {}
|
||||||
|
|
||||||
impl pallet_xcm_benchmarks::Config for Runtime {
|
impl pallet_xcm_benchmarks::Config for Runtime {
|
||||||
type XcmConfig = XcmConfig;
|
type XcmConfig = XcmConfig;
|
||||||
@@ -2077,6 +2143,8 @@ sp_api::impl_runtime_apis! {
|
|||||||
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da95ecffd7b6c0f78751baa9d281e0bfa3a6d6f646c70792f74727372790000000000000000000000000000000000000000").to_vec().into(),
|
hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da95ecffd7b6c0f78751baa9d281e0bfa3a6d6f646c70792f74727372790000000000000000000000000000000000000000").to_vec().into(),
|
||||||
// Configuration ActiveConfig
|
// Configuration ActiveConfig
|
||||||
hex_literal::hex!("06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385").to_vec().into(),
|
hex_literal::hex!("06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385").to_vec().into(),
|
||||||
|
// The transactional storage limit.
|
||||||
|
hex_literal::hex!("3a7472616e73616374696f6e5f6c6576656c3a").to_vec().into(),
|
||||||
];
|
];
|
||||||
|
|
||||||
let mut batches = Vec::<BenchmarkBatch>::new();
|
let mut batches = Vec::<BenchmarkBatch>::new();
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ pub mod pallet_im_online;
|
|||||||
pub mod pallet_indices;
|
pub mod pallet_indices;
|
||||||
pub mod pallet_membership;
|
pub mod pallet_membership;
|
||||||
pub mod pallet_multisig;
|
pub mod pallet_multisig;
|
||||||
|
pub mod pallet_nomination_pools;
|
||||||
pub mod pallet_preimage;
|
pub mod pallet_preimage;
|
||||||
pub mod pallet_proxy;
|
pub mod pallet_proxy;
|
||||||
pub mod pallet_scheduler;
|
pub mod pallet_scheduler;
|
||||||
|
|||||||
@@ -0,0 +1,250 @@
|
|||||||
|
// 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_nomination_pools`
|
||||||
|
//!
|
||||||
|
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||||
|
//! DATE: 2022-05-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||||
|
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024
|
||||||
|
|
||||||
|
// Executed Command:
|
||||||
|
// target/production/polkadot
|
||||||
|
// benchmark
|
||||||
|
// pallet
|
||||||
|
// --chain=kusama-dev
|
||||||
|
// --steps=50
|
||||||
|
// --repeat=20
|
||||||
|
// --pallet=pallet_nomination_pools
|
||||||
|
// --extrinsic=*
|
||||||
|
// --execution=wasm
|
||||||
|
// --wasm-execution=compiled
|
||||||
|
// --heap-pages=4096
|
||||||
|
// --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_nomination_pools`.
|
||||||
|
pub struct WeightInfo<T>(PhantomData<T>);
|
||||||
|
impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo<T> {
|
||||||
|
// Storage: NominationPools MinJoinBond (r:1 w:0)
|
||||||
|
// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||||
|
// Storage: NominationPools BondedPools (r:1 w:1)
|
||||||
|
// Storage: Staking Ledger (r:1 w:1)
|
||||||
|
// Storage: NominationPools RewardPools (r:1 w:0)
|
||||||
|
// Storage: System Account (r:2 w:1)
|
||||||
|
// Storage: NominationPools MaxPoolMembersPerPool (r:1 w:0)
|
||||||
|
// Storage: NominationPools MaxPoolMembers (r:1 w:0)
|
||||||
|
// Storage: NominationPools CounterForPoolMembers (r:1 w:1)
|
||||||
|
// Storage: Staking Bonded (r:1 w:0)
|
||||||
|
// Storage: Balances Locks (r:1 w:1)
|
||||||
|
// Storage: BagsList ListNodes (r:3 w:3)
|
||||||
|
// Storage: BagsList ListBags (r:2 w:2)
|
||||||
|
fn join() -> Weight {
|
||||||
|
(107_531_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(17 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(11 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||||
|
// Storage: NominationPools BondedPools (r:1 w:1)
|
||||||
|
// Storage: NominationPools RewardPools (r:1 w:1)
|
||||||
|
// Storage: System Account (r:2 w:2)
|
||||||
|
// Storage: Staking Ledger (r:1 w:1)
|
||||||
|
// Storage: Staking Bonded (r:1 w:0)
|
||||||
|
// Storage: Balances Locks (r:1 w:1)
|
||||||
|
// Storage: BagsList ListNodes (r:3 w:3)
|
||||||
|
// Storage: BagsList ListBags (r:2 w:2)
|
||||||
|
fn bond_extra_transfer() -> Weight {
|
||||||
|
(98_133_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(13 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(12 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||||
|
// Storage: NominationPools BondedPools (r:1 w:1)
|
||||||
|
// Storage: NominationPools RewardPools (r:1 w:1)
|
||||||
|
// Storage: System Account (r:3 w:3)
|
||||||
|
// Storage: Staking Ledger (r:1 w:1)
|
||||||
|
// Storage: Staking Bonded (r:1 w:0)
|
||||||
|
// Storage: Balances Locks (r:1 w:1)
|
||||||
|
// Storage: BagsList ListNodes (r:2 w:2)
|
||||||
|
// Storage: BagsList ListBags (r:2 w:2)
|
||||||
|
fn bond_extra_reward() -> Weight {
|
||||||
|
(109_228_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(13 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(12 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||||
|
// Storage: NominationPools BondedPools (r:1 w:1)
|
||||||
|
// Storage: NominationPools RewardPools (r:1 w:1)
|
||||||
|
// Storage: System Account (r:1 w:1)
|
||||||
|
fn claim_payout() -> Weight {
|
||||||
|
(43_882_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||||
|
// Storage: NominationPools BondedPools (r:1 w:1)
|
||||||
|
// Storage: NominationPools RewardPools (r:1 w:1)
|
||||||
|
// Storage: System Account (r:2 w:1)
|
||||||
|
// Storage: Staking CurrentEra (r:1 w:0)
|
||||||
|
// Storage: Staking Ledger (r:1 w:1)
|
||||||
|
// Storage: Staking Nominators (r:1 w:0)
|
||||||
|
// Storage: Staking MinNominatorBond (r:1 w:0)
|
||||||
|
// Storage: Balances Locks (r:1 w:1)
|
||||||
|
// Storage: BagsList ListNodes (r:3 w:3)
|
||||||
|
// Storage: Staking Bonded (r:1 w:0)
|
||||||
|
// Storage: BagsList ListBags (r:2 w:2)
|
||||||
|
// Storage: NominationPools SubPoolsStorage (r:1 w:1)
|
||||||
|
// Storage: NominationPools CounterForSubPoolsStorage (r:1 w:1)
|
||||||
|
fn unbond() -> Weight {
|
||||||
|
(104_954_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(18 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(13 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: NominationPools BondedPools (r:1 w:0)
|
||||||
|
// Storage: Staking Ledger (r:1 w:1)
|
||||||
|
// Storage: Staking CurrentEra (r:1 w:0)
|
||||||
|
// Storage: Balances Locks (r:1 w:1)
|
||||||
|
fn pool_withdraw_unbonded(s: u32, ) -> Weight {
|
||||||
|
(34_903_000 as Weight)
|
||||||
|
// Standard Error: 0
|
||||||
|
.saturating_add((26_000 as Weight).saturating_mul(s as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||||
|
// Storage: Staking CurrentEra (r:1 w:0)
|
||||||
|
// Storage: NominationPools BondedPools (r:1 w:1)
|
||||||
|
// Storage: NominationPools SubPoolsStorage (r:1 w:1)
|
||||||
|
// Storage: Staking Ledger (r:1 w:1)
|
||||||
|
// Storage: Balances Locks (r:1 w:1)
|
||||||
|
// Storage: System Account (r:1 w:1)
|
||||||
|
// Storage: NominationPools CounterForPoolMembers (r:1 w:1)
|
||||||
|
fn withdraw_unbonded_update(s: u32, ) -> Weight {
|
||||||
|
(70_736_000 as Weight)
|
||||||
|
// Standard Error: 1_000
|
||||||
|
.saturating_add((35_000 as Weight).saturating_mul(s as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(8 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(7 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||||
|
// Storage: Staking CurrentEra (r:1 w:0)
|
||||||
|
// Storage: NominationPools BondedPools (r:1 w:1)
|
||||||
|
// Storage: NominationPools SubPoolsStorage (r:1 w:1)
|
||||||
|
// Storage: Staking Ledger (r:1 w:1)
|
||||||
|
// Storage: Staking Bonded (r:1 w:1)
|
||||||
|
// Storage: Staking SlashingSpans (r:1 w:0)
|
||||||
|
// Storage: Staking Validators (r:1 w:0)
|
||||||
|
// Storage: Staking Nominators (r:1 w:0)
|
||||||
|
// Storage: System Account (r:2 w:2)
|
||||||
|
// Storage: Balances Locks (r:1 w:1)
|
||||||
|
// Storage: NominationPools CounterForPoolMembers (r:1 w:1)
|
||||||
|
// Storage: NominationPools ReversePoolIdLookup (r:1 w:1)
|
||||||
|
// Storage: NominationPools CounterForReversePoolIdLookup (r:1 w:1)
|
||||||
|
// Storage: NominationPools RewardPools (r:1 w:1)
|
||||||
|
// Storage: NominationPools CounterForRewardPools (r:1 w:1)
|
||||||
|
// Storage: NominationPools CounterForSubPoolsStorage (r:1 w:1)
|
||||||
|
// Storage: NominationPools CounterForBondedPools (r:1 w:1)
|
||||||
|
// Storage: Staking Payee (r:0 w:1)
|
||||||
|
fn withdraw_unbonded_kill(_s: u32, ) -> Weight {
|
||||||
|
(124_735_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(19 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(16 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: Staking MinNominatorBond (r:1 w:0)
|
||||||
|
// Storage: NominationPools MinCreateBond (r:1 w:0)
|
||||||
|
// Storage: NominationPools MinJoinBond (r:1 w:0)
|
||||||
|
// Storage: NominationPools MaxPools (r:1 w:0)
|
||||||
|
// Storage: NominationPools CounterForBondedPools (r:1 w:1)
|
||||||
|
// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||||
|
// Storage: NominationPools LastPoolId (r:1 w:1)
|
||||||
|
// Storage: NominationPools MaxPoolMembersPerPool (r:1 w:0)
|
||||||
|
// Storage: NominationPools MaxPoolMembers (r:1 w:0)
|
||||||
|
// Storage: NominationPools CounterForPoolMembers (r:1 w:1)
|
||||||
|
// Storage: System Account (r:2 w:2)
|
||||||
|
// Storage: Staking Ledger (r:1 w:1)
|
||||||
|
// Storage: Staking Bonded (r:1 w:1)
|
||||||
|
// Storage: Staking CurrentEra (r:1 w:0)
|
||||||
|
// Storage: Staking HistoryDepth (r:1 w:0)
|
||||||
|
// Storage: Balances Locks (r:1 w:1)
|
||||||
|
// Storage: NominationPools RewardPools (r:1 w:1)
|
||||||
|
// Storage: NominationPools CounterForRewardPools (r:1 w:1)
|
||||||
|
// Storage: NominationPools ReversePoolIdLookup (r:1 w:1)
|
||||||
|
// Storage: NominationPools CounterForReversePoolIdLookup (r:1 w:1)
|
||||||
|
// Storage: NominationPools BondedPools (r:1 w:1)
|
||||||
|
// Storage: Staking Payee (r:0 w:1)
|
||||||
|
fn create() -> Weight {
|
||||||
|
(115_479_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(22 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(15 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: NominationPools BondedPools (r:1 w:0)
|
||||||
|
// Storage: Staking Ledger (r:1 w:0)
|
||||||
|
// Storage: Staking MinNominatorBond (r:1 w:0)
|
||||||
|
// Storage: Staking Nominators (r:1 w:1)
|
||||||
|
// Storage: Staking MaxNominatorsCount (r:1 w:0)
|
||||||
|
// Storage: Staking Validators (r:2 w:0)
|
||||||
|
// Storage: Staking CurrentEra (r:1 w:0)
|
||||||
|
// Storage: Staking Bonded (r:1 w:0)
|
||||||
|
// Storage: BagsList ListNodes (r:1 w:1)
|
||||||
|
// Storage: BagsList ListBags (r:1 w:1)
|
||||||
|
// Storage: BagsList CounterForListNodes (r:1 w:1)
|
||||||
|
// Storage: Staking CounterForNominators (r:1 w:1)
|
||||||
|
fn nominate(n: u32, ) -> Weight {
|
||||||
|
(41_646_000 as Weight)
|
||||||
|
// Standard Error: 8_000
|
||||||
|
.saturating_add((2_015_000 as Weight).saturating_mul(n as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(12 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(5 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: NominationPools BondedPools (r:1 w:1)
|
||||||
|
// Storage: Staking Ledger (r:1 w:0)
|
||||||
|
fn set_state() -> Weight {
|
||||||
|
(19_703_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: NominationPools BondedPools (r:1 w:0)
|
||||||
|
// Storage: NominationPools Metadata (r:1 w:1)
|
||||||
|
// Storage: NominationPools CounterForMetadata (r:1 w:1)
|
||||||
|
fn set_metadata(n: u32, ) -> Weight {
|
||||||
|
(8_863_000 as Weight)
|
||||||
|
// Standard Error: 0
|
||||||
|
.saturating_add((1_000 as Weight).saturating_mul(n as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: NominationPools MinJoinBond (r:0 w:1)
|
||||||
|
// Storage: NominationPools MaxPoolMembers (r:0 w:1)
|
||||||
|
// Storage: NominationPools MaxPoolMembersPerPool (r:0 w:1)
|
||||||
|
// Storage: NominationPools MinCreateBond (r:0 w:1)
|
||||||
|
// Storage: NominationPools MaxPools (r:0 w:1)
|
||||||
|
fn set_configs() -> Weight {
|
||||||
|
(2_333_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().writes(5 as Weight))
|
||||||
|
}
|
||||||
|
// Storage: NominationPools BondedPools (r:1 w:1)
|
||||||
|
fn update_roles() -> Weight {
|
||||||
|
(15_619_000 as Weight)
|
||||||
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -990,7 +990,8 @@ impl sp_runtime::traits::Convert<Balance, sp_core::U256> for BalanceToU256 {
|
|||||||
pub struct U256ToBalance;
|
pub struct U256ToBalance;
|
||||||
impl sp_runtime::traits::Convert<sp_core::U256, Balance> for U256ToBalance {
|
impl sp_runtime::traits::Convert<sp_core::U256, Balance> for U256ToBalance {
|
||||||
fn convert(n: sp_core::U256) -> Balance {
|
fn convert(n: sp_core::U256) -> Balance {
|
||||||
n.try_into().unwrap_or(Balance::MAX)
|
use frame_support::traits::Defensive;
|
||||||
|
n.try_into().defensive_unwrap_or(Balance::MAX)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1686,6 +1687,8 @@ sp_api::impl_runtime_apis! {
|
|||||||
hex_literal::hex!("63f78c98723ddc9073523ef3beefda0ca95dac46c07a40d91506e7637ec4ba57").to_vec().into(),
|
hex_literal::hex!("63f78c98723ddc9073523ef3beefda0ca95dac46c07a40d91506e7637ec4ba57").to_vec().into(),
|
||||||
// Configuration ActiveConfig
|
// Configuration ActiveConfig
|
||||||
hex_literal::hex!("06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385").to_vec().into(),
|
hex_literal::hex!("06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385").to_vec().into(),
|
||||||
|
// The transactional storage limit.
|
||||||
|
hex_literal::hex!("3a7472616e73616374696f6e5f6c6576656c3a").to_vec().into(),
|
||||||
];
|
];
|
||||||
|
|
||||||
let mut batches = Vec::<BenchmarkBatch>::new();
|
let mut batches = Vec::<BenchmarkBatch>::new();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2022 Parity Technologies (UK) Ltd.
|
// Copyright 2017-2022 Parity Technologies (UK) Ltd.
|
||||||
// This file is part of Polkadot.
|
// This file is part of Polkadot.
|
||||||
|
|
||||||
// Polkadot is free software: you can redistribute it and/or modify
|
// Polkadot is free software: you can redistribute it and/or modify
|
||||||
@@ -13,14 +13,14 @@
|
|||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//! Autogenerated weights for `pallet_multisig`
|
//! Autogenerated weights for `pallet_nomination_pools`
|
||||||
//!
|
//!
|
||||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
|
||||||
//! DATE: 2022-04-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
//! DATE: 2022-05-10, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
||||||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024
|
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024
|
||||||
|
|
||||||
// Executed Command:
|
// Executed Command:
|
||||||
// ./target/production/polkadot
|
// target/production/polkadot
|
||||||
// benchmark
|
// benchmark
|
||||||
// pallet
|
// pallet
|
||||||
// --chain=westend-dev
|
// --chain=westend-dev
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
// --wasm-execution=compiled
|
// --wasm-execution=compiled
|
||||||
// --heap-pages=4096
|
// --heap-pages=4096
|
||||||
// --header=./file_header.txt
|
// --header=./file_header.txt
|
||||||
// --output=./runtime/westend/src/weights/pallet_nomination_pools.rs
|
// --output=./runtime/westend/src/weights/
|
||||||
|
|
||||||
#![cfg_attr(rustfmt, rustfmt_skip)]
|
#![cfg_attr(rustfmt, rustfmt_skip)]
|
||||||
#![allow(unused_parens)]
|
#![allow(unused_parens)]
|
||||||
@@ -44,7 +44,6 @@ use sp_std::marker::PhantomData;
|
|||||||
/// Weight functions for `pallet_nomination_pools`.
|
/// Weight functions for `pallet_nomination_pools`.
|
||||||
pub struct WeightInfo<T>(PhantomData<T>);
|
pub struct WeightInfo<T>(PhantomData<T>);
|
||||||
impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo<T> {
|
impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo<T> {
|
||||||
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
|
|
||||||
// Storage: NominationPools MinJoinBond (r:1 w:0)
|
// Storage: NominationPools MinJoinBond (r:1 w:0)
|
||||||
// Storage: NominationPools PoolMembers (r:1 w:1)
|
// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||||
// Storage: NominationPools BondedPools (r:1 w:1)
|
// Storage: NominationPools BondedPools (r:1 w:1)
|
||||||
@@ -59,11 +58,10 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
|
|||||||
// Storage: BagsList ListNodes (r:3 w:3)
|
// Storage: BagsList ListNodes (r:3 w:3)
|
||||||
// Storage: BagsList ListBags (r:2 w:2)
|
// Storage: BagsList ListBags (r:2 w:2)
|
||||||
fn join() -> Weight {
|
fn join() -> Weight {
|
||||||
(117_870_000 as Weight)
|
(108_606_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(18 as Weight))
|
.saturating_add(T::DbWeight::get().reads(17 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(12 as Weight))
|
.saturating_add(T::DbWeight::get().writes(11 as Weight))
|
||||||
}
|
}
|
||||||
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
|
|
||||||
// Storage: NominationPools PoolMembers (r:1 w:1)
|
// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||||
// Storage: NominationPools BondedPools (r:1 w:1)
|
// Storage: NominationPools BondedPools (r:1 w:1)
|
||||||
// Storage: NominationPools RewardPools (r:1 w:1)
|
// Storage: NominationPools RewardPools (r:1 w:1)
|
||||||
@@ -74,11 +72,10 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
|
|||||||
// Storage: BagsList ListNodes (r:3 w:3)
|
// Storage: BagsList ListNodes (r:3 w:3)
|
||||||
// Storage: BagsList ListBags (r:2 w:2)
|
// Storage: BagsList ListBags (r:2 w:2)
|
||||||
fn bond_extra_transfer() -> Weight {
|
fn bond_extra_transfer() -> Weight {
|
||||||
(110_176_000 as Weight)
|
(99_112_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(14 as Weight))
|
.saturating_add(T::DbWeight::get().reads(13 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(13 as Weight))
|
.saturating_add(T::DbWeight::get().writes(12 as Weight))
|
||||||
}
|
}
|
||||||
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
|
|
||||||
// Storage: NominationPools PoolMembers (r:1 w:1)
|
// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||||
// Storage: NominationPools BondedPools (r:1 w:1)
|
// Storage: NominationPools BondedPools (r:1 w:1)
|
||||||
// Storage: NominationPools RewardPools (r:1 w:1)
|
// Storage: NominationPools RewardPools (r:1 w:1)
|
||||||
@@ -86,24 +83,22 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
|
|||||||
// Storage: Staking Ledger (r:1 w:1)
|
// Storage: Staking Ledger (r:1 w:1)
|
||||||
// Storage: Staking Bonded (r:1 w:0)
|
// Storage: Staking Bonded (r:1 w:0)
|
||||||
// Storage: Balances Locks (r:1 w:1)
|
// Storage: Balances Locks (r:1 w:1)
|
||||||
// Storage: BagsList ListNodes (r:2 w:2)
|
// Storage: BagsList ListNodes (r:3 w:3)
|
||||||
// Storage: BagsList ListBags (r:2 w:2)
|
// Storage: BagsList ListBags (r:2 w:2)
|
||||||
fn bond_extra_reward() -> Weight {
|
fn bond_extra_reward() -> Weight {
|
||||||
(122_829_000 as Weight)
|
(117_308_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(14 as Weight))
|
.saturating_add(T::DbWeight::get().reads(14 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(13 as Weight))
|
.saturating_add(T::DbWeight::get().writes(13 as Weight))
|
||||||
}
|
}
|
||||||
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
|
|
||||||
// Storage: NominationPools PoolMembers (r:1 w:1)
|
// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||||
// Storage: NominationPools BondedPools (r:1 w:1)
|
// Storage: NominationPools BondedPools (r:1 w:1)
|
||||||
// Storage: NominationPools RewardPools (r:1 w:1)
|
// Storage: NominationPools RewardPools (r:1 w:1)
|
||||||
// Storage: System Account (r:1 w:1)
|
// Storage: System Account (r:1 w:1)
|
||||||
fn claim_payout() -> Weight {
|
fn claim_payout() -> Weight {
|
||||||
(50_094_000 as Weight)
|
(46_249_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(5 as Weight))
|
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||||
}
|
}
|
||||||
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
|
|
||||||
// Storage: NominationPools PoolMembers (r:1 w:1)
|
// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||||
// Storage: NominationPools BondedPools (r:1 w:1)
|
// Storage: NominationPools BondedPools (r:1 w:1)
|
||||||
// Storage: NominationPools RewardPools (r:1 w:1)
|
// Storage: NominationPools RewardPools (r:1 w:1)
|
||||||
@@ -119,23 +114,21 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
|
|||||||
// Storage: NominationPools SubPoolsStorage (r:1 w:1)
|
// Storage: NominationPools SubPoolsStorage (r:1 w:1)
|
||||||
// Storage: NominationPools CounterForSubPoolsStorage (r:1 w:1)
|
// Storage: NominationPools CounterForSubPoolsStorage (r:1 w:1)
|
||||||
fn unbond() -> Weight {
|
fn unbond() -> Weight {
|
||||||
(119_288_000 as Weight)
|
(104_620_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(19 as Weight))
|
.saturating_add(T::DbWeight::get().reads(18 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(14 as Weight))
|
.saturating_add(T::DbWeight::get().writes(13 as Weight))
|
||||||
}
|
}
|
||||||
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
|
|
||||||
// Storage: NominationPools BondedPools (r:1 w:0)
|
// Storage: NominationPools BondedPools (r:1 w:0)
|
||||||
// Storage: Staking Ledger (r:1 w:1)
|
// Storage: Staking Ledger (r:1 w:1)
|
||||||
// Storage: Staking CurrentEra (r:1 w:0)
|
// Storage: Staking CurrentEra (r:1 w:0)
|
||||||
// Storage: Balances Locks (r:1 w:1)
|
// Storage: Balances Locks (r:1 w:1)
|
||||||
fn pool_withdraw_unbonded(s: u32, ) -> Weight {
|
fn pool_withdraw_unbonded(s: u32, ) -> Weight {
|
||||||
(39_986_000 as Weight)
|
(35_407_000 as Weight)
|
||||||
// Standard Error: 0
|
// Standard Error: 0
|
||||||
.saturating_add((50_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((26_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||||
}
|
}
|
||||||
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
|
|
||||||
// Storage: NominationPools PoolMembers (r:1 w:1)
|
// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||||
// Storage: Staking CurrentEra (r:1 w:0)
|
// Storage: Staking CurrentEra (r:1 w:0)
|
||||||
// Storage: NominationPools BondedPools (r:1 w:1)
|
// Storage: NominationPools BondedPools (r:1 w:1)
|
||||||
@@ -145,13 +138,12 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
|
|||||||
// Storage: System Account (r:1 w:1)
|
// Storage: System Account (r:1 w:1)
|
||||||
// Storage: NominationPools CounterForPoolMembers (r:1 w:1)
|
// Storage: NominationPools CounterForPoolMembers (r:1 w:1)
|
||||||
fn withdraw_unbonded_update(s: u32, ) -> Weight {
|
fn withdraw_unbonded_update(s: u32, ) -> Weight {
|
||||||
(76_897_000 as Weight)
|
(71_250_000 as Weight)
|
||||||
// Standard Error: 0
|
// Standard Error: 0
|
||||||
.saturating_add((48_000 as Weight).saturating_mul(s as Weight))
|
.saturating_add((42_000 as Weight).saturating_mul(s as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(9 as Weight))
|
.saturating_add(T::DbWeight::get().reads(8 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
.saturating_add(T::DbWeight::get().writes(7 as Weight))
|
||||||
}
|
}
|
||||||
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
|
|
||||||
// Storage: NominationPools PoolMembers (r:1 w:1)
|
// Storage: NominationPools PoolMembers (r:1 w:1)
|
||||||
// Storage: Staking CurrentEra (r:1 w:0)
|
// Storage: Staking CurrentEra (r:1 w:0)
|
||||||
// Storage: NominationPools BondedPools (r:1 w:1)
|
// Storage: NominationPools BondedPools (r:1 w:1)
|
||||||
@@ -171,12 +163,13 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
|
|||||||
// Storage: NominationPools CounterForSubPoolsStorage (r:1 w:1)
|
// Storage: NominationPools CounterForSubPoolsStorage (r:1 w:1)
|
||||||
// Storage: NominationPools CounterForBondedPools (r:1 w:1)
|
// Storage: NominationPools CounterForBondedPools (r:1 w:1)
|
||||||
// Storage: Staking Payee (r:0 w:1)
|
// Storage: Staking Payee (r:0 w:1)
|
||||||
fn withdraw_unbonded_kill(_s: u32, ) -> Weight {
|
fn withdraw_unbonded_kill(s: u32, ) -> Weight {
|
||||||
(135_837_000 as Weight)
|
(125_903_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(20 as Weight))
|
// Standard Error: 1_000
|
||||||
.saturating_add(T::DbWeight::get().writes(17 as Weight))
|
.saturating_add((1_000 as Weight).saturating_mul(s as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().reads(19 as Weight))
|
||||||
|
.saturating_add(T::DbWeight::get().writes(16 as Weight))
|
||||||
}
|
}
|
||||||
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
|
|
||||||
// Storage: Staking MinNominatorBond (r:1 w:0)
|
// Storage: Staking MinNominatorBond (r:1 w:0)
|
||||||
// Storage: NominationPools MinCreateBond (r:1 w:0)
|
// Storage: NominationPools MinCreateBond (r:1 w:0)
|
||||||
// Storage: NominationPools MinJoinBond (r:1 w:0)
|
// Storage: NominationPools MinJoinBond (r:1 w:0)
|
||||||
@@ -200,9 +193,9 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
|
|||||||
// Storage: NominationPools BondedPools (r:1 w:1)
|
// Storage: NominationPools BondedPools (r:1 w:1)
|
||||||
// Storage: Staking Payee (r:0 w:1)
|
// Storage: Staking Payee (r:0 w:1)
|
||||||
fn create() -> Weight {
|
fn create() -> Weight {
|
||||||
(129_265_000 as Weight)
|
(113_124_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(23 as Weight))
|
.saturating_add(T::DbWeight::get().reads(22 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(16 as Weight))
|
.saturating_add(T::DbWeight::get().writes(15 as Weight))
|
||||||
}
|
}
|
||||||
// Storage: NominationPools BondedPools (r:1 w:0)
|
// Storage: NominationPools BondedPools (r:1 w:0)
|
||||||
// Storage: Staking Ledger (r:1 w:0)
|
// Storage: Staking Ledger (r:1 w:0)
|
||||||
@@ -212,22 +205,22 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
|
|||||||
// Storage: Staking Validators (r:2 w:0)
|
// Storage: Staking Validators (r:2 w:0)
|
||||||
// Storage: Staking CurrentEra (r:1 w:0)
|
// Storage: Staking CurrentEra (r:1 w:0)
|
||||||
// Storage: Staking Bonded (r:1 w:0)
|
// Storage: Staking Bonded (r:1 w:0)
|
||||||
// Storage: BagsList ListNodes (r:1 w:1)
|
// Storage: BagsList ListNodes (r:2 w:2)
|
||||||
// Storage: BagsList ListBags (r:1 w:1)
|
// Storage: BagsList ListBags (r:1 w:1)
|
||||||
// Storage: BagsList CounterForListNodes (r:1 w:1)
|
// Storage: BagsList CounterForListNodes (r:1 w:1)
|
||||||
// Storage: Staking CounterForNominators (r:1 w:1)
|
// Storage: Staking CounterForNominators (r:1 w:1)
|
||||||
fn nominate(n: u32, ) -> Weight {
|
fn nominate(n: u32, ) -> Weight {
|
||||||
(45_546_000 as Weight)
|
(46_574_000 as Weight)
|
||||||
// Standard Error: 11_000
|
// Standard Error: 13_000
|
||||||
.saturating_add((2_075_000 as Weight).saturating_mul(n as Weight))
|
.saturating_add((1_992_000 as Weight).saturating_mul(n as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(12 as Weight))
|
.saturating_add(T::DbWeight::get().reads(13 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
|
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
|
||||||
.saturating_add(T::DbWeight::get().writes(5 as Weight))
|
.saturating_add(T::DbWeight::get().writes(6 as Weight))
|
||||||
}
|
}
|
||||||
// Storage: NominationPools BondedPools (r:1 w:1)
|
// Storage: NominationPools BondedPools (r:1 w:1)
|
||||||
// Storage: Staking Ledger (r:1 w:0)
|
// Storage: Staking Ledger (r:1 w:0)
|
||||||
fn set_state() -> Weight {
|
fn set_state() -> Weight {
|
||||||
(23_256_000 as Weight)
|
(19_838_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
@@ -235,7 +228,7 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
|
|||||||
// Storage: NominationPools Metadata (r:1 w:1)
|
// Storage: NominationPools Metadata (r:1 w:1)
|
||||||
// Storage: NominationPools CounterForMetadata (r:1 w:1)
|
// Storage: NominationPools CounterForMetadata (r:1 w:1)
|
||||||
fn set_metadata(n: u32, ) -> Weight {
|
fn set_metadata(n: u32, ) -> Weight {
|
||||||
(10_893_000 as Weight)
|
(8_733_000 as Weight)
|
||||||
// Standard Error: 0
|
// Standard Error: 0
|
||||||
.saturating_add((1_000 as Weight).saturating_mul(n as Weight))
|
.saturating_add((1_000 as Weight).saturating_mul(n as Weight))
|
||||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||||
@@ -247,7 +240,7 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
|
|||||||
// Storage: NominationPools MinCreateBond (r:0 w:1)
|
// Storage: NominationPools MinCreateBond (r:0 w:1)
|
||||||
// Storage: NominationPools MaxPools (r:0 w:1)
|
// Storage: NominationPools MaxPools (r:0 w:1)
|
||||||
fn set_configs() -> Weight {
|
fn set_configs() -> Weight {
|
||||||
(2_793_000 as Weight)
|
(2_160_000 as Weight)
|
||||||
.saturating_add(T::DbWeight::get().writes(5 as Weight))
|
.saturating_add(T::DbWeight::get().writes(5 as Weight))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,4 +251,3 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
|
|||||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Generated
+4484
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user