mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 07:01:03 +00:00
9a6f43ab8f
* add voter bags generation script and generated values for all runtimes * VoterBagThresholds for test-runtime * semicolon * turns out the header is called file_header.txt * perform benchmarks to get real numbers * add note about when to re-run this script * Suggestions for #3413 (Store voters in unsorted bags companion) (#3488) Co-authored-by: Andronik Ordian <write@reusable.software> Co-authored-by: parity-processbot <> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: radupopa2010 <radupopa2010@yahoo.com> Co-authored-by: CI system <> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: thiolliere <gui.thiolliere@gmail.com> Co-authored-by: André Silva <andrerfosilva@gmail.com> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> Co-authored-by: Bernhard Schuster <bernhard@ahoi.io> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Robert Habermeier <rphmeier@gmail.com> Co-authored-by: Robert Klotzner <eskimor@users.noreply.github.com> Co-authored-by: Alexander Theißen <alex.theissen@me.com> Co-authored-by: Lldenaurois <ljdenaurois@gmail.com> Co-authored-by: Qinxuan Chen <koushiro.cqx@gmail.com> Co-authored-by: Seun Lanlege <seun@parity.io> Co-authored-by: Denis Pisarev <denis.pisarev@parity.io> Co-authored-by: Andreas Doerr <adoerr@users.noreply.github.com> Co-authored-by: Chevdor <chevdor@users.noreply.github.com> Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com> Co-authored-by: Denis Tsai <denistsai@aetheras.io> Co-authored-by: Pierre Besson <pierre.besson@parity.io> Co-authored-by: kianenigma <kian@parity.io> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Xiliang Chen <xlchen1291@gmail.com> Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com> Co-authored-by: ferrell-code <automatedcharlesferrell@gmail.com> Co-authored-by: Shaun W <spxwang@gmail.com> * Try resolve Cargo.lock conflicts * Add temp VoterSnapshotPerBlock value to compile * Improve voter_bags test with nominator/validator breakdown * Remove miner.log * Update README * Module doc comments * Build working * remote-ext-tests very WIP * Remove system module query * formatting and log target * clean up * Save * Fix issues with polkadot runtime after mergin * Save * Some updates to runtimes to make sure things compile * save * udpate weights * Use UseNominatorsAndUpdateBagsList * make remote-ext tests a bin * Adjust remote-ext test to use pub; update some comments * Use list_bags_get * Try fix cargo.lock * Gate kusama feat code * Carg.lock .. again * point bags-list deps to master * Update voter-bags CLI to take total issuance and min balance as args * Switch polkadot runtime to UseNominatorMap * Some tweaks to the remote-test * Delete some stuff for polkadot; comments * Various fixes * Add comment for VoterSnapshotPerBlock * Remove bags-list import from polakdot cargo * use benchmarking feature for pallet-bags-list * Add custom migration for westend and kusama for bags-list * :facepalm * Fix kusama runtime * Small clean up * Be more alphabetical ordered * Use 22_500 for VoterSnapshotPerBlock * point back to master * remove unused type * SortedListProvider for staking runtime * Remove polkadot for remote-ext bags test * Revert "Remove polkadot for remote-ext bags test" This reverts commit 3608c466002063761cd669880a00b2e05c1ff7d1. * Remove polkadot for remote-ext bags test * update Substrate Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com> Co-authored-by: Andronik Ordian <write@reusable.software> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: radupopa2010 <radupopa2010@yahoo.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: thiolliere <gui.thiolliere@gmail.com> Co-authored-by: André Silva <andrerfosilva@gmail.com> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> Co-authored-by: Bernhard Schuster <bernhard@ahoi.io> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Robert Habermeier <rphmeier@gmail.com> Co-authored-by: Robert Klotzner <eskimor@users.noreply.github.com> Co-authored-by: Alexander Theißen <alex.theissen@me.com> Co-authored-by: Lldenaurois <ljdenaurois@gmail.com> Co-authored-by: Qinxuan Chen <koushiro.cqx@gmail.com> Co-authored-by: Seun Lanlege <seun@parity.io> Co-authored-by: Denis Pisarev <denis.pisarev@parity.io> Co-authored-by: Andreas Doerr <adoerr@users.noreply.github.com> Co-authored-by: Chevdor <chevdor@users.noreply.github.com> Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com> Co-authored-by: Denis Tsai <denistsai@aetheras.io> Co-authored-by: Pierre Besson <pierre.besson@parity.io> Co-authored-by: kianenigma <kian@parity.io> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Xiliang Chen <xlchen1291@gmail.com> Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com> Co-authored-by: ferrell-code <automatedcharlesferrell@gmail.com> Co-authored-by: Shaun W <spxwang@gmail.com> Co-authored-by: parity-processbot <>
224 lines
9.2 KiB
Rust
224 lines
9.2 KiB
Rust
// Copyright 2017-2020 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_staking`
|
|
//!
|
|
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
|
|
//! DATE: 2021-07-07, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
|
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 128
|
|
|
|
// Executed Command:
|
|
// target/release/polkadot
|
|
// benchmark
|
|
// --chain=kusama-dev
|
|
// --steps=50
|
|
// --repeat=20
|
|
// --pallet=pallet_staking
|
|
// --extrinsic=*
|
|
// --execution=wasm
|
|
// --wasm-execution=compiled
|
|
// --heap-pages=4096
|
|
// --header=./file_header.txt
|
|
// --output=runtime/kusama/src/weights/
|
|
|
|
#![allow(unused_parens)]
|
|
#![allow(unused_imports)]
|
|
|
|
use frame_support::{traits::Get, weights::Weight};
|
|
use sp_std::marker::PhantomData;
|
|
|
|
/// Weight functions for `pallet_staking`.
|
|
pub struct WeightInfo<T>(PhantomData<T>);
|
|
impl<T: frame_system::Config> pallet_staking::WeightInfo for WeightInfo<T> {
|
|
fn bond() -> Weight {
|
|
(68_673_000 as Weight)
|
|
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
|
}
|
|
fn bond_extra() -> Weight {
|
|
(57_515_000 as Weight)
|
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
|
}
|
|
fn unbond() -> Weight {
|
|
(56_018_000 as Weight)
|
|
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
|
}
|
|
fn withdraw_unbonded_update(s: u32) -> Weight {
|
|
(49_532_000 as Weight)
|
|
// Standard Error: 0
|
|
.saturating_add((29_000 as Weight).saturating_mul(s as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
|
}
|
|
fn withdraw_unbonded_kill(s: u32) -> Weight {
|
|
(81_722_000 as Weight)
|
|
// Standard Error: 1_000
|
|
.saturating_add((2_331_000 as Weight).saturating_mul(s as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(8 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(6 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
|
}
|
|
fn validate() -> Weight {
|
|
(64_915_000 as Weight)
|
|
.saturating_add(T::DbWeight::get().reads(10 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(6 as Weight))
|
|
}
|
|
fn kick(k: u32) -> Weight {
|
|
(10_120_000 as Weight)
|
|
// Standard Error: 6_000
|
|
.saturating_add((18_142_000 as Weight).saturating_mul(k as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
|
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight)))
|
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight)))
|
|
}
|
|
fn nominate(n: u32) -> Weight {
|
|
(37_716_000 as Weight)
|
|
// Standard Error: 6_000
|
|
.saturating_add((5_240_000 as Weight).saturating_mul(n as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
|
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
|
|
.saturating_add(T::DbWeight::get().writes(7 as Weight))
|
|
}
|
|
fn chill() -> Weight {
|
|
(16_594_000 as Weight).saturating_add(T::DbWeight::get().reads(3 as Weight))
|
|
}
|
|
fn set_payee() -> Weight {
|
|
(10_848_000 as Weight)
|
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
|
}
|
|
fn set_controller() -> Weight {
|
|
(23_658_000 as Weight)
|
|
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
|
}
|
|
fn set_validator_count() -> Weight {
|
|
(2_123_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
|
|
}
|
|
fn force_no_eras() -> Weight {
|
|
(2_458_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
|
|
}
|
|
fn force_new_era() -> Weight {
|
|
(2_428_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
|
|
}
|
|
fn force_new_era_always() -> Weight {
|
|
(2_435_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
|
|
}
|
|
fn set_invulnerables(v: u32) -> Weight {
|
|
(2_524_000 as Weight)
|
|
// Standard Error: 0
|
|
.saturating_add((5_000 as Weight).saturating_mul(v as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
|
}
|
|
fn force_unstake(s: u32) -> Weight {
|
|
(57_861_000 as Weight)
|
|
// Standard Error: 1_000
|
|
.saturating_add((2_315_000 as Weight).saturating_mul(s as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(6 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
|
}
|
|
fn cancel_deferred_slash(s: u32) -> Weight {
|
|
(3_460_645_000 as Weight)
|
|
// Standard Error: 221_000
|
|
.saturating_add((19_673_000 as Weight).saturating_mul(s as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
|
}
|
|
fn payout_stakers_dead_controller(n: u32) -> Weight {
|
|
(108_055_000 as Weight)
|
|
// Standard Error: 15_000
|
|
.saturating_add((49_008_000 as Weight).saturating_mul(n as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(10 as Weight))
|
|
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
|
|
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(n as Weight)))
|
|
}
|
|
fn payout_stakers_alive_staked(n: u32) -> Weight {
|
|
(122_624_000 as Weight)
|
|
// Standard Error: 22_000
|
|
.saturating_add((60_815_000 as Weight).saturating_mul(n as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(11 as Weight))
|
|
.saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight)))
|
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(n as Weight)))
|
|
}
|
|
fn rebond(l: u32) -> Weight {
|
|
(46_725_000 as Weight)
|
|
// Standard Error: 1_000
|
|
.saturating_add((61_000 as Weight).saturating_mul(l as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
|
}
|
|
fn set_history_depth(e: u32) -> Weight {
|
|
(0 as Weight)
|
|
// Standard Error: 70_000
|
|
.saturating_add((33_332_000 as Weight).saturating_mul(e as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight)))
|
|
}
|
|
fn reap_stash(s: u32) -> Weight {
|
|
(68_887_000 as Weight)
|
|
// Standard Error: 0
|
|
.saturating_add((2_318_000 as Weight).saturating_mul(s as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(8 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
|
|
}
|
|
fn new_era(v: u32, n: u32) -> Weight {
|
|
(0 as Weight)
|
|
// Standard Error: 765_000
|
|
.saturating_add((309_896_000 as Weight).saturating_mul(v as Weight))
|
|
// Standard Error: 38_000
|
|
.saturating_add((53_011_000 as Weight).saturating_mul(n as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(192 as Weight))
|
|
.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(v as Weight)))
|
|
.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(n as Weight)))
|
|
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(v as Weight)))
|
|
}
|
|
fn get_npos_voters(v: u32, n: u32, s: u32) -> Weight {
|
|
(0 as Weight)
|
|
// Standard Error: 92_000
|
|
.saturating_add((24_187_000 as Weight).saturating_mul(v as Weight))
|
|
// Standard Error: 92_000
|
|
.saturating_add((27_771_000 as Weight).saturating_mul(n as Weight))
|
|
// Standard Error: 3_152_000
|
|
.saturating_add((40_493_000 as Weight).saturating_mul(s as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
|
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight)))
|
|
.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(n as Weight)))
|
|
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight)))
|
|
}
|
|
fn get_npos_targets(v: u32) -> Weight {
|
|
(0 as Weight)
|
|
// Standard Error: 50_000
|
|
.saturating_add((10_984_000 as Weight).saturating_mul(v as Weight))
|
|
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
|
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight)))
|
|
}
|
|
fn set_staking_limits() -> Weight {
|
|
(5_708_000 as Weight).saturating_add(T::DbWeight::get().writes(5 as Weight))
|
|
}
|
|
fn chill_other() -> Weight {
|
|
(84_065_000 as Weight)
|
|
.saturating_add(T::DbWeight::get().reads(11 as Weight))
|
|
.saturating_add(T::DbWeight::get().writes(6 as Weight))
|
|
}
|
|
}
|