From 53fa912b7d79c367c28c878565d8a8ca9a243dfe Mon Sep 17 00:00:00 2001 From: kianenigma Date: Tue, 11 Nov 2025 10:37:59 +0000 Subject: [PATCH 01/17] add fresh weights for westend asset hub --- .../src/genesis_config_presets.rs | 2 +- .../assets/asset-hub-westend/src/lib.rs | 10 +- .../assets/asset-hub-westend/src/staking.rs | 34 ++- .../asset-hub-westend/src/weights/mod.rs | 5 +- .../pallet_election_provider_multi_block.rs | 231 ++++++++++++++++++ ...et_election_provider_multi_block_signed.rs | 197 +++++++++++++++ ..._election_provider_multi_block_unsigned.rs | 104 ++++++++ ..._election_provider_multi_block_verifier.rs | 65 +++++ .../src/weights/pallet_fast_unstake.rs | 203 --------------- 9 files changed, 620 insertions(+), 231 deletions(-) create mode 100644 cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs create mode 100644 cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_signed.rs create mode 100644 cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_unsigned.rs create mode 100644 cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_verifier.rs delete mode 100644 cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_fast_unstake.rs diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/genesis_config_presets.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/genesis_config_presets.rs index 9bd617513bc0..8af83341ffce 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/genesis_config_presets.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/genesis_config_presets.rs @@ -105,7 +105,7 @@ mod preset_names { /// Provides the JSON representation of predefined genesis config for given `id`. pub fn get_preset(id: &PresetId) -> Option> { use preset_names::*; - let dev_stakers = Some((0, 25_000)); + let dev_stakers = Some((1000, 25_000)); let patch = match id.as_ref() { PRESET_GENESIS => asset_hub_westend_genesis( // initial collators. diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 19aead366c0c..2fe1863efb39 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -835,7 +835,6 @@ impl InstanceFilter for ProxyType { RuntimeCall::Session(..) | RuntimeCall::Utility(..) | RuntimeCall::NominationPools(..) | - RuntimeCall::FastUnstake(..) | RuntimeCall::VoterList(..) ) }, @@ -1369,7 +1368,8 @@ construct_runtime!( // Staking. Staking: pallet_staking_async = 80, NominationPools: pallet_nomination_pools = 81, - FastUnstake: pallet_fast_unstake = 82, + // decommissioned in AHs. + // FastUnstake: pallet_fast_unstake = 82, VoterList: pallet_bags_list:: = 83, DelegatedStaking: pallet_delegated_staking = 84, StakingRcClient: pallet_staking_async_rc_client = 89, @@ -1679,12 +1679,10 @@ mod benches { [pallet_bags_list, VoterList] [pallet_balances, Balances] [pallet_conviction_voting, ConvictionVoting] - // Temporarily disabled due to https://github.com/paritytech/polkadot-sdk/issues/7714 - // [pallet_election_provider_multi_block, MultiBlockElection] - // [pallet_election_provider_multi_block_verifier, MultiBlockElectionVerifier] + [pallet_election_provider_multi_block, MultiBlockElection] + [pallet_election_provider_multi_block_verifier, MultiBlockElectionVerifier] [pallet_election_provider_multi_block_unsigned, MultiBlockElectionUnsigned] [pallet_election_provider_multi_block_signed, MultiBlockElectionSigned] - [pallet_fast_unstake, FastUnstake] [pallet_message_queue, MessageQueue] [pallet_migrations, MultiBlockMigrations] [pallet_multisig, Multisig] diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/staking.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/staking.rs index 908168957d06..8f90ff4104a3 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/staking.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/staking.rs @@ -17,7 +17,7 @@ use super::*; use cumulus_primitives_core::relay_chain::SessionIndex; use frame_election_provider_support::{ElectionDataProvider, SequentialPhragmen}; -use frame_support::traits::{ConstU128, EitherOf}; +use frame_support::traits::EitherOf; use pallet_election_provider_multi_block::{self as multi_block, SolutionAccuracyOf}; use pallet_staking_async::UseValidatorsMap; use pallet_staking_async_rc_client as rc_client; @@ -133,7 +133,7 @@ impl multi_block::Config for Runtime { // Revert back to signed phase if nothing is submitted and queued, so we prolong the election. type AreWeDone = multi_block::RevertToSignedIfNotQueuedOf; type OnRoundRotation = multi_block::CleanRound; - type WeightInfo = multi_block::weights::westend::MultiBlockWeightInfo; + type WeightInfo = weights::pallet_election_provider_multi_block::WeightInfo; } impl multi_block::verifier::Config for Runtime { @@ -142,7 +142,7 @@ impl multi_block::verifier::Config for Runtime { type MaxBackersPerWinnerFinal = MaxBackersPerWinnerFinal; type SolutionDataProvider = MultiBlockElectionSigned; type SolutionImprovementThreshold = SolutionImprovementThreshold; - type WeightInfo = multi_block::weights::westend::MultiBlockVerifierWeightInfo; + type WeightInfo = weights::pallet_election_provider_multi_block_verifier::WeightInfo; } parameter_types! { @@ -164,7 +164,7 @@ impl multi_block::signed::Config for Runtime { type RewardBase = RewardBase; type MaxSubmissions = MaxSubmissions; type EstimateCallFee = TransactionPayment; - type WeightInfo = multi_block::weights::westend::MultiBlockSignedWeightInfo; + type WeightInfo = weights::pallet_election_provider_multi_block_signed::WeightInfo; } parameter_types! { @@ -181,7 +181,7 @@ impl multi_block::unsigned::Config for Runtime { type OffchainSolver = SequentialPhragmen>; type MinerTxPriority = MinerTxPriority; type OffchainRepeat = OffchainRepeat; - type WeightInfo = multi_block::weights::westend::MultiBlockUnsignedWeightInfo; + type WeightInfo = weights::pallet_election_provider_multi_block_unsigned::WeightInfo; } parameter_types! { @@ -202,11 +202,16 @@ impl multi_block::unsigned::miner::MinerConfig for Runtime { type MaxVotesPerVoter = <::DataProvider as ElectionDataProvider>::MaxVotesPerVoter; type MaxLength = MinerMaxLength; - type Solver = ::OffchainSolver; type Pages = Pages; type Solution = NposCompactSolution16; type VoterSnapshotPerBlock = ::VoterSnapshotPerBlock; type TargetSnapshotPerBlock = ::TargetSnapshotPerBlock; + // for prod, use whatever solver we are using in the miner -- phragmen algorithm + #[cfg(not(feature = "runtime-benchmarks"))] + type Solver = ::OffchainSolver; + // for benchmarks, use the faster solver + #[cfg(feature = "runtime-benchmarks")] + type Solver = frame_election_provider_support::QuickDirtySolver; } parameter_types! { @@ -218,10 +223,10 @@ type VoterBagsListInstance = pallet_bags_list::Instance1; impl pallet_bags_list::Config for Runtime { type RuntimeEvent = RuntimeEvent; type ScoreProvider = Staking; - type WeightInfo = weights::pallet_bags_list::WeightInfo; type BagThresholds = BagThresholds; type Score = sp_npos_elections::VoteWeight; type MaxAutoRebagPerBlock = AutoRebagNumber; + type WeightInfo = weights::pallet_bags_list::WeightInfo; } pub struct EraPayout; @@ -291,13 +296,13 @@ impl pallet_staking_async::Config for Runtime { type HistoryDepth = frame_support::traits::ConstU32<84>; type MaxControllersInDeprecationBatch = MaxControllersInDeprecationBatch; type EventListeners = (NominationPools, DelegatedStaking); - type WeightInfo = weights::pallet_staking_async::WeightInfo; type MaxInvulnerables = frame_support::traits::ConstU32<20>; type PlanningEraOffset = pallet_staking_async::PlanningEraOffsetOf>; type RcClientInterface = StakingRcClient; type MaxEraDuration = MaxEraDuration; type MaxPruningItems = MaxPruningItems; + type WeightInfo = weights::pallet_staking_async::WeightInfo; } impl pallet_staking_async_rc_client::Config for Runtime { @@ -361,17 +366,6 @@ impl rc_client::SendToRelayChain for StakingXcmToRelayChain { } } -impl pallet_fast_unstake::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type BatchSize = ConstU32<64>; - type Deposit = ConstU128<{ UNITS }>; - type ControlOrigin = EnsureRoot; - type Staking = Staking; - type MaxErasToCheckPerBlock = ConstU32<1>; - type WeightInfo = weights::pallet_fast_unstake::WeightInfo; -} - parameter_types! { pub const PoolsPalletId: PalletId = PalletId(*b"py/nopls"); pub const MaxPointsToBalance: u8 = 10; @@ -379,7 +373,6 @@ parameter_types! { impl pallet_nomination_pools::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type WeightInfo = weights::pallet_nomination_pools::WeightInfo; type Currency = Balances; type RuntimeFreezeReason = RuntimeFreezeReason; type RewardCounter = FixedU128; @@ -396,6 +389,7 @@ impl pallet_nomination_pools::Config for Runtime { type AdminOrigin = EitherOf, StakingAdmin>; type BlockNumberProvider = RelaychainDataProvider; type Filter = Nothing; + type WeightInfo = weights::pallet_nomination_pools::WeightInfo; } parameter_types! { diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/mod.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/mod.rs index 0559b559ec14..c8e94609da20 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/mod.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/mod.rs @@ -34,7 +34,10 @@ pub mod pallet_bags_list; pub mod pallet_balances; pub mod pallet_collator_selection; pub mod pallet_conviction_voting; -pub mod pallet_fast_unstake; +pub mod pallet_election_provider_multi_block; +pub mod pallet_election_provider_multi_block_signed; +pub mod pallet_election_provider_multi_block_unsigned; +pub mod pallet_election_provider_multi_block_verifier; pub mod pallet_indices; pub mod pallet_message_queue; pub mod pallet_migrations; diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs new file mode 100644 index 000000000000..1fc7109e3653 --- /dev/null +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs @@ -0,0 +1,231 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_election_provider_multi_block` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2025-10-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `9203a6611a81`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// frame-omni-bencher +// v1 +// benchmark +// pallet +// --extrinsic=* +// --runtime=target/production/wbuild/asset-hub-westend-runtime/asset_hub_westend_runtime.wasm +// --pallet=pallet_election_provider_multi_block +// --header=/__w/polkadot-sdk/polkadot-sdk/cumulus/file_header.txt +// --output=./cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights +// --wasm-execution=compiled +// --steps=50 +// --repeat=20 +// --heap-pages=4096 +// --no-storage-info +// --no-min-squares +// --no-median-slopes + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_election_provider_multi_block`. +pub struct WeightInfo(PhantomData); +impl pallet_election_provider_multi_block::WeightInfo for WeightInfo { + fn on_initialize_into_signed() -> Weight { + Default::default() + } + fn on_initialize_into_unsigned() -> Weight { + Default::default() + } + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:0) + /// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + fn on_initialize_nothing() -> Weight { + // Proof Size summary in bytes: + // Measured: `118` + // Estimated: `1603` + // Minimum execution time: 7_446_000 picoseconds. + Weight::from_parts(7_812_000, 0) + .saturating_add(Weight::from_parts(0, 1603)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:0) + /// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `Staking::ValidatorCount` (r:1 w:0) + /// Proof: `Staking::ValidatorCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `MultiBlockElection::Round` (r:1 w:0) + /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `Staking::CounterForValidators` (r:1 w:0) + /// Proof: `Staking::CounterForValidators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `Staking::Validators` (r:1001 w:0) + /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `Measured`) + /// Storage: `MultiBlockElection::DesiredTargets` (r:0 w:1) + /// Proof: `MultiBlockElection::DesiredTargets` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedTargetSnapshotHash` (r:0 w:1) + /// Proof: `MultiBlockElection::PagedTargetSnapshotHash` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedTargetSnapshot` (r:0 w:1) + /// Proof: `MultiBlockElection::PagedTargetSnapshot` (`max_values`: None, `max_size`: Some(32026), added: 34501, mode: `Measured`) + fn on_initialize_into_snapshot_msp() -> Weight { + // Proof Size summary in bytes: + // Measured: `48346` + // Estimated: `2526811` + // Minimum execution time: 5_996_743_000 picoseconds. + Weight::from_parts(6_143_499_000, 0) + .saturating_add(Weight::from_parts(0, 2526811)) + .saturating_add(T::DbWeight::get().reads(1006)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:0) + /// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `Staking::VoterSnapshotStatus` (r:1 w:1) + /// Proof: `Staking::VoterSnapshotStatus` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `Measured`) + /// Storage: `VoterList::CounterForListNodes` (r:1 w:0) + /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `VoterList::ListBags` (r:1 w:0) + /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `Measured`) + /// Storage: `VoterList::ListNodes` (r:705 w:0) + /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `Measured`) + /// Storage: `Staking::Bonded` (r:703 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `Measured`) + /// Storage: `Staking::Ledger` (r:703 w:0) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(753), added: 3228, mode: `Measured`) + /// Storage: `Staking::Nominators` (r:703 w:0) + /// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `Measured`) + /// Storage: `Staking::Validators` (r:103 w:0) + /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `Measured`) + /// Storage: `MultiBlockElection::Round` (r:1 w:0) + /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `Staking::MinimumActiveStake` (r:0 w:1) + /// Proof: `Staking::MinimumActiveStake` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `Measured`) + /// Storage: `VoterList::Lock` (r:0 w:1) + /// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedVoterSnapshot` (r:0 w:1) + /// Proof: `MultiBlockElection::PagedVoterSnapshot` (`max_values`: None, `max_size`: Some(388785), added: 391260, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedVoterSnapshotHash` (r:0 w:1) + /// Proof: `MultiBlockElection::PagedVoterSnapshotHash` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `Measured`) + fn on_initialize_into_snapshot_rest() -> Weight { + // Proof Size summary in bytes: + // Measured: `1495638` + // Estimated: `3241503` + // Minimum execution time: 33_030_368_000 picoseconds. + Weight::from_parts(33_970_009_000, 0) + .saturating_add(Weight::from_parts(0, 3241503)) + .saturating_add(T::DbWeight::get().reads(2923)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) + /// Storage: `MultiBlockElection::Round` (r:1 w:0) + /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:0) + /// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:0) + /// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + fn on_initialize_into_signed_validation() -> Weight { + // Proof Size summary in bytes: + // Measured: `592` + // Estimated: `4057` + // Minimum execution time: 50_428_000 picoseconds. + Weight::from_parts(59_050_000, 0) + .saturating_add(Weight::from_parts(0, 4057)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElection::Round` (r:1 w:0) + /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedValidVariant` (r:1 w:0) + /// Proof: `MultiBlockElectionVerifier::QueuedValidVariant` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedSolutionX` (r:1 w:0) + /// Proof: `MultiBlockElectionVerifier::QueuedSolutionX` (`max_values`: None, `max_size`: Some(33794026), added: 33796501, mode: `Measured`) + /// Storage: `Staking::CurrentEra` (r:1 w:0) + /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `Staking::ElectableStashes` (r:1 w:1) + /// Proof: `Staking::ElectableStashes` (`max_values`: Some(1), `max_size`: Some(32002), added: 32497, mode: `Measured`) + /// Storage: `Staking::ErasTotalStake` (r:1 w:1) + /// Proof: `Staking::ErasTotalStake` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `Measured`) + fn export_non_terminal() -> Weight { + // Proof Size summary in bytes: + // Measured: `1479` + // Estimated: `4944` + // Minimum execution time: 79_507_000 picoseconds. + Weight::from_parts(83_771_000, 0) + .saturating_add(Weight::from_parts(0, 4944)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElection::Round` (r:1 w:1) + /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedValidVariant` (r:1 w:1) + /// Proof: `MultiBlockElectionVerifier::QueuedValidVariant` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedSolutionX` (r:32 w:32) + /// Proof: `MultiBlockElectionVerifier::QueuedSolutionX` (`max_values`: None, `max_size`: Some(33794026), added: 33796501, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedVoterSnapshot` (r:32 w:32) + /// Proof: `MultiBlockElection::PagedVoterSnapshot` (`max_values`: None, `max_size`: Some(388785), added: 391260, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedVoterSnapshotHash` (r:32 w:32) + /// Proof: `MultiBlockElection::PagedVoterSnapshotHash` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedTargetSnapshot` (r:1 w:1) + /// Proof: `MultiBlockElection::PagedTargetSnapshot` (`max_values`: None, `max_size`: Some(32026), added: 34501, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedTargetSnapshotHash` (r:1 w:1) + /// Proof: `MultiBlockElection::PagedTargetSnapshotHash` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `Measured`) + /// Storage: `Staking::CurrentEra` (r:1 w:0) + /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `Staking::ElectableStashes` (r:1 w:1) + /// Proof: `Staking::ElectableStashes` (`max_values`: Some(1), `max_size`: Some(32002), added: 32497, mode: `Measured`) + /// Storage: `Staking::ErasTotalStake` (r:1 w:1) + /// Proof: `Staking::ErasTotalStake` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:0 w:1) + /// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedSolutionScore` (r:0 w:1) + /// Proof: `MultiBlockElectionVerifier::QueuedSolutionScore` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `Measured`) + /// Storage: `MultiBlockElection::DesiredTargets` (r:0 w:1) + /// Proof: `MultiBlockElection::DesiredTargets` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `Measured`) + fn export_terminal() -> Weight { + // Proof Size summary in bytes: + // Measured: `4847` + // Estimated: `85037` + // Minimum execution time: 288_365_000 picoseconds. + Weight::from_parts(310_587_000, 0) + .saturating_add(Weight::from_parts(0, 85037)) + .saturating_add(T::DbWeight::get().reads(104)) + .saturating_add(T::DbWeight::get().writes(106)) + } + fn manage() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 195_000 picoseconds. + Weight::from_parts(229_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } +} diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_signed.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_signed.rs new file mode 100644 index 000000000000..87d27389df80 --- /dev/null +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_signed.rs @@ -0,0 +1,197 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_election_provider_multi_block_signed` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2025-10-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `9203a6611a81`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// frame-omni-bencher +// v1 +// benchmark +// pallet +// --extrinsic=* +// --runtime=target/production/wbuild/asset-hub-westend-runtime/asset_hub_westend_runtime.wasm +// --pallet=pallet_election_provider_multi_block_signed +// --header=/__w/polkadot-sdk/polkadot-sdk/cumulus/file_header.txt +// --output=./cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights +// --wasm-execution=compiled +// --steps=50 +// --repeat=20 +// --heap-pages=4096 +// --no-storage-info +// --no-min-squares +// --no-median-slopes + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_election_provider_multi_block_signed`. +pub struct WeightInfo(PhantomData); +impl pallet_election_provider_multi_block::signed::WeightInfo for WeightInfo { + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:0) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::Invulnerables` (r:1 w:0) + /// Proof: `MultiBlockElectionSigned::Invulnerables` (`max_values`: Some(1), `max_size`: Some(513), added: 1008, mode: `Measured`) + /// Storage: `MultiBlockElection::Round` (r:1 w:0) + /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:1) + /// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SubmissionMetadataStorage` (r:0 w:1) + /// Proof: `MultiBlockElectionSigned::SubmissionMetadataStorage` (`max_values`: None, `max_size`: Some(181), added: 2656, mode: `Measured`) + fn register_not_full() -> Weight { + // Proof Size summary in bytes: + // Measured: `3252` + // Estimated: `6717` + // Minimum execution time: 82_298_000 picoseconds. + Weight::from_parts(85_205_000, 0) + .saturating_add(Weight::from_parts(0, 6717)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:0) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::Invulnerables` (r:1 w:0) + /// Proof: `MultiBlockElectionSigned::Invulnerables` (`max_values`: Some(1), `max_size`: Some(513), added: 1008, mode: `Measured`) + /// Storage: `MultiBlockElection::Round` (r:1 w:0) + /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:1) + /// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`) + /// Storage: `Balances::Holds` (r:2 w:2) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SubmissionMetadataStorage` (r:1 w:2) + /// Proof: `MultiBlockElectionSigned::SubmissionMetadataStorage` (`max_values`: None, `max_size`: Some(181), added: 2656, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SubmissionStorage` (r:32 w:32) + /// Proof: `MultiBlockElectionSigned::SubmissionStorage` (`max_values`: None, `max_size`: Some(46478), added: 48953, mode: `Measured`) + fn register_eject() -> Weight { + // Proof Size summary in bytes: + // Measured: `7851` + // Estimated: `88041` + // Minimum execution time: 222_710_000 picoseconds. + Weight::from_parts(227_768_000, 0) + .saturating_add(Weight::from_parts(0, 88041)) + .saturating_add(T::DbWeight::get().reads(39)) + .saturating_add(T::DbWeight::get().writes(37)) + } + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:0) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElection::Round` (r:1 w:0) + /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SubmissionMetadataStorage` (r:1 w:1) + /// Proof: `MultiBlockElectionSigned::SubmissionMetadataStorage` (`max_values`: None, `max_size`: Some(181), added: 2656, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::Invulnerables` (r:1 w:0) + /// Proof: `MultiBlockElectionSigned::Invulnerables` (`max_values`: Some(1), `max_size`: Some(513), added: 1008, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:0) + /// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SubmissionStorage` (r:1 w:1) + /// Proof: `MultiBlockElectionSigned::SubmissionStorage` (`max_values`: None, `max_size`: Some(46478), added: 48953, mode: `Measured`) + fn submit_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `3785` + // Estimated: `7250` + // Minimum execution time: 175_724_000 picoseconds. + Weight::from_parts(196_243_000, 0) + .saturating_add(Weight::from_parts(0, 7250)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:0) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElection::Round` (r:1 w:0) + /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SubmissionMetadataStorage` (r:1 w:1) + /// Proof: `MultiBlockElectionSigned::SubmissionMetadataStorage` (`max_values`: None, `max_size`: Some(181), added: 2656, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::Invulnerables` (r:1 w:0) + /// Proof: `MultiBlockElectionSigned::Invulnerables` (`max_values`: Some(1), `max_size`: Some(513), added: 1008, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:0) + /// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SubmissionStorage` (r:1 w:1) + /// Proof: `MultiBlockElectionSigned::SubmissionStorage` (`max_values`: None, `max_size`: Some(46478), added: 48953, mode: `Measured`) + fn unset_page() -> Weight { + // Proof Size summary in bytes: + // Measured: `3887` + // Estimated: `7352` + // Minimum execution time: 159_836_000 picoseconds. + Weight::from_parts(175_455_000, 0) + .saturating_add(Weight::from_parts(0, 7352)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(3)) + } + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:0) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElection::Round` (r:1 w:0) + /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:1) + /// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SubmissionStorage` (r:32 w:32) + /// Proof: `MultiBlockElectionSigned::SubmissionStorage` (`max_values`: None, `max_size`: Some(46478), added: 48953, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SubmissionMetadataStorage` (r:1 w:1) + /// Proof: `MultiBlockElectionSigned::SubmissionMetadataStorage` (`max_values`: None, `max_size`: Some(181), added: 2656, mode: `Measured`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `Measured`) + fn bail() -> Weight { + // Proof Size summary in bytes: + // Measured: `4717` + // Estimated: `84907` + // Minimum execution time: 138_145_000 picoseconds. + Weight::from_parts(143_634_000, 0) + .saturating_add(Weight::from_parts(0, 84907)) + .saturating_add(T::DbWeight::get().reads(37)) + .saturating_add(T::DbWeight::get().writes(35)) + } + /// Storage: `MultiBlockElection::Round` (r:1 w:0) + /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:1) + /// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SubmissionStorage` (r:32 w:32) + /// Proof: `MultiBlockElectionSigned::SubmissionStorage` (`max_values`: None, `max_size`: Some(46478), added: 48953, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SubmissionMetadataStorage` (r:1 w:1) + /// Proof: `MultiBlockElectionSigned::SubmissionMetadataStorage` (`max_values`: None, `max_size`: Some(181), added: 2656, mode: `Measured`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::Invulnerables` (r:1 w:0) + /// Proof: `MultiBlockElectionSigned::Invulnerables` (`max_values`: Some(1), `max_size`: Some(513), added: 1008, mode: `Measured`) + /// The range of component `p` is `[1, 32]`. + fn clear_old_round_data(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `3709 + p * (32 ±0)` + // Estimated: `7174 + p * (2507 ±0)` + // Minimum execution time: 83_110_000 picoseconds. + Weight::from_parts(86_716_939, 0) + .saturating_add(Weight::from_parts(0, 7174)) + // Standard Error: 8_086 + .saturating_add(Weight::from_parts(1_143_762, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) + .saturating_add(Weight::from_parts(0, 2507).saturating_mul(p.into())) + } +} diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_unsigned.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_unsigned.rs new file mode 100644 index 000000000000..093a4fcfc612 --- /dev/null +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_unsigned.rs @@ -0,0 +1,104 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_election_provider_multi_block_unsigned` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2025-10-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `9203a6611a81`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// frame-omni-bencher +// v1 +// benchmark +// pallet +// --extrinsic=* +// --runtime=target/production/wbuild/asset-hub-westend-runtime/asset_hub_westend_runtime.wasm +// --pallet=pallet_election_provider_multi_block_unsigned +// --header=/__w/polkadot-sdk/polkadot-sdk/cumulus/file_header.txt +// --output=./cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights +// --wasm-execution=compiled +// --steps=50 +// --repeat=20 +// --heap-pages=4096 +// --no-storage-info +// --no-min-squares +// --no-median-slopes + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_election_provider_multi_block_unsigned`. +pub struct WeightInfo(PhantomData); +impl pallet_election_provider_multi_block::unsigned::WeightInfo for WeightInfo { + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:0) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x33ed3d010c1fea25c2adbfba9297161f` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x33ed3d010c1fea25c2adbfba9297161f` (r:1 w:0) + /// Storage: `MultiBlockElection::Round` (r:1 w:0) + /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedSolutionScore` (r:1 w:0) + /// Proof: `MultiBlockElectionVerifier::QueuedSolutionScore` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::MinimumScore` (r:1 w:0) + /// Proof: `MultiBlockElectionVerifier::MinimumScore` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `Measured`) + /// Storage: `MultiBlockElection::DesiredTargets` (r:1 w:0) + /// Proof: `MultiBlockElection::DesiredTargets` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `Measured`) + /// Storage: UNKNOWN KEY `0xc209f5d8eb920681b56c64b8694ea78c` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xc209f5d8eb920681b56c64b8694ea78c` (r:1 w:0) + fn validate_unsigned() -> Weight { + // Proof Size summary in bytes: + // Measured: `351` + // Estimated: `3816` + // Minimum execution time: 39_895_000 picoseconds. + Weight::from_parts(47_532_000, 0) + .saturating_add(Weight::from_parts(0, 3816)) + .saturating_add(T::DbWeight::get().reads(7)) + } + /// Storage: UNKNOWN KEY `0x33ed3d010c1fea25c2adbfba9297161f` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x33ed3d010c1fea25c2adbfba9297161f` (r:1 w:0) + /// Storage: `MultiBlockElection::Round` (r:1 w:0) + /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedSolutionScore` (r:1 w:1) + /// Proof: `MultiBlockElectionVerifier::QueuedSolutionScore` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::MinimumScore` (r:1 w:0) + /// Proof: `MultiBlockElectionVerifier::MinimumScore` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedTargetSnapshot` (r:1 w:0) + /// Proof: `MultiBlockElection::PagedTargetSnapshot` (`max_values`: None, `max_size`: Some(32026), added: 34501, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedVoterSnapshot` (r:2 w:0) + /// Proof: `MultiBlockElection::PagedVoterSnapshot` (`max_values`: None, `max_size`: Some(388785), added: 391260, mode: `Measured`) + /// Storage: `MultiBlockElection::DesiredTargets` (r:1 w:0) + /// Proof: `MultiBlockElection::DesiredTargets` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedValidVariant` (r:1 w:0) + /// Proof: `MultiBlockElectionVerifier::QueuedValidVariant` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedSolutionY` (r:0 w:2) + /// Proof: `MultiBlockElectionVerifier::QueuedSolutionY` (`max_values`: None, `max_size`: Some(33794026), added: 33796501, mode: `Measured`) + fn submit_unsigned() -> Weight { + // Proof Size summary in bytes: + // Measured: `760999` + // Estimated: `766939` + // Minimum execution time: 1_262_183_000 picoseconds. + Weight::from_parts(1_357_073_000, 0) + .saturating_add(Weight::from_parts(0, 766939)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_verifier.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_verifier.rs new file mode 100644 index 000000000000..8634cfc8e8a7 --- /dev/null +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_verifier.rs @@ -0,0 +1,65 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Autogenerated weights for `pallet_election_provider_multi_block_verifier` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 +//! DATE: 2025-10-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `9203a6611a81`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 + +// Executed Command: +// frame-omni-bencher +// v1 +// benchmark +// pallet +// --extrinsic=* +// --runtime=target/production/wbuild/asset-hub-westend-runtime/asset_hub_westend_runtime.wasm +// --pallet=pallet_election_provider_multi_block_verifier +// --header=/__w/polkadot-sdk/polkadot-sdk/cumulus/file_header.txt +// --output=./cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights +// --wasm-execution=compiled +// --steps=50 +// --repeat=20 +// --heap-pages=4096 +// --no-storage-info +// --no-min-squares +// --no-median-slopes + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_election_provider_multi_block_verifier`. +pub struct WeightInfo(PhantomData); +impl pallet_election_provider_multi_block::verifier::WeightInfo for WeightInfo { + fn on_initialize_invalid_non_terminal(_: u32) -> Weight { + Default::default() + } + fn on_initialize_invalid_terminal() -> Weight { + Default::default() + } + fn on_initialize_valid_non_terminal() -> Weight { + Default::default() + } + fn on_initialize_valid_terminal() -> Weight { + Default::default() + } +} diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_fast_unstake.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_fast_unstake.rs deleted file mode 100644 index f091c18b46c1..000000000000 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_fast_unstake.rs +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Cumulus. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//! Autogenerated weights for `pallet_fast_unstake` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-06-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `runner--ss9ysm1-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! 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 -// --no-storage-info -// --no-median-slopes -// --no-min-squares -// --pallet=pallet_fast_unstake -// --extrinsic=* -// --execution=wasm -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/westend/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_fast_unstake`. -pub struct WeightInfo(PhantomData); -impl pallet_fast_unstake::WeightInfo for WeightInfo { - /// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0) - /// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Staking ValidatorCount (r:1 w:0) - /// Proof: Staking ValidatorCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: FastUnstake Head (r:1 w:1) - /// Proof: FastUnstake Head (max_values: Some(1), max_size: Some(3087), added: 3582, mode: MaxEncodedLen) - /// Storage: FastUnstake CounterForQueue (r:1 w:0) - /// Proof: FastUnstake CounterForQueue (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) - /// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Staking CurrentEra (r:1 w:0) - /// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Staking SlashingSpans (r:64 w:0) - /// Proof Skipped: Staking SlashingSpans (max_values: None, max_size: None, mode: Measured) - /// Storage: Staking Bonded (r:64 w:64) - /// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: Staking Validators (r:64 w:0) - /// Proof: Staking Validators (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen) - /// Storage: Staking Nominators (r:64 w:0) - /// Proof: Staking Nominators (max_values: None, max_size: Some(558), added: 3033, mode: MaxEncodedLen) - /// Storage: System Account (r:64 w:64) - /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:64 w:64) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:64 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: Staking Ledger (r:0 w:64) - /// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen) - /// Storage: Staking Payee (r:0 w:64) - /// Proof: Staking Payee (max_values: None, max_size: Some(73), added: 2548, mode: MaxEncodedLen) - /// The range of component `b` is `[1, 64]`. - fn on_idle_unstake(b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `1090 + b * (344 ±0)` - // Estimated: `4572 + b * (3774 ±0)` - // Minimum execution time: 88_455_000 picoseconds. - Weight::from_parts(4_625_058, 0) - .saturating_add(Weight::from_parts(0, 4572)) - // Standard Error: 92_258 - .saturating_add(Weight::from_parts(61_451_756, 0).saturating_mul(b.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(b.into()))) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(T::DbWeight::get().writes((5_u64).saturating_mul(b.into()))) - .saturating_add(Weight::from_parts(0, 3774).saturating_mul(b.into())) - } - /// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0) - /// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Staking ValidatorCount (r:1 w:0) - /// Proof: Staking ValidatorCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: FastUnstake Head (r:1 w:1) - /// Proof: FastUnstake Head (max_values: Some(1), max_size: Some(3087), added: 3582, mode: MaxEncodedLen) - /// Storage: FastUnstake CounterForQueue (r:1 w:0) - /// Proof: FastUnstake CounterForQueue (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: ElectionProviderMultiPhase CurrentPhase (r:1 w:0) - /// Proof Skipped: ElectionProviderMultiPhase CurrentPhase (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Staking CurrentEra (r:1 w:0) - /// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Staking ErasStakers (r:257 w:0) - /// Proof Skipped: Staking ErasStakers (max_values: None, max_size: None, mode: Measured) - /// The range of component `v` is `[1, 256]`. - /// The range of component `b` is `[1, 64]`. - fn on_idle_check(v: u32, b: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `1304 + b * (48 ±0) + v * (2485 ±0)` - // Estimated: `4622 + b * (49 ±0) + v * (4961 ±0)` - // Minimum execution time: 737_381_000 picoseconds. - Weight::from_parts(747_714_000, 0) - .saturating_add(Weight::from_parts(0, 4622)) - // Standard Error: 4_194_752 - .saturating_add(Weight::from_parts(135_818_708, 0).saturating_mul(v.into())) - // Standard Error: 16_783_682 - .saturating_add(Weight::from_parts(525_457_699, 0).saturating_mul(b.into())) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 49).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 4961).saturating_mul(v.into())) - } - /// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0) - /// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Staking Ledger (r:1 w:1) - /// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen) - /// Storage: FastUnstake Queue (r:1 w:1) - /// Proof: FastUnstake Queue (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: FastUnstake Head (r:1 w:0) - /// Proof: FastUnstake Head (max_values: Some(1), max_size: Some(3087), added: 3582, mode: MaxEncodedLen) - /// Storage: Staking Bonded (r:1 w:0) - /// Proof: Staking Bonded (max_values: None, max_size: Some(72), added: 2547, mode: MaxEncodedLen) - /// Storage: Staking Validators (r:1 w:0) - /// Proof: Staking Validators (max_values: None, max_size: Some(45), added: 2520, mode: MaxEncodedLen) - /// Storage: Staking Nominators (r:1 w:1) - /// Proof: Staking Nominators (max_values: None, max_size: Some(558), added: 3033, mode: MaxEncodedLen) - /// Storage: Staking CounterForNominators (r:1 w:1) - /// Proof: Staking CounterForNominators (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: VoterList ListNodes (r:1 w:1) - /// Proof: VoterList ListNodes (max_values: None, max_size: Some(154), added: 2629, mode: MaxEncodedLen) - /// Storage: VoterList ListBags (r:1 w:1) - /// Proof: VoterList ListBags (max_values: None, max_size: Some(82), added: 2557, mode: MaxEncodedLen) - /// Storage: VoterList CounterForListNodes (r:1 w:1) - /// Proof: VoterList CounterForListNodes (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Staking CurrentEra (r:1 w:0) - /// Proof: Staking CurrentEra (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: Balances Freezes (r:1 w:0) - /// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) - /// Storage: FastUnstake CounterForQueue (r:1 w:1) - /// Proof: FastUnstake CounterForQueue (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - fn register_fast_unstake() -> Weight { - // Proof Size summary in bytes: - // Measured: `1826` - // Estimated: `4764` - // Minimum execution time: 122_429_000 picoseconds. - Weight::from_parts(125_427_000, 0) - .saturating_add(Weight::from_parts(0, 4764)) - .saturating_add(T::DbWeight::get().reads(15)) - .saturating_add(T::DbWeight::get().writes(9)) - } - /// Storage: FastUnstake ErasToCheckPerBlock (r:1 w:0) - /// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Staking Ledger (r:1 w:0) - /// Proof: Staking Ledger (max_values: None, max_size: Some(1091), added: 3566, mode: MaxEncodedLen) - /// Storage: FastUnstake Queue (r:1 w:1) - /// Proof: FastUnstake Queue (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) - /// Storage: FastUnstake Head (r:1 w:0) - /// Proof: FastUnstake Head (max_values: Some(1), max_size: Some(3087), added: 3582, mode: MaxEncodedLen) - /// Storage: FastUnstake CounterForQueue (r:1 w:1) - /// Proof: FastUnstake CounterForQueue (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - fn deregister() -> Weight { - // Proof Size summary in bytes: - // Measured: `1118` - // Estimated: `4572` - // Minimum execution time: 43_442_000 picoseconds. - Weight::from_parts(44_728_000, 0) - .saturating_add(Weight::from_parts(0, 4572)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: FastUnstake ErasToCheckPerBlock (r:0 w:1) - /// Proof: FastUnstake ErasToCheckPerBlock (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - fn control() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_471_000 picoseconds. - Weight::from_parts(2_667_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } -} From 9900e5ad12d57a054d260e444c28be24ff3fe8b2 Mon Sep 17 00:00:00 2001 From: kianenigma Date: Tue, 11 Nov 2025 10:39:57 +0000 Subject: [PATCH 02/17] remove hardcoded westend weights --- .../frame/election-provider-multi-block/src/weights/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/substrate/frame/election-provider-multi-block/src/weights/mod.rs b/substrate/frame/election-provider-multi-block/src/weights/mod.rs index 2fc9b824c972..a2a7969ed932 100644 --- a/substrate/frame/election-provider-multi-block/src/weights/mod.rs +++ b/substrate/frame/election-provider-multi-block/src/weights/mod.rs @@ -164,6 +164,7 @@ pub mod traits { } } +/// Kusama-esque weights only be used in testing runtimes. pub mod kusama { pub use super::{ pallet_election_provider_multi_block_ksm_size::WeightInfo as MultiBlockWeightInfo, @@ -173,6 +174,7 @@ pub mod kusama { }; } +/// Polkadot-esque weights only be used in testing runtimes. pub mod polkadot { pub use super::{ pallet_election_provider_multi_block_dot_size::WeightInfo as MultiBlockWeightInfo, @@ -181,6 +183,3 @@ pub mod polkadot { pallet_election_provider_multi_block_verifier_dot_size::WeightInfo as MultiBlockVerifierWeightInfo, }; } -pub mod westend { - pub use super::polkadot::*; -} From f498caf40690ddb2386e0d5556e7a473dc09ed8c Mon Sep 17 00:00:00 2001 From: "cmd[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 12:17:38 +0000 Subject: [PATCH 03/17] Update from github-actions[bot] running command 'bench --pallet pallet_election_provider_multi_block pallet_election_provider_multi_block_signed pallet_election_provider_multi_block_verifier pallet_election_provider_multi_block_unsigned --runtime asset-hub-westend' --- .../pallet_election_provider_multi_block.rs | 150 +++++++++++----- ...et_election_provider_multi_block_signed.rs | 34 ++-- ..._election_provider_multi_block_unsigned.rs | 14 +- ..._election_provider_multi_block_verifier.rs | 170 ++++++++++++++++-- 4 files changed, 287 insertions(+), 81 deletions(-) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs index 1fc7109e3653..8a978cfdd145 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs @@ -16,9 +16,9 @@ //! Autogenerated weights for `pallet_election_provider_multi_block` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-10-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-11-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `9203a6611a81`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ee5d140fac7a`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: @@ -50,30 +50,24 @@ use core::marker::PhantomData; /// Weight functions for `pallet_election_provider_multi_block`. pub struct WeightInfo(PhantomData); impl pallet_election_provider_multi_block::WeightInfo for WeightInfo { - fn on_initialize_into_signed() -> Weight { - Default::default() - } - fn on_initialize_into_unsigned() -> Weight { - Default::default() - } /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1) /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) /// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:0) /// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) fn on_initialize_nothing() -> Weight { // Proof Size summary in bytes: - // Measured: `118` - // Estimated: `1603` - // Minimum execution time: 7_446_000 picoseconds. - Weight::from_parts(7_812_000, 0) - .saturating_add(Weight::from_parts(0, 1603)) - .saturating_add(T::DbWeight::get().reads(2)) + // Measured: `223` + // Estimated: `3688` + // Minimum execution time: 9_346_000 picoseconds. + Weight::from_parts(9_735_000, 0) + .saturating_add(Weight::from_parts(0, 3688)) + .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1) /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) - /// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:0) - /// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) /// Storage: `Staking::ValidatorCount` (r:1 w:0) /// Proof: `Staking::ValidatorCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) /// Storage: `MultiBlockElection::Round` (r:1 w:0) @@ -82,6 +76,10 @@ impl pallet_election_provider_multi_block::WeightInfo f /// Proof: `Staking::CounterForValidators` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) /// Storage: `Staking::Validators` (r:1001 w:0) /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:0) + /// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) /// Storage: `MultiBlockElection::DesiredTargets` (r:0 w:1) /// Proof: `MultiBlockElection::DesiredTargets` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `Measured`) /// Storage: `MultiBlockElection::PagedTargetSnapshotHash` (r:0 w:1) @@ -90,18 +88,16 @@ impl pallet_election_provider_multi_block::WeightInfo f /// Proof: `MultiBlockElection::PagedTargetSnapshot` (`max_values`: None, `max_size`: Some(32026), added: 34501, mode: `Measured`) fn on_initialize_into_snapshot_msp() -> Weight { // Proof Size summary in bytes: - // Measured: `48346` - // Estimated: `2526811` - // Minimum execution time: 5_996_743_000 picoseconds. - Weight::from_parts(6_143_499_000, 0) - .saturating_add(Weight::from_parts(0, 2526811)) - .saturating_add(T::DbWeight::get().reads(1006)) + // Measured: `48451` + // Estimated: `2526916` + // Minimum execution time: 6_122_910_000 picoseconds. + Weight::from_parts(6_202_911_000, 0) + .saturating_add(Weight::from_parts(0, 2526916)) + .saturating_add(T::DbWeight::get().reads(1007)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1) /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) - /// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:0) - /// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) /// Storage: `Staking::VoterSnapshotStatus` (r:1 w:1) /// Proof: `Staking::VoterSnapshotStatus` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `Measured`) /// Storage: `VoterList::CounterForListNodes` (r:1 w:0) @@ -120,6 +116,10 @@ impl pallet_election_provider_multi_block::WeightInfo f /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `Measured`) /// Storage: `MultiBlockElection::Round` (r:1 w:0) /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:0) + /// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) /// Storage: `Staking::MinimumActiveStake` (r:0 w:1) /// Proof: `Staking::MinimumActiveStake` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `Measured`) /// Storage: `VoterList::Lock` (r:0 w:1) @@ -130,32 +130,90 @@ impl pallet_election_provider_multi_block::WeightInfo f /// Proof: `MultiBlockElection::PagedVoterSnapshotHash` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `Measured`) fn on_initialize_into_snapshot_rest() -> Weight { // Proof Size summary in bytes: - // Measured: `1495638` - // Estimated: `3241503` - // Minimum execution time: 33_030_368_000 picoseconds. - Weight::from_parts(33_970_009_000, 0) - .saturating_add(Weight::from_parts(0, 3241503)) - .saturating_add(T::DbWeight::get().reads(2923)) + // Measured: `1495743` + // Estimated: `3241608` + // Minimum execution time: 31_001_787_000 picoseconds. + Weight::from_parts(33_712_777_000, 0) + .saturating_add(Weight::from_parts(0, 3241608)) + .saturating_add(T::DbWeight::get().reads(2924)) .saturating_add(T::DbWeight::get().writes(6)) } /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1) /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) - /// Storage: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) - /// Proof: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) + /// Storage: `Staking::VoterSnapshotStatus` (r:1 w:1) + /// Proof: `Staking::VoterSnapshotStatus` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `Measured`) + /// Storage: `VoterList::CounterForListNodes` (r:1 w:0) + /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `VoterList::ListNodes` (r:705 w:0) + /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `Measured`) + /// Storage: `Staking::Bonded` (r:703 w:0) + /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `Measured`) + /// Storage: `Staking::Ledger` (r:703 w:0) + /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(753), added: 3228, mode: `Measured`) + /// Storage: `Staking::Nominators` (r:703 w:0) + /// Proof: `Staking::Nominators` (`max_values`: None, `max_size`: Some(558), added: 3033, mode: `Measured`) + /// Storage: `VoterList::ListBags` (r:2 w:0) + /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `Measured`) + /// Storage: `Staking::Validators` (r:37 w:0) + /// Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `Measured`) /// Storage: `MultiBlockElection::Round` (r:1 w:0) /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) - /// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:0) - /// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x6358acd2035ec4bb863fa981e0c177b9` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x6358acd2035ec4bb863fa981e0c177b9` (r:1 w:0) + /// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:0) + /// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) + /// Storage: `Staking::MinimumActiveStake` (r:0 w:1) + /// Proof: `Staking::MinimumActiveStake` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `Measured`) + /// Storage: `VoterList::Lock` (r:0 w:1) + /// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedVoterSnapshot` (r:0 w:1) + /// Proof: `MultiBlockElection::PagedVoterSnapshot` (`max_values`: None, `max_size`: Some(388785), added: 391260, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedVoterSnapshotHash` (r:0 w:1) + /// Proof: `MultiBlockElection::PagedVoterSnapshotHash` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `Measured`) + fn on_initialize_into_signed() -> Weight { + // Proof Size summary in bytes: + // Measured: `1527537` + // Estimated: `3273402` + // Minimum execution time: 34_085_004_000 picoseconds. + Weight::from_parts(35_200_523_000, 0) + .saturating_add(Weight::from_parts(0, 3273402)) + .saturating_add(T::DbWeight::get().reads(2860)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) /// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:0) /// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) fn on_initialize_into_signed_validation() -> Weight { // Proof Size summary in bytes: - // Measured: `592` - // Estimated: `4057` - // Minimum execution time: 50_428_000 picoseconds. - Weight::from_parts(59_050_000, 0) - .saturating_add(Weight::from_parts(0, 4057)) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `417` + // Estimated: `3882` + // Minimum execution time: 40_689_000 picoseconds. + Weight::from_parts(43_146_000, 0) + .saturating_add(Weight::from_parts(0, 3882)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:0) + /// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: UNKNOWN KEY `0xc209f5d8eb920681b56c64b8694ea78c` (r:1 w:0) + /// Proof: UNKNOWN KEY `0xc209f5d8eb920681b56c64b8694ea78c` (r:1 w:0) + /// Storage: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) + fn on_initialize_into_unsigned() -> Weight { + // Proof Size summary in bytes: + // Measured: `417` + // Estimated: `3882` + // Minimum execution time: 39_828_000 picoseconds. + Weight::from_parts(46_716_000, 0) + .saturating_add(Weight::from_parts(0, 3882)) + .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1) @@ -176,8 +234,8 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `1479` // Estimated: `4944` - // Minimum execution time: 79_507_000 picoseconds. - Weight::from_parts(83_771_000, 0) + // Minimum execution time: 77_706_000 picoseconds. + Weight::from_parts(96_332_000, 0) .saturating_add(Weight::from_parts(0, 4944)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) @@ -214,8 +272,8 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `4847` // Estimated: `85037` - // Minimum execution time: 288_365_000 picoseconds. - Weight::from_parts(310_587_000, 0) + // Minimum execution time: 276_168_000 picoseconds. + Weight::from_parts(317_676_000, 0) .saturating_add(Weight::from_parts(0, 85037)) .saturating_add(T::DbWeight::get().reads(104)) .saturating_add(T::DbWeight::get().writes(106)) @@ -224,8 +282,8 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 195_000 picoseconds. - Weight::from_parts(229_000, 0) + // Minimum execution time: 198_000 picoseconds. + Weight::from_parts(233_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_signed.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_signed.rs index 87d27389df80..83bbf9ddac78 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_signed.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_signed.rs @@ -16,9 +16,9 @@ //! Autogenerated weights for `pallet_election_provider_multi_block_signed` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-10-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-11-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `9203a6611a81`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ee5d140fac7a`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: @@ -49,7 +49,7 @@ use core::marker::PhantomData; /// Weight functions for `pallet_election_provider_multi_block_signed`. pub struct WeightInfo(PhantomData); -impl pallet_election_provider_multi_block::signed::WeightInfo for WeightInfo { +impl pallet_election_provider_multi_block_signed::WeightInfo for WeightInfo { /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:0) /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) /// Storage: `MultiBlockElectionSigned::Invulnerables` (r:1 w:0) @@ -66,8 +66,8 @@ impl pallet_election_provider_multi_block::signed::Weig // Proof Size summary in bytes: // Measured: `3252` // Estimated: `6717` - // Minimum execution time: 82_298_000 picoseconds. - Weight::from_parts(85_205_000, 0) + // Minimum execution time: 82_850_000 picoseconds. + Weight::from_parts(84_898_000, 0) .saturating_add(Weight::from_parts(0, 6717)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -90,8 +90,8 @@ impl pallet_election_provider_multi_block::signed::Weig // Proof Size summary in bytes: // Measured: `7851` // Estimated: `88041` - // Minimum execution time: 222_710_000 picoseconds. - Weight::from_parts(227_768_000, 0) + // Minimum execution time: 226_920_000 picoseconds. + Weight::from_parts(231_264_000, 0) .saturating_add(Weight::from_parts(0, 88041)) .saturating_add(T::DbWeight::get().reads(39)) .saturating_add(T::DbWeight::get().writes(37)) @@ -114,8 +114,8 @@ impl pallet_election_provider_multi_block::signed::Weig // Proof Size summary in bytes: // Measured: `3785` // Estimated: `7250` - // Minimum execution time: 175_724_000 picoseconds. - Weight::from_parts(196_243_000, 0) + // Minimum execution time: 177_690_000 picoseconds. + Weight::from_parts(184_741_000, 0) .saturating_add(Weight::from_parts(0, 7250)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) @@ -138,8 +138,8 @@ impl pallet_election_provider_multi_block::signed::Weig // Proof Size summary in bytes: // Measured: `3887` // Estimated: `7352` - // Minimum execution time: 159_836_000 picoseconds. - Weight::from_parts(175_455_000, 0) + // Minimum execution time: 163_973_000 picoseconds. + Weight::from_parts(215_149_000, 0) .saturating_add(Weight::from_parts(0, 7352)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) @@ -160,8 +160,8 @@ impl pallet_election_provider_multi_block::signed::Weig // Proof Size summary in bytes: // Measured: `4717` // Estimated: `84907` - // Minimum execution time: 138_145_000 picoseconds. - Weight::from_parts(143_634_000, 0) + // Minimum execution time: 138_718_000 picoseconds. + Weight::from_parts(145_406_000, 0) .saturating_add(Weight::from_parts(0, 84907)) .saturating_add(T::DbWeight::get().reads(37)) .saturating_add(T::DbWeight::get().writes(35)) @@ -183,11 +183,11 @@ impl pallet_election_provider_multi_block::signed::Weig // Proof Size summary in bytes: // Measured: `3709 + p * (32 ±0)` // Estimated: `7174 + p * (2507 ±0)` - // Minimum execution time: 83_110_000 picoseconds. - Weight::from_parts(86_716_939, 0) + // Minimum execution time: 84_757_000 picoseconds. + Weight::from_parts(86_554_733, 0) .saturating_add(Weight::from_parts(0, 7174)) - // Standard Error: 8_086 - .saturating_add(Weight::from_parts(1_143_762, 0).saturating_mul(p.into())) + // Standard Error: 7_137 + .saturating_add(Weight::from_parts(1_165_345, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_unsigned.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_unsigned.rs index 093a4fcfc612..35ba0f203e94 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_unsigned.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_unsigned.rs @@ -16,9 +16,9 @@ //! Autogenerated weights for `pallet_election_provider_multi_block_unsigned` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-10-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-11-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `9203a6611a81`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ee5d140fac7a`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: @@ -49,7 +49,7 @@ use core::marker::PhantomData; /// Weight functions for `pallet_election_provider_multi_block_unsigned`. pub struct WeightInfo(PhantomData); -impl pallet_election_provider_multi_block::unsigned::WeightInfo for WeightInfo { +impl pallet_election_provider_multi_block_unsigned::WeightInfo for WeightInfo { /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:0) /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) /// Storage: UNKNOWN KEY `0x33ed3d010c1fea25c2adbfba9297161f` (r:1 w:0) @@ -68,8 +68,8 @@ impl pallet_election_provider_multi_block::unsigned::We // Proof Size summary in bytes: // Measured: `351` // Estimated: `3816` - // Minimum execution time: 39_895_000 picoseconds. - Weight::from_parts(47_532_000, 0) + // Minimum execution time: 38_890_000 picoseconds. + Weight::from_parts(43_247_000, 0) .saturating_add(Weight::from_parts(0, 3816)) .saturating_add(T::DbWeight::get().reads(7)) } @@ -95,8 +95,8 @@ impl pallet_election_provider_multi_block::unsigned::We // Proof Size summary in bytes: // Measured: `760999` // Estimated: `766939` - // Minimum execution time: 1_262_183_000 picoseconds. - Weight::from_parts(1_357_073_000, 0) + // Minimum execution time: 1_192_782_000 picoseconds. + Weight::from_parts(1_304_744_000, 0) .saturating_add(Weight::from_parts(0, 766939)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_verifier.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_verifier.rs index 8634cfc8e8a7..baaeae80b7bb 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_verifier.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_verifier.rs @@ -16,9 +16,9 @@ //! Autogenerated weights for `pallet_election_provider_multi_block_verifier` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-10-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-11-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `9203a6611a81`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `ee5d140fac7a`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: @@ -49,17 +49,165 @@ use core::marker::PhantomData; /// Weight functions for `pallet_election_provider_multi_block_verifier`. pub struct WeightInfo(PhantomData); -impl pallet_election_provider_multi_block::verifier::WeightInfo for WeightInfo { - fn on_initialize_invalid_non_terminal(_: u32) -> Weight { - Default::default() - } - fn on_initialize_invalid_terminal() -> Weight { - Default::default() - } +impl pallet_election_provider_multi_block_verifier::WeightInfo for WeightInfo { + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:1) + /// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElection::Round` (r:1 w:0) + /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:0) + /// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SubmissionStorage` (r:1 w:0) + /// Proof: `MultiBlockElectionSigned::SubmissionStorage` (`max_values`: None, `max_size`: Some(46478), added: 48953, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedTargetSnapshot` (r:1 w:0) + /// Proof: `MultiBlockElection::PagedTargetSnapshot` (`max_values`: None, `max_size`: Some(32026), added: 34501, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedVoterSnapshot` (r:1 w:0) + /// Proof: `MultiBlockElection::PagedVoterSnapshot` (`max_values`: None, `max_size`: Some(388785), added: 391260, mode: `Measured`) + /// Storage: `MultiBlockElection::DesiredTargets` (r:1 w:0) + /// Proof: `MultiBlockElection::DesiredTargets` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedValidVariant` (r:1 w:0) + /// Proof: `MultiBlockElectionVerifier::QueuedValidVariant` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) + /// Storage: `MultiBlockElectionVerifier::QueuedSolutionX` (r:0 w:1) + /// Proof: `MultiBlockElectionVerifier::QueuedSolutionX` (`max_values`: None, `max_size`: Some(33794026), added: 33796501, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedSolutionBackings` (r:0 w:1) + /// Proof: `MultiBlockElectionVerifier::QueuedSolutionBackings` (`max_values`: None, `max_size`: Some(52026), added: 54501, mode: `Measured`) fn on_initialize_valid_non_terminal() -> Weight { - Default::default() + // Proof Size summary in bytes: + // Measured: `373231` + // Estimated: `376696` + // Minimum execution time: 640_916_000 picoseconds. + Weight::from_parts(684_210_000, 0) + .saturating_add(Weight::from_parts(0, 376696)) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(4)) } + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:1) + /// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElection::Round` (r:1 w:0) + /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:1) + /// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SubmissionStorage` (r:32 w:32) + /// Proof: `MultiBlockElectionSigned::SubmissionStorage` (`max_values`: None, `max_size`: Some(46478), added: 48953, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedTargetSnapshot` (r:1 w:0) + /// Proof: `MultiBlockElection::PagedTargetSnapshot` (`max_values`: None, `max_size`: Some(32026), added: 34501, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedVoterSnapshot` (r:1 w:0) + /// Proof: `MultiBlockElection::PagedVoterSnapshot` (`max_values`: None, `max_size`: Some(388785), added: 391260, mode: `Measured`) + /// Storage: `MultiBlockElection::DesiredTargets` (r:1 w:0) + /// Proof: `MultiBlockElection::DesiredTargets` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedValidVariant` (r:1 w:1) + /// Proof: `MultiBlockElectionVerifier::QueuedValidVariant` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedSolutionBackings` (r:33 w:32) + /// Proof: `MultiBlockElectionVerifier::QueuedSolutionBackings` (`max_values`: None, `max_size`: Some(52026), added: 54501, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedSolutionScore` (r:1 w:1) + /// Proof: `MultiBlockElectionVerifier::QueuedSolutionScore` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SubmissionMetadataStorage` (r:1 w:1) + /// Proof: `MultiBlockElectionSigned::SubmissionMetadataStorage` (`max_values`: None, `max_size`: Some(181), added: 2656, mode: `Measured`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) + /// Storage: `MultiBlockElectionVerifier::QueuedSolutionX` (r:0 w:1) + /// Proof: `MultiBlockElectionVerifier::QueuedSolutionX` (`max_values`: None, `max_size`: Some(33794026), added: 33796501, mode: `Measured`) fn on_initialize_valid_terminal() -> Weight { - Default::default() + // Proof Size summary in bytes: + // Measured: `409786` + // Estimated: `492451` + // Minimum execution time: 1_141_494_000 picoseconds. + Weight::from_parts(1_219_835_000, 0) + .saturating_add(Weight::from_parts(0, 492451)) + .saturating_add(T::DbWeight::get().reads(77)) + .saturating_add(T::DbWeight::get().writes(72)) + } + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:1) + /// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElection::Round` (r:1 w:0) + /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:1) + /// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SubmissionStorage` (r:32 w:32) + /// Proof: `MultiBlockElectionSigned::SubmissionStorage` (`max_values`: None, `max_size`: Some(46478), added: 48953, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedTargetSnapshot` (r:1 w:0) + /// Proof: `MultiBlockElection::PagedTargetSnapshot` (`max_values`: None, `max_size`: Some(32026), added: 34501, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedVoterSnapshot` (r:1 w:0) + /// Proof: `MultiBlockElection::PagedVoterSnapshot` (`max_values`: None, `max_size`: Some(388785), added: 391260, mode: `Measured`) + /// Storage: `MultiBlockElection::DesiredTargets` (r:1 w:0) + /// Proof: `MultiBlockElection::DesiredTargets` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedValidVariant` (r:1 w:0) + /// Proof: `MultiBlockElectionVerifier::QueuedValidVariant` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedSolutionBackings` (r:33 w:32) + /// Proof: `MultiBlockElectionVerifier::QueuedSolutionBackings` (`max_values`: None, `max_size`: Some(52026), added: 54501, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SubmissionMetadataStorage` (r:1 w:1) + /// Proof: `MultiBlockElectionSigned::SubmissionMetadataStorage` (`max_values`: None, `max_size`: Some(181), added: 2656, mode: `Measured`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::Invulnerables` (r:1 w:1) + /// Proof: `MultiBlockElectionSigned::Invulnerables` (`max_values`: Some(1), `max_size`: Some(513), added: 1008, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedSolutionX` (r:31 w:32) + /// Proof: `MultiBlockElectionVerifier::QueuedSolutionX` (`max_values`: None, `max_size`: Some(33794026), added: 33796501, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) + fn on_initialize_invalid_terminal() -> Weight { + // Proof Size summary in bytes: + // Measured: `409786` + // Estimated: `492451` + // Minimum execution time: 1_142_497_000 picoseconds. + Weight::from_parts(1_241_390_000, 0) + .saturating_add(Weight::from_parts(0, 492451)) + .saturating_add(T::DbWeight::get().reads(108)) + .saturating_add(T::DbWeight::get().writes(102)) + } + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:1) + /// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElection::Round` (r:1 w:0) + /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:1) + /// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SubmissionStorage` (r:32 w:32) + /// Proof: `MultiBlockElectionSigned::SubmissionStorage` (`max_values`: None, `max_size`: Some(46478), added: 48953, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedTargetSnapshot` (r:1 w:0) + /// Proof: `MultiBlockElection::PagedTargetSnapshot` (`max_values`: None, `max_size`: Some(32026), added: 34501, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedVoterSnapshot` (r:1 w:0) + /// Proof: `MultiBlockElection::PagedVoterSnapshot` (`max_values`: None, `max_size`: Some(388785), added: 391260, mode: `Measured`) + /// Storage: `MultiBlockElection::DesiredTargets` (r:1 w:0) + /// Proof: `MultiBlockElection::DesiredTargets` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedValidVariant` (r:1 w:0) + /// Proof: `MultiBlockElectionVerifier::QueuedValidVariant` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedSolutionX` (r:31 w:31) + /// Proof: `MultiBlockElectionVerifier::QueuedSolutionX` (`max_values`: None, `max_size`: Some(33794026), added: 33796501, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedSolutionBackings` (r:31 w:31) + /// Proof: `MultiBlockElectionVerifier::QueuedSolutionBackings` (`max_values`: None, `max_size`: Some(52026), added: 54501, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::SubmissionMetadataStorage` (r:1 w:1) + /// Proof: `MultiBlockElectionSigned::SubmissionMetadataStorage` (`max_values`: None, `max_size`: Some(181), added: 2656, mode: `Measured`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `Measured`) + /// Storage: `MultiBlockElectionSigned::Invulnerables` (r:1 w:1) + /// Proof: `MultiBlockElectionSigned::Invulnerables` (`max_values`: Some(1), `max_size`: Some(513), added: 1008, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x48384a816e4f71a936cb76dc9e303f2a` (r:1 w:0) + /// The range of component `v` is `[0, 31]`. + fn on_initialize_invalid_non_terminal(v: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `417197 + v * (37 ±0)` + // Estimated: `488349 + v * (2550 ±72)` + // Minimum execution time: 852_052_000 picoseconds. + Weight::from_parts(979_657_523, 0) + .saturating_add(Weight::from_parts(0, 488349)) + // Standard Error: 162_209 + .saturating_add(Weight::from_parts(2_885_560, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(44)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(v.into()))) + .saturating_add(T::DbWeight::get().writes(38)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(v.into()))) + .saturating_add(Weight::from_parts(0, 2550).saturating_mul(v.into())) } } From 4cf7b7646880bdd86ad968953e5848ad075f29f2 Mon Sep 17 00:00:00 2001 From: kianenigma Date: Tue, 11 Nov 2025 12:19:49 +0000 Subject: [PATCH 04/17] fmt --- .../runtimes/assets/asset-hub-westend/src/lib.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 2fe1863efb39..2dd9420cc718 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -745,8 +745,7 @@ impl InstanceFilter for ProxyType { RuntimeCall::Utility { .. } | RuntimeCall::Multisig { .. } | RuntimeCall::NftFractionalization { .. } | - RuntimeCall::Nfts { .. } | - RuntimeCall::Uniques { .. } + RuntimeCall::Nfts { .. } | RuntimeCall::Uniques { .. } ) }, ProxyType::AssetOwner => matches!( @@ -832,8 +831,7 @@ impl InstanceFilter for ProxyType { matches!( c, RuntimeCall::Staking(..) | - RuntimeCall::Session(..) | - RuntimeCall::Utility(..) | + RuntimeCall::Session(..) | RuntimeCall::Utility(..) | RuntimeCall::NominationPools(..) | RuntimeCall::VoterList(..) ) @@ -1212,6 +1210,7 @@ impl pallet_revive::Config for Runtime { parameter_types! { pub MbmServiceWeight: Weight = Perbill::from_percent(80) * RuntimeBlockWeights::get().max_block; + pub FastUnstakeName: &'static str = "FastUnstake"; } impl pallet_migrations::Config for Runtime { @@ -1220,6 +1219,10 @@ impl pallet_migrations::Config for Runtime { type Migrations = ( pallet_revive::migrations::v1::Migration, pallet_revive::migrations::v2::Migration, + frame_support::migrations::RemovePallet< + FastUnstakeName, + ::DbWeight, + >, ); // Benchmarks need mocked migrations to guarantee that they succeed. #[cfg(feature = "runtime-benchmarks")] From d3931dfdc8a38f337e966f2f7fa81e488b86ce1c Mon Sep 17 00:00:00 2001 From: "cmd[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 12:22:01 +0000 Subject: [PATCH 05/17] Update from github-actions[bot] running command 'prdoc --bump patch' --- prdoc/pr_10284.prdoc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 prdoc/pr_10284.prdoc diff --git a/prdoc/pr_10284.prdoc b/prdoc/pr_10284.prdoc new file mode 100644 index 000000000000..16cd3d3f9793 --- /dev/null +++ b/prdoc/pr_10284.prdoc @@ -0,0 +1,14 @@ +title: add fresh weights for westend asset hub +doc: +- audience: Todo + description: |- + - And deprecate `FastUnstake` as it is unsafe + - And use the faster solver for benchmarks to speed things up + - Remove hardcoded weights of westend. + + A step to reduce the diff size in https://github.com/paritytech/polkadot-sdk/pull/9925 +crates: +- name: asset-hub-westend-runtime + bump: patch +- name: pallet-election-provider-multi-block + bump: patch From a4020814681be03867c4e1cc7b35c850965ea212 Mon Sep 17 00:00:00 2001 From: kianenigma Date: Tue, 11 Nov 2025 12:23:14 +0000 Subject: [PATCH 06/17] Prdoc --- prdoc/pr_10284.prdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prdoc/pr_10284.prdoc b/prdoc/pr_10284.prdoc index 16cd3d3f9793..04fbb18035c0 100644 --- a/prdoc/pr_10284.prdoc +++ b/prdoc/pr_10284.prdoc @@ -1,6 +1,6 @@ title: add fresh weights for westend asset hub doc: -- audience: Todo +- audience: Runtime Dev description: |- - And deprecate `FastUnstake` as it is unsafe - And use the faster solver for benchmarks to speed things up From fb94607dc1ce793cb21194e2419930d7ff930ff0 Mon Sep 17 00:00:00 2001 From: kianenigma Date: Tue, 11 Nov 2025 12:25:25 +0000 Subject: [PATCH 07/17] fmt --- .../parachains/runtimes/assets/asset-hub-westend/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 2dd9420cc718..7b4f3bd3f010 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -745,7 +745,8 @@ impl InstanceFilter for ProxyType { RuntimeCall::Utility { .. } | RuntimeCall::Multisig { .. } | RuntimeCall::NftFractionalization { .. } | - RuntimeCall::Nfts { .. } | RuntimeCall::Uniques { .. } + RuntimeCall::Nfts { .. } | + RuntimeCall::Uniques { .. } ) }, ProxyType::AssetOwner => matches!( @@ -831,7 +832,8 @@ impl InstanceFilter for ProxyType { matches!( c, RuntimeCall::Staking(..) | - RuntimeCall::Session(..) | RuntimeCall::Utility(..) | + RuntimeCall::Session(..) | + RuntimeCall::Utility(..) | RuntimeCall::NominationPools(..) | RuntimeCall::VoterList(..) ) From ed958c68ccec7b406b9f4e34e3375b20d996e7ea Mon Sep 17 00:00:00 2001 From: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Date: Tue, 11 Nov 2025 12:29:20 +0000 Subject: [PATCH 08/17] Update prdoc/pr_10284.prdoc Co-authored-by: Oliver Tale-Yazdi --- prdoc/pr_10284.prdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prdoc/pr_10284.prdoc b/prdoc/pr_10284.prdoc index 04fbb18035c0..0cad7a13b30c 100644 --- a/prdoc/pr_10284.prdoc +++ b/prdoc/pr_10284.prdoc @@ -9,6 +9,6 @@ doc: A step to reduce the diff size in https://github.com/paritytech/polkadot-sdk/pull/9925 crates: - name: asset-hub-westend-runtime - bump: patch + bump: major - name: pallet-election-provider-multi-block bump: patch From 4068b14016b515e56d2ef95baabda5024d8ae438 Mon Sep 17 00:00:00 2001 From: kianenigma Date: Tue, 11 Nov 2025 13:02:37 +0000 Subject: [PATCH 09/17] fix paths? --- .../parachains/runtimes/assets/asset-hub-westend/src/lib.rs | 6 +++--- .../runtimes/assets/asset-hub-westend/src/staking.rs | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 7b4f3bd3f010..94fb2b0e74d6 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -1685,9 +1685,9 @@ mod benches { [pallet_balances, Balances] [pallet_conviction_voting, ConvictionVoting] [pallet_election_provider_multi_block, MultiBlockElection] - [pallet_election_provider_multi_block_verifier, MultiBlockElectionVerifier] - [pallet_election_provider_multi_block_unsigned, MultiBlockElectionUnsigned] - [pallet_election_provider_multi_block_signed, MultiBlockElectionSigned] + [pallet_election_provider_multi_block::verifier, MultiBlockElectionVerifier] + [pallet_election_provider_multi_block::unsigned, MultiBlockElectionUnsigned] + [pallet_election_provider_multi_block::signed, MultiBlockElectionSigned] [pallet_message_queue, MessageQueue] [pallet_migrations, MultiBlockMigrations] [pallet_multisig, Multisig] diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/staking.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/staking.rs index 8f90ff4104a3..10aae28e4eea 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/staking.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/staking.rs @@ -27,6 +27,12 @@ use sp_runtime::{ }; use xcm::latest::prelude::*; +// Some re-exports needed to make the weight templates work +use pallet_election_provider_multi_block::signed as pallet_election_provider_multi_block_signed; +use pallet_election_provider_multi_block::verifier as pallet_election_provider_multi_block_verifier; +use pallet_election_provider_multi_block::unsigned as pallet_election_provider_multi_block_unsigned; + + parameter_types! { /// Number of election pages that we operate upon. 32 * 6s block = 192s = 3.2min snapshots pub Pages: u32 = 32; From a88c57d2ed6f0bd998c29e72bb1f01e156c61893 Mon Sep 17 00:00:00 2001 From: kianenigma Date: Tue, 11 Nov 2025 13:03:51 +0000 Subject: [PATCH 10/17] fix names --- .../runtimes/assets/asset-hub-westend/src/staking.rs | 5 ----- .../weights/pallet_election_provider_multi_block_signed.rs | 2 +- .../weights/pallet_election_provider_multi_block_unsigned.rs | 2 +- .../weights/pallet_election_provider_multi_block_verifier.rs | 2 +- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/staking.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/staking.rs index 10aae28e4eea..3b9c88b7b206 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/staking.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/staking.rs @@ -27,11 +27,6 @@ use sp_runtime::{ }; use xcm::latest::prelude::*; -// Some re-exports needed to make the weight templates work -use pallet_election_provider_multi_block::signed as pallet_election_provider_multi_block_signed; -use pallet_election_provider_multi_block::verifier as pallet_election_provider_multi_block_verifier; -use pallet_election_provider_multi_block::unsigned as pallet_election_provider_multi_block_unsigned; - parameter_types! { /// Number of election pages that we operate upon. 32 * 6s block = 192s = 3.2min snapshots diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_signed.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_signed.rs index 83bbf9ddac78..da3fbafd67f3 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_signed.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_signed.rs @@ -49,7 +49,7 @@ use core::marker::PhantomData; /// Weight functions for `pallet_election_provider_multi_block_signed`. pub struct WeightInfo(PhantomData); -impl pallet_election_provider_multi_block_signed::WeightInfo for WeightInfo { +impl pallet_election_provider_multi_block::signed::WeightInfo for WeightInfo { /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:0) /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) /// Storage: `MultiBlockElectionSigned::Invulnerables` (r:1 w:0) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_unsigned.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_unsigned.rs index 35ba0f203e94..fb9e227a2659 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_unsigned.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_unsigned.rs @@ -49,7 +49,7 @@ use core::marker::PhantomData; /// Weight functions for `pallet_election_provider_multi_block_unsigned`. pub struct WeightInfo(PhantomData); -impl pallet_election_provider_multi_block_unsigned::WeightInfo for WeightInfo { +impl pallet_election_provider_multi_block::unsigned::WeightInfo for WeightInfo { /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:0) /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) /// Storage: UNKNOWN KEY `0x33ed3d010c1fea25c2adbfba9297161f` (r:1 w:0) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_verifier.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_verifier.rs index baaeae80b7bb..c5a68e063958 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_verifier.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_verifier.rs @@ -49,7 +49,7 @@ use core::marker::PhantomData; /// Weight functions for `pallet_election_provider_multi_block_verifier`. pub struct WeightInfo(PhantomData); -impl pallet_election_provider_multi_block_verifier::WeightInfo for WeightInfo { +impl pallet_election_provider_multi_block::verifier::WeightInfo for WeightInfo { /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1) /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) /// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:1) From 5fedb21f1b4f6842d2e7cb15fcab04be695bb412 Mon Sep 17 00:00:00 2001 From: kianenigma Date: Tue, 11 Nov 2025 13:10:13 +0000 Subject: [PATCH 11/17] fmt --- .../parachains/runtimes/assets/asset-hub-westend/src/staking.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/staking.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/staking.rs index 3b9c88b7b206..8f90ff4104a3 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/staking.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/staking.rs @@ -27,7 +27,6 @@ use sp_runtime::{ }; use xcm::latest::prelude::*; - parameter_types! { /// Number of election pages that we operate upon. 32 * 6s block = 192s = 3.2min snapshots pub Pages: u32 = 32; From e0d725ef779e6fdc2ac0338265513ceae602dd1e Mon Sep 17 00:00:00 2001 From: kianenigma Date: Tue, 11 Nov 2025 13:44:50 +0000 Subject: [PATCH 12/17] fix benchmarks --- .../runtimes/assets/asset-hub-westend/src/lib.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 94fb2b0e74d6..04faa6ae153e 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -745,8 +745,7 @@ impl InstanceFilter for ProxyType { RuntimeCall::Utility { .. } | RuntimeCall::Multisig { .. } | RuntimeCall::NftFractionalization { .. } | - RuntimeCall::Nfts { .. } | - RuntimeCall::Uniques { .. } + RuntimeCall::Nfts { .. } | RuntimeCall::Uniques { .. } ) }, ProxyType::AssetOwner => matches!( @@ -832,8 +831,7 @@ impl InstanceFilter for ProxyType { matches!( c, RuntimeCall::Staking(..) | - RuntimeCall::Session(..) | - RuntimeCall::Utility(..) | + RuntimeCall::Session(..) | RuntimeCall::Utility(..) | RuntimeCall::NominationPools(..) | RuntimeCall::VoterList(..) ) @@ -1221,10 +1219,6 @@ impl pallet_migrations::Config for Runtime { type Migrations = ( pallet_revive::migrations::v1::Migration, pallet_revive::migrations::v2::Migration, - frame_support::migrations::RemovePallet< - FastUnstakeName, - ::DbWeight, - >, ); // Benchmarks need mocked migrations to guarantee that they succeed. #[cfg(feature = "runtime-benchmarks")] @@ -1482,6 +1476,10 @@ pub type Migrations = ( Runtime, pallet_session::migrations::v1::InitOffenceSeverity, >, + frame_support::migrations::RemovePallet< + FastUnstakeName, + ::DbWeight, + >, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, cumulus_pallet_aura_ext::migration::MigrateV0ToV1, From 9c64225f47a24c5cedadfceb879b4568ad387c37 Mon Sep 17 00:00:00 2001 From: kianenigma Date: Tue, 11 Nov 2025 14:01:54 +0000 Subject: [PATCH 13/17] fmt --- .../parachains/runtimes/assets/asset-hub-westend/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 04faa6ae153e..01fe402fdada 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -745,7 +745,8 @@ impl InstanceFilter for ProxyType { RuntimeCall::Utility { .. } | RuntimeCall::Multisig { .. } | RuntimeCall::NftFractionalization { .. } | - RuntimeCall::Nfts { .. } | RuntimeCall::Uniques { .. } + RuntimeCall::Nfts { .. } | + RuntimeCall::Uniques { .. } ) }, ProxyType::AssetOwner => matches!( @@ -831,7 +832,8 @@ impl InstanceFilter for ProxyType { matches!( c, RuntimeCall::Staking(..) | - RuntimeCall::Session(..) | RuntimeCall::Utility(..) | + RuntimeCall::Session(..) | + RuntimeCall::Utility(..) | RuntimeCall::NominationPools(..) | RuntimeCall::VoterList(..) ) From d33d1dc75760171ad48b716362e878f45e3a4e7a Mon Sep 17 00:00:00 2001 From: "cmd[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 15:15:04 +0000 Subject: [PATCH 14/17] Update from github-actions[bot] running command 'bench --pallet pallet_election_provider_multi_block pallet_election_provider_multi_block::signed pallet_election_provider_multi_block::verifier pallet_election_provider_multi_block::unsigned --runtime asset-hub-westend' --- .../pallet_election_provider_multi_block.rs | 38 +++++++++---------- ...et_election_provider_multi_block_signed.rs | 36 +++++++++--------- ..._election_provider_multi_block_unsigned.rs | 16 ++++---- ..._election_provider_multi_block_verifier.rs | 28 +++++++------- 4 files changed, 59 insertions(+), 59 deletions(-) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs index 8a978cfdd145..a0bf4b0fa205 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs @@ -18,7 +18,7 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2025-11-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ee5d140fac7a`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `4e4e89597de4`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: @@ -60,8 +60,8 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `223` // Estimated: `3688` - // Minimum execution time: 9_346_000 picoseconds. - Weight::from_parts(9_735_000, 0) + // Minimum execution time: 9_159_000 picoseconds. + Weight::from_parts(9_679_000, 0) .saturating_add(Weight::from_parts(0, 3688)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -90,8 +90,8 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `48451` // Estimated: `2526916` - // Minimum execution time: 6_122_910_000 picoseconds. - Weight::from_parts(6_202_911_000, 0) + // Minimum execution time: 6_099_387_000 picoseconds. + Weight::from_parts(6_130_728_000, 0) .saturating_add(Weight::from_parts(0, 2526916)) .saturating_add(T::DbWeight::get().reads(1007)) .saturating_add(T::DbWeight::get().writes(4)) @@ -132,8 +132,8 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `1495743` // Estimated: `3241608` - // Minimum execution time: 31_001_787_000 picoseconds. - Weight::from_parts(33_712_777_000, 0) + // Minimum execution time: 31_067_483_000 picoseconds. + Weight::from_parts(32_523_447_000, 0) .saturating_add(Weight::from_parts(0, 3241608)) .saturating_add(T::DbWeight::get().reads(2924)) .saturating_add(T::DbWeight::get().writes(6)) @@ -176,8 +176,8 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `1527537` // Estimated: `3273402` - // Minimum execution time: 34_085_004_000 picoseconds. - Weight::from_parts(35_200_523_000, 0) + // Minimum execution time: 33_243_165_000 picoseconds. + Weight::from_parts(34_278_981_000, 0) .saturating_add(Weight::from_parts(0, 3273402)) .saturating_add(T::DbWeight::get().reads(2860)) .saturating_add(T::DbWeight::get().writes(6)) @@ -192,8 +192,8 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `417` // Estimated: `3882` - // Minimum execution time: 40_689_000 picoseconds. - Weight::from_parts(43_146_000, 0) + // Minimum execution time: 35_760_000 picoseconds. + Weight::from_parts(40_182_000, 0) .saturating_add(Weight::from_parts(0, 3882)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -210,8 +210,8 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `417` // Estimated: `3882` - // Minimum execution time: 39_828_000 picoseconds. - Weight::from_parts(46_716_000, 0) + // Minimum execution time: 36_910_000 picoseconds. + Weight::from_parts(41_714_000, 0) .saturating_add(Weight::from_parts(0, 3882)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) @@ -234,8 +234,8 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `1479` // Estimated: `4944` - // Minimum execution time: 77_706_000 picoseconds. - Weight::from_parts(96_332_000, 0) + // Minimum execution time: 71_941_000 picoseconds. + Weight::from_parts(88_350_000, 0) .saturating_add(Weight::from_parts(0, 4944)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) @@ -272,8 +272,8 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `4847` // Estimated: `85037` - // Minimum execution time: 276_168_000 picoseconds. - Weight::from_parts(317_676_000, 0) + // Minimum execution time: 277_669_000 picoseconds. + Weight::from_parts(327_533_000, 0) .saturating_add(Weight::from_parts(0, 85037)) .saturating_add(T::DbWeight::get().reads(104)) .saturating_add(T::DbWeight::get().writes(106)) @@ -282,8 +282,8 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 198_000 picoseconds. - Weight::from_parts(233_000, 0) + // Minimum execution time: 177_000 picoseconds. + Weight::from_parts(207_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_signed.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_signed.rs index da3fbafd67f3..b466ffcb617b 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_signed.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_signed.rs @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Autogenerated weights for `pallet_election_provider_multi_block_signed` +//! Autogenerated weights for `pallet_election_provider_multi_block::signed` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2025-11-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ee5d140fac7a`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `4e4e89597de4`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: @@ -28,7 +28,7 @@ // pallet // --extrinsic=* // --runtime=target/production/wbuild/asset-hub-westend-runtime/asset_hub_westend_runtime.wasm -// --pallet=pallet_election_provider_multi_block_signed +// --pallet=pallet_election_provider_multi_block::signed // --header=/__w/polkadot-sdk/polkadot-sdk/cumulus/file_header.txt // --output=./cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights // --wasm-execution=compiled @@ -47,7 +47,7 @@ use frame_support::{traits::Get, weights::Weight}; use core::marker::PhantomData; -/// Weight functions for `pallet_election_provider_multi_block_signed`. +/// Weight functions for `pallet_election_provider_multi_block::signed`. pub struct WeightInfo(PhantomData); impl pallet_election_provider_multi_block::signed::WeightInfo for WeightInfo { /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:0) @@ -66,8 +66,8 @@ impl pallet_election_provider_multi_block::signed::Weig // Proof Size summary in bytes: // Measured: `3252` // Estimated: `6717` - // Minimum execution time: 82_850_000 picoseconds. - Weight::from_parts(84_898_000, 0) + // Minimum execution time: 84_228_000 picoseconds. + Weight::from_parts(86_570_000, 0) .saturating_add(Weight::from_parts(0, 6717)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -90,8 +90,8 @@ impl pallet_election_provider_multi_block::signed::Weig // Proof Size summary in bytes: // Measured: `7851` // Estimated: `88041` - // Minimum execution time: 226_920_000 picoseconds. - Weight::from_parts(231_264_000, 0) + // Minimum execution time: 222_687_000 picoseconds. + Weight::from_parts(230_636_000, 0) .saturating_add(Weight::from_parts(0, 88041)) .saturating_add(T::DbWeight::get().reads(39)) .saturating_add(T::DbWeight::get().writes(37)) @@ -114,8 +114,8 @@ impl pallet_election_provider_multi_block::signed::Weig // Proof Size summary in bytes: // Measured: `3785` // Estimated: `7250` - // Minimum execution time: 177_690_000 picoseconds. - Weight::from_parts(184_741_000, 0) + // Minimum execution time: 165_801_000 picoseconds. + Weight::from_parts(176_562_000, 0) .saturating_add(Weight::from_parts(0, 7250)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) @@ -138,8 +138,8 @@ impl pallet_election_provider_multi_block::signed::Weig // Proof Size summary in bytes: // Measured: `3887` // Estimated: `7352` - // Minimum execution time: 163_973_000 picoseconds. - Weight::from_parts(215_149_000, 0) + // Minimum execution time: 160_561_000 picoseconds. + Weight::from_parts(170_941_000, 0) .saturating_add(Weight::from_parts(0, 7352)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) @@ -160,8 +160,8 @@ impl pallet_election_provider_multi_block::signed::Weig // Proof Size summary in bytes: // Measured: `4717` // Estimated: `84907` - // Minimum execution time: 138_718_000 picoseconds. - Weight::from_parts(145_406_000, 0) + // Minimum execution time: 138_704_000 picoseconds. + Weight::from_parts(144_347_000, 0) .saturating_add(Weight::from_parts(0, 84907)) .saturating_add(T::DbWeight::get().reads(37)) .saturating_add(T::DbWeight::get().writes(35)) @@ -183,11 +183,11 @@ impl pallet_election_provider_multi_block::signed::Weig // Proof Size summary in bytes: // Measured: `3709 + p * (32 ±0)` // Estimated: `7174 + p * (2507 ±0)` - // Minimum execution time: 84_757_000 picoseconds. - Weight::from_parts(86_554_733, 0) + // Minimum execution time: 85_763_000 picoseconds. + Weight::from_parts(87_799_824, 0) .saturating_add(Weight::from_parts(0, 7174)) - // Standard Error: 7_137 - .saturating_add(Weight::from_parts(1_165_345, 0).saturating_mul(p.into())) + // Standard Error: 6_631 + .saturating_add(Weight::from_parts(1_108_464, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_unsigned.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_unsigned.rs index fb9e227a2659..86087ca3a50d 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_unsigned.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_unsigned.rs @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Autogenerated weights for `pallet_election_provider_multi_block_unsigned` +//! Autogenerated weights for `pallet_election_provider_multi_block::unsigned` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2025-11-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ee5d140fac7a`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `4e4e89597de4`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: @@ -28,7 +28,7 @@ // pallet // --extrinsic=* // --runtime=target/production/wbuild/asset-hub-westend-runtime/asset_hub_westend_runtime.wasm -// --pallet=pallet_election_provider_multi_block_unsigned +// --pallet=pallet_election_provider_multi_block::unsigned // --header=/__w/polkadot-sdk/polkadot-sdk/cumulus/file_header.txt // --output=./cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights // --wasm-execution=compiled @@ -47,7 +47,7 @@ use frame_support::{traits::Get, weights::Weight}; use core::marker::PhantomData; -/// Weight functions for `pallet_election_provider_multi_block_unsigned`. +/// Weight functions for `pallet_election_provider_multi_block::unsigned`. pub struct WeightInfo(PhantomData); impl pallet_election_provider_multi_block::unsigned::WeightInfo for WeightInfo { /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:0) @@ -68,8 +68,8 @@ impl pallet_election_provider_multi_block::unsigned::We // Proof Size summary in bytes: // Measured: `351` // Estimated: `3816` - // Minimum execution time: 38_890_000 picoseconds. - Weight::from_parts(43_247_000, 0) + // Minimum execution time: 39_296_000 picoseconds. + Weight::from_parts(47_914_000, 0) .saturating_add(Weight::from_parts(0, 3816)) .saturating_add(T::DbWeight::get().reads(7)) } @@ -95,8 +95,8 @@ impl pallet_election_provider_multi_block::unsigned::We // Proof Size summary in bytes: // Measured: `760999` // Estimated: `766939` - // Minimum execution time: 1_192_782_000 picoseconds. - Weight::from_parts(1_304_744_000, 0) + // Minimum execution time: 1_231_740_000 picoseconds. + Weight::from_parts(1_412_905_000, 0) .saturating_add(Weight::from_parts(0, 766939)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_verifier.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_verifier.rs index c5a68e063958..25ab56e76fec 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_verifier.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block_verifier.rs @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Autogenerated weights for `pallet_election_provider_multi_block_verifier` +//! Autogenerated weights for `pallet_election_provider_multi_block::verifier` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 //! DATE: 2025-11-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ee5d140fac7a`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `4e4e89597de4`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: @@ -28,7 +28,7 @@ // pallet // --extrinsic=* // --runtime=target/production/wbuild/asset-hub-westend-runtime/asset_hub_westend_runtime.wasm -// --pallet=pallet_election_provider_multi_block_verifier +// --pallet=pallet_election_provider_multi_block::verifier // --header=/__w/polkadot-sdk/polkadot-sdk/cumulus/file_header.txt // --output=./cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights // --wasm-execution=compiled @@ -47,7 +47,7 @@ use frame_support::{traits::Get, weights::Weight}; use core::marker::PhantomData; -/// Weight functions for `pallet_election_provider_multi_block_verifier`. +/// Weight functions for `pallet_election_provider_multi_block::verifier`. pub struct WeightInfo(PhantomData); impl pallet_election_provider_multi_block::verifier::WeightInfo for WeightInfo { /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1) @@ -78,8 +78,8 @@ impl pallet_election_provider_multi_block::verifier::We // Proof Size summary in bytes: // Measured: `373231` // Estimated: `376696` - // Minimum execution time: 640_916_000 picoseconds. - Weight::from_parts(684_210_000, 0) + // Minimum execution time: 644_343_000 picoseconds. + Weight::from_parts(679_857_000, 0) .saturating_add(Weight::from_parts(0, 376696)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(4)) @@ -118,8 +118,8 @@ impl pallet_election_provider_multi_block::verifier::We // Proof Size summary in bytes: // Measured: `409786` // Estimated: `492451` - // Minimum execution time: 1_141_494_000 picoseconds. - Weight::from_parts(1_219_835_000, 0) + // Minimum execution time: 1_103_713_000 picoseconds. + Weight::from_parts(1_174_958_000, 0) .saturating_add(Weight::from_parts(0, 492451)) .saturating_add(T::DbWeight::get().reads(77)) .saturating_add(T::DbWeight::get().writes(72)) @@ -158,8 +158,8 @@ impl pallet_election_provider_multi_block::verifier::We // Proof Size summary in bytes: // Measured: `409786` // Estimated: `492451` - // Minimum execution time: 1_142_497_000 picoseconds. - Weight::from_parts(1_241_390_000, 0) + // Minimum execution time: 1_080_694_000 picoseconds. + Weight::from_parts(1_155_637_000, 0) .saturating_add(Weight::from_parts(0, 492451)) .saturating_add(T::DbWeight::get().reads(108)) .saturating_add(T::DbWeight::get().writes(102)) @@ -199,11 +199,11 @@ impl pallet_election_provider_multi_block::verifier::We // Proof Size summary in bytes: // Measured: `417197 + v * (37 ±0)` // Estimated: `488349 + v * (2550 ±72)` - // Minimum execution time: 852_052_000 picoseconds. - Weight::from_parts(979_657_523, 0) + // Minimum execution time: 813_783_000 picoseconds. + Weight::from_parts(886_800_578, 0) .saturating_add(Weight::from_parts(0, 488349)) - // Standard Error: 162_209 - .saturating_add(Weight::from_parts(2_885_560, 0).saturating_mul(v.into())) + // Standard Error: 111_448 + .saturating_add(Weight::from_parts(3_520_338, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(44)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(v.into()))) .saturating_add(T::DbWeight::get().writes(38)) From bd5076070e61cf0f4a60d7afc5666f727e450b43 Mon Sep 17 00:00:00 2001 From: kianenigma Date: Wed, 12 Nov 2025 10:01:17 +0000 Subject: [PATCH 15/17] prdoc --- prdoc/pr_10284.prdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prdoc/pr_10284.prdoc b/prdoc/pr_10284.prdoc index 0cad7a13b30c..31589dee684a 100644 --- a/prdoc/pr_10284.prdoc +++ b/prdoc/pr_10284.prdoc @@ -2,7 +2,7 @@ title: add fresh weights for westend asset hub doc: - audience: Runtime Dev description: |- - - And deprecate `FastUnstake` as it is unsafe + - deprecate `FastUnstake` as it is unsafe - And use the faster solver for benchmarks to speed things up - Remove hardcoded weights of westend. From 055d11edc77d607e72e67ee73d119c9b142b9654 Mon Sep 17 00:00:00 2001 From: kianenigma Date: Wed, 12 Nov 2025 11:46:00 +0000 Subject: [PATCH 16/17] replace new weights with default --- .../weights/pallet_election_provider_multi_block.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs index a0bf4b0fa205..02c033b3b991 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs @@ -278,12 +278,10 @@ impl pallet_election_provider_multi_block::WeightInfo f .saturating_add(T::DbWeight::get().reads(104)) .saturating_add(T::DbWeight::get().writes(106)) } - fn manage() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 177_000 picoseconds. - Weight::from_parts(207_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + fn admin_set() -> Weight { + Default::default() + } + fn manage_fallback() -> Weight { + Default::default() } } From c3e3ab0785a33be59dda64a85b34c6ab61d24c90 Mon Sep 17 00:00:00 2001 From: "cmd[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 12 Nov 2025 12:32:21 +0000 Subject: [PATCH 17/17] Update from github-actions[bot] running command 'bench --pallet pallet_election_provider_multi_block --runtime asset-hub-westend' --- .../pallet_election_provider_multi_block.rs | 84 ++++++++++++++----- 1 file changed, 62 insertions(+), 22 deletions(-) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs index 02c033b3b991..9b3e86d628a4 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_election_provider_multi_block.rs @@ -16,9 +16,9 @@ //! Autogenerated weights for `pallet_election_provider_multi_block` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-11-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-11-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `4e4e89597de4`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `e7fc875cf0e9`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: @@ -60,8 +60,8 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `223` // Estimated: `3688` - // Minimum execution time: 9_159_000 picoseconds. - Weight::from_parts(9_679_000, 0) + // Minimum execution time: 9_014_000 picoseconds. + Weight::from_parts(9_476_000, 0) .saturating_add(Weight::from_parts(0, 3688)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -90,8 +90,8 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `48451` // Estimated: `2526916` - // Minimum execution time: 6_099_387_000 picoseconds. - Weight::from_parts(6_130_728_000, 0) + // Minimum execution time: 6_260_099_000 picoseconds. + Weight::from_parts(6_346_593_000, 0) .saturating_add(Weight::from_parts(0, 2526916)) .saturating_add(T::DbWeight::get().reads(1007)) .saturating_add(T::DbWeight::get().writes(4)) @@ -132,8 +132,8 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `1495743` // Estimated: `3241608` - // Minimum execution time: 31_067_483_000 picoseconds. - Weight::from_parts(32_523_447_000, 0) + // Minimum execution time: 35_371_801_000 picoseconds. + Weight::from_parts(36_135_165_000, 0) .saturating_add(Weight::from_parts(0, 3241608)) .saturating_add(T::DbWeight::get().reads(2924)) .saturating_add(T::DbWeight::get().writes(6)) @@ -176,8 +176,8 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `1527537` // Estimated: `3273402` - // Minimum execution time: 33_243_165_000 picoseconds. - Weight::from_parts(34_278_981_000, 0) + // Minimum execution time: 34_672_020_000 picoseconds. + Weight::from_parts(36_788_513_000, 0) .saturating_add(Weight::from_parts(0, 3273402)) .saturating_add(T::DbWeight::get().reads(2860)) .saturating_add(T::DbWeight::get().writes(6)) @@ -192,8 +192,8 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `417` // Estimated: `3882` - // Minimum execution time: 35_760_000 picoseconds. - Weight::from_parts(40_182_000, 0) + // Minimum execution time: 40_009_000 picoseconds. + Weight::from_parts(48_764_000, 0) .saturating_add(Weight::from_parts(0, 3882)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -210,8 +210,8 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `417` // Estimated: `3882` - // Minimum execution time: 36_910_000 picoseconds. - Weight::from_parts(41_714_000, 0) + // Minimum execution time: 43_182_000 picoseconds. + Weight::from_parts(50_229_000, 0) .saturating_add(Weight::from_parts(0, 3882)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) @@ -234,8 +234,8 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `1479` // Estimated: `4944` - // Minimum execution time: 71_941_000 picoseconds. - Weight::from_parts(88_350_000, 0) + // Minimum execution time: 79_265_000 picoseconds. + Weight::from_parts(97_578_000, 0) .saturating_add(Weight::from_parts(0, 4944)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) @@ -272,16 +272,56 @@ impl pallet_election_provider_multi_block::WeightInfo f // Proof Size summary in bytes: // Measured: `4847` // Estimated: `85037` - // Minimum execution time: 277_669_000 picoseconds. - Weight::from_parts(327_533_000, 0) + // Minimum execution time: 286_577_000 picoseconds. + Weight::from_parts(411_747_000, 0) .saturating_add(Weight::from_parts(0, 85037)) .saturating_add(T::DbWeight::get().reads(104)) .saturating_add(T::DbWeight::get().writes(106)) } - fn admin_set() -> Weight { - Default::default() - } + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:0) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElection::Round` (r:1 w:0) + /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedVoterSnapshot` (r:1 w:0) + /// Proof: `MultiBlockElection::PagedVoterSnapshot` (`max_values`: None, `max_size`: Some(388785), added: 391260, mode: `Measured`) + /// Storage: `MultiBlockElection::PagedTargetSnapshot` (r:1 w:0) + /// Proof: `MultiBlockElection::PagedTargetSnapshot` (`max_values`: None, `max_size`: Some(32026), added: 34501, mode: `Measured`) + /// Storage: `MultiBlockElection::DesiredTargets` (r:1 w:0) + /// Proof: `MultiBlockElection::DesiredTargets` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedSolutionScore` (r:1 w:1) + /// Proof: `MultiBlockElectionVerifier::QueuedSolutionScore` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedValidVariant` (r:1 w:0) + /// Proof: `MultiBlockElectionVerifier::QueuedValidVariant` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedSolutionY` (r:0 w:1) + /// Proof: `MultiBlockElectionVerifier::QueuedSolutionY` (`max_values`: None, `max_size`: Some(33794026), added: 33796501, mode: `Measured`) fn manage_fallback() -> Weight { - Default::default() + // Proof Size summary in bytes: + // Measured: `372173` + // Estimated: `375638` + // Minimum execution time: 3_130_891_000 picoseconds. + Weight::from_parts(3_242_891_000, 0) + .saturating_add(Weight::from_parts(0, 375638)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:0) + /// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`) + /// Storage: `MultiBlockElection::Round` (r:1 w:0) + /// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedSolutionScore` (r:1 w:1) + /// Proof: `MultiBlockElectionVerifier::QueuedSolutionScore` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedValidVariant` (r:1 w:0) + /// Proof: `MultiBlockElectionVerifier::QueuedValidVariant` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `Measured`) + /// Storage: `MultiBlockElectionVerifier::QueuedSolutionY` (r:0 w:1) + /// Proof: `MultiBlockElectionVerifier::QueuedSolutionY` (`max_values`: None, `max_size`: Some(33794026), added: 33796501, mode: `Measured`) + fn admin_set() -> Weight { + // Proof Size summary in bytes: + // Measured: `308` + // Estimated: `3773` + // Minimum execution time: 58_785_000 picoseconds. + Weight::from_parts(72_105_000, 0) + .saturating_add(Weight::from_parts(0, 3773)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(2)) } }