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 fast-unstsake pallet to all runtimes #6050
Merged
Merged
Changes from 14 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
609dea4
add fast-unstsake pallet to all runtimes
kianenigma 86e8447
".git/.scripts/fmt.sh" 1
5570416
".git/.scripts/bench-bot.sh" runtime polkadot-dev pallet_fast_unstake
6717883
".git/.scripts/bench-bot.sh" runtime westend-dev pallet_fast_unstake
205b28d
fix up all the weight stuff
kianenigma 8d6509e
update substrate
kianenigma 85d0a35
update mistake in kusama
kianenigma 22cbceb
add stub file
kianenigma 55849d7
Update runtime/polkadot/src/lib.rs
kianenigma c2a89f8
Update runtime/westend/src/lib.rs
kianenigma 60842bc
Master.into()
kianenigma 663efed
cargo update -p sp-io
kianenigma e7e552a
Merge branch 'kiz-add-fast-unstake' of github.com:paritytech/polkadot…
kianenigma deb936f
add signed extension as well
kianenigma 789cc2c
master.into()
kianenigma 95fe711
Revert "add signed extension as well"
kianenigma 3a20b00
Merge branch 'master' of github.com:paritytech/polkadot into kiz-add-…
kianenigma 6c6152e
cargo update -p sp-io
kianenigma 4cda7ec
".git/.scripts/bench-bot.sh" runtime kusama-dev pallet_fast_unstake
7cd50e3
".git/.scripts/bench-bot.sh" runtime polkadot-dev pallet_fast_unstake
d5c3a88
update sub
kianenigma 5d938c2
integrate latest substrate changes
kianenigma 6095205
Merge branch 'kiz-add-fast-unstake' of github.com:paritytech/polkadot…
kianenigma b884ebb
".git/.scripts/fmt.sh" 1
8a57b1e
".git/.scripts/bench-bot.sh" runtime westend-dev pallet_fast_unstake
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
Large diffs are not rendered by default.
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
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,122 @@ | ||
// 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-26, 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:2 w:1) | ||
// Storage: Staking Ledger (r:2 w:2) | ||
// Storage: Staking Validators (r:1 w:0) | ||
// Storage: Staking Nominators (r:1 w:0) | ||
// Storage: System Account (r:3 w:2) | ||
// Storage: Balances Locks (r:2 w:2) | ||
// Storage: NominationPools MinJoinBond (r:1 w:0) | ||
// Storage: NominationPools PoolMembers (r:1 w:1) | ||
// Storage: NominationPools BondedPools (r:1 w:1) | ||
// Storage: NominationPools RewardPools (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: VoterList ListNodes (r:1 w:0) | ||
// Storage: Staking Payee (r:0 w:1) | ||
fn on_idle_unstake() -> Weight { | ||
Weight::from_ref_time(146_928_000 as u64) | ||
.saturating_add(T::DbWeight::get().reads(25 as u64)) | ||
.saturating_add(T::DbWeight::get().writes(13 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(69_485_000 as u64) | ||
// Standard Error: 10_556 | ||
.saturating_add(Weight::from_ref_time(13_708_637 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: 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(85_439_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_885_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(4_292_000 as u64) | ||
.saturating_add(T::DbWeight::get().writes(1 as u64)) | ||
} | ||
} |
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
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.
we should see all of this gone now.