This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add Nomination Pools to Kusama #5447
Merged
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
6b37896
add nomination pools to kusama
kianenigma 67225a8
Update runtime/kusama/src/lib.rs
kianenigma 029fd18
Update runtime/kusama/src/lib.rs
kianenigma ae39a62
Merge branch 'master' of github.com:paritytech/polkadot into kiz-nomp…
kianenigma a097b41
probably fix build
kianenigma 96eae22
Merge branch 'kiz-nompools-ksm' of github.com:paritytech/polkadot int…
kianenigma 8fd16e0
really fix build
kianenigma 5ae626a
fix benches
kianenigma 738b786
cargo run --quiet --profile=production --features=runtime-benchmarks…
7e9a581
Merge branch 'master' of https://github.com/paritytech/polkadot into …
0cbb475
cargo run --quiet --profile=production --features=runtime-benchmarks…
d6d040f
whitelist transactional storage limit
kianenigma 2044060
Merge branch 'kiz-nompools-ksm' of github.com:paritytech/polkadot int…
kianenigma 6745514
make defensive
kianenigma 68c216f
fix
kianenigma 3b1c8d2
Merge branch 'master' of https://github.com/paritytech/polkadot into …
95a4026
cargo run --quiet --profile=production --features=runtime-benchmarks…
c0943e2
Merge branch 'master' of github.com:paritytech/polkadot into kiz-nomp…
kianenigma dee57e7
update
kianenigma 1f352f2
Merge branch 'kiz-nompools-ksm' of github.com:paritytech/polkadot int…
kianenigma 394cdb8
fix benches
kianenigma 4c027f3
cargo run --quiet --profile=production --features=runtime-benchmarks…
54a2cbd
change head
kianenigma 0754fa2
Merge branch 'kiz-nompools-ksm' of github.com:paritytech/polkadot int…
kianenigma b3553d7
fmt
kianenigma File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,254 @@ | ||
// Copyright 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_multisig` | ||
//! | ||
//! 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: `[]` | ||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024 | ||
|
||
// Executed Command: | ||
// ./target/production/polkadot | ||
// 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/pallet_nomination_pools.rs | ||
|
||
#![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: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) | ||
kianenigma marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// 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 { | ||
(117_870_000 as Weight) | ||
.saturating_add(T::DbWeight::get().reads(18 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 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 { | ||
(110_176_000 as Weight) | ||
.saturating_add(T::DbWeight::get().reads(14 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 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 { | ||
(122_829_000 as Weight) | ||
.saturating_add(T::DbWeight::get().reads(14 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 BondedPools (r:1 w:1) | ||
// Storage: NominationPools RewardPools (r:1 w:1) | ||
// Storage: System Account (r:1 w:1) | ||
fn claim_payout() -> Weight { | ||
(50_094_000 as Weight) | ||
.saturating_add(T::DbWeight::get().reads(5 as Weight)) | ||
.saturating_add(T::DbWeight::get().writes(5 as Weight)) | ||
} | ||
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) | ||
// 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 { | ||
(119_288_000 as Weight) | ||
.saturating_add(T::DbWeight::get().reads(19 as Weight)) | ||
.saturating_add(T::DbWeight::get().writes(14 as Weight)) | ||
} | ||
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) | ||
// 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 { | ||
(39_986_000 as Weight) | ||
// Standard Error: 0 | ||
.saturating_add((50_000 as Weight).saturating_mul(s as Weight)) | ||
.saturating_add(T::DbWeight::get().reads(5 as Weight)) | ||
.saturating_add(T::DbWeight::get().writes(3 as Weight)) | ||
} | ||
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) | ||
// 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 { | ||
(76_897_000 as Weight) | ||
// Standard Error: 0 | ||
.saturating_add((48_000 as Weight).saturating_mul(s as Weight)) | ||
.saturating_add(T::DbWeight::get().reads(9 as Weight)) | ||
.saturating_add(T::DbWeight::get().writes(8 as Weight)) | ||
} | ||
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) | ||
// 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 { | ||
(135_837_000 as Weight) | ||
.saturating_add(T::DbWeight::get().reads(20 as Weight)) | ||
.saturating_add(T::DbWeight::get().writes(17 as Weight)) | ||
} | ||
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) | ||
// 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 { | ||
(129_265_000 as Weight) | ||
.saturating_add(T::DbWeight::get().reads(23 as Weight)) | ||
.saturating_add(T::DbWeight::get().writes(16 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 { | ||
(45_546_000 as Weight) | ||
// Standard Error: 11_000 | ||
.saturating_add((2_075_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 { | ||
(23_256_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 { | ||
(10_893_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_793_000 as Weight) | ||
.saturating_add(T::DbWeight::get().writes(5 as Weight)) | ||
} | ||
} | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a defensive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both yes and no: OTTMY this will when the total issuance of Polkadot grows equivalent of like 100 years or so.
For now, I am going to mark it as defensive anyways, that's a good practice.
@emostov this something that you can chime in if you still recall the details.