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
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> * Update runtime/westend/src/lib.rs Co-authored-by: Nitwit <[email protected]> * cargo update -p sp-io * add signed extension as well * Revert "add signed extension as well" This reverts commit deb936f. * 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 <[email protected]>
- Loading branch information
Showing
13 changed files
with
614 additions
and
180 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)) | ||
} | ||
} |
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
Oops, something went wrong.