Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
53fa912
add fresh weights for westend asset hub
kianenigma Nov 11, 2025
9900e5a
remove hardcoded westend weights
kianenigma Nov 11, 2025
fb610a0
Merge branch 'master' into kiz-epmb-westend-weights
kianenigma Nov 11, 2025
f498caf
Update from github-actions[bot] running command 'bench --pallet palle…
github-actions[bot] Nov 11, 2025
4cf7b76
fmt
kianenigma Nov 11, 2025
a16b724
Merge branch 'kiz-epmb-westend-weights' of github.com:paritytech/polk…
kianenigma Nov 11, 2025
317a1c1
Merge branch 'master' into kiz-epmb-westend-weights
kianenigma Nov 11, 2025
d6f601f
Merge branch 'kiz-epmb-westend-weights' of github.com:paritytech/polk…
kianenigma Nov 11, 2025
d3931df
Update from github-actions[bot] running command 'prdoc --bump patch'
github-actions[bot] Nov 11, 2025
a98fce3
Merge branch 'kiz-epmb-westend-weights' of github.com:paritytech/polk…
kianenigma Nov 11, 2025
a402081
Prdoc
kianenigma Nov 11, 2025
fb94607
fmt
kianenigma Nov 11, 2025
ed958c6
Update prdoc/pr_10284.prdoc
kianenigma Nov 11, 2025
4068b14
fix paths?
kianenigma Nov 11, 2025
a88c57d
fix names
kianenigma Nov 11, 2025
5fedb21
fmt
kianenigma Nov 11, 2025
e0d725e
fix benchmarks
kianenigma Nov 11, 2025
0122715
Merge branch 'master' into kiz-epmb-westend-weights
kianenigma Nov 11, 2025
9c64225
fmt
kianenigma Nov 11, 2025
d33d1dc
Update from github-actions[bot] running command 'bench --pallet palle…
github-actions[bot] Nov 11, 2025
fcac63c
Merge branch 'kiz-epmb-westend-weights' of github.com:paritytech/polk…
kianenigma Nov 12, 2025
bd50760
prdoc
kianenigma Nov 12, 2025
bc31032
Merge branch 'master' into kiz-epmb-westend-weights
kianenigma Nov 12, 2025
055d11e
replace new weights with default
kianenigma Nov 12, 2025
c3e3ab0
Update from github-actions[bot] running command 'bench --pallet palle…
github-actions[bot] Nov 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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<Vec<u8>> {
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.
Expand Down
15 changes: 9 additions & 6 deletions cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,6 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
RuntimeCall::Session(..) |
RuntimeCall::Utility(..) |
RuntimeCall::NominationPools(..) |
RuntimeCall::FastUnstake(..) |
RuntimeCall::VoterList(..)
)
},
Expand Down Expand Up @@ -1213,6 +1212,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 {
Expand All @@ -1221,6 +1221,10 @@ impl pallet_migrations::Config for Runtime {
type Migrations = (
pallet_revive::migrations::v1::Migration<Runtime>,
pallet_revive::migrations::v2::Migration<Runtime>,
frame_support::migrations::RemovePallet<
FastUnstakeName,
<Runtime as frame_system::Config>::DbWeight,
>,
);
// Benchmarks need mocked migrations to guarantee that they succeed.
#[cfg(feature = "runtime-benchmarks")]
Expand Down Expand Up @@ -1369,7 +1373,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::<Instance1> = 83,
DelegatedStaking: pallet_delegated_staking = 84,
StakingRcClient: pallet_staking_async_rc_client = 89,
Expand Down Expand Up @@ -1679,12 +1684,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]
Expand Down
34 changes: 14 additions & 20 deletions cumulus/parachains/runtimes/assets/asset-hub-westend/src/staking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<Self>;
type OnRoundRotation = multi_block::CleanRound<Self>;
type WeightInfo = multi_block::weights::westend::MultiBlockWeightInfo<Self>;
type WeightInfo = weights::pallet_election_provider_multi_block::WeightInfo<Runtime>;
}

impl multi_block::verifier::Config for Runtime {
Expand All @@ -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<Self>;
type WeightInfo = weights::pallet_election_provider_multi_block_verifier::WeightInfo<Runtime>;
}

parameter_types! {
Expand All @@ -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<Self>;
type WeightInfo = weights::pallet_election_provider_multi_block_signed::WeightInfo<Runtime>;
}

parameter_types! {
Expand All @@ -181,7 +181,7 @@ impl multi_block::unsigned::Config for Runtime {
type OffchainSolver = SequentialPhragmen<AccountId, SolutionAccuracyOf<Runtime>>;
type MinerTxPriority = MinerTxPriority;
type OffchainRepeat = OffchainRepeat;
type WeightInfo = multi_block::weights::westend::MultiBlockUnsignedWeightInfo<Self>;
type WeightInfo = weights::pallet_election_provider_multi_block_unsigned::WeightInfo<Runtime>;
}

parameter_types! {
Expand All @@ -202,11 +202,16 @@ impl multi_block::unsigned::miner::MinerConfig for Runtime {
type MaxVotesPerVoter =
<<Self as multi_block::Config>::DataProvider as ElectionDataProvider>::MaxVotesPerVoter;
type MaxLength = MinerMaxLength;
type Solver = <Runtime as multi_block::unsigned::Config>::OffchainSolver;
type Pages = Pages;
type Solution = NposCompactSolution16;
type VoterSnapshotPerBlock = <Runtime as multi_block::Config>::VoterSnapshotPerBlock;
type TargetSnapshotPerBlock = <Runtime as multi_block::Config>::TargetSnapshotPerBlock;
// for prod, use whatever solver we are using in the miner -- phragmen algorithm
#[cfg(not(feature = "runtime-benchmarks"))]
type Solver = <Runtime as multi_block::unsigned::Config>::OffchainSolver;
Comment thread
kianenigma marked this conversation as resolved.
// for benchmarks, use the faster solver
#[cfg(feature = "runtime-benchmarks")]
type Solver = frame_election_provider_support::QuickDirtySolver<AccountId, Perbill>;
}

parameter_types! {
Expand All @@ -218,10 +223,10 @@ type VoterBagsListInstance = pallet_bags_list::Instance1;
impl pallet_bags_list::Config<VoterBagsListInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type ScoreProvider = Staking;
type WeightInfo = weights::pallet_bags_list::WeightInfo<Runtime>;
type BagThresholds = BagThresholds;
type Score = sp_npos_elections::VoteWeight;
type MaxAutoRebagPerBlock = AutoRebagNumber;
type WeightInfo = weights::pallet_bags_list::WeightInfo<Runtime>;
}

pub struct EraPayout;
Expand Down Expand Up @@ -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<Runtime>;
type MaxInvulnerables = frame_support::traits::ConstU32<20>;
type PlanningEraOffset =
pallet_staking_async::PlanningEraOffsetOf<Runtime, RelaySessionDuration, ConstU32<5>>;
type RcClientInterface = StakingRcClient;
type MaxEraDuration = MaxEraDuration;
type MaxPruningItems = MaxPruningItems;
type WeightInfo = weights::pallet_staking_async::WeightInfo<Runtime>;
}

impl pallet_staking_async_rc_client::Config for Runtime {
Expand Down Expand Up @@ -361,25 +366,13 @@ 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<AccountId>;
type Staking = Staking;
type MaxErasToCheckPerBlock = ConstU32<1>;
type WeightInfo = weights::pallet_fast_unstake::WeightInfo<Runtime>;
}

parameter_types! {
pub const PoolsPalletId: PalletId = PalletId(*b"py/nopls");
pub const MaxPointsToBalance: u8 = 10;
}

impl pallet_nomination_pools::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = weights::pallet_nomination_pools::WeightInfo<Self>;
type Currency = Balances;
type RuntimeFreezeReason = RuntimeFreezeReason;
type RewardCounter = FixedU128;
Expand All @@ -396,6 +389,7 @@ impl pallet_nomination_pools::Config for Runtime {
type AdminOrigin = EitherOf<EnsureRoot<AccountId>, StakingAdmin>;
type BlockNumberProvider = RelaychainDataProvider<Runtime>;
type Filter = Nothing;
type WeightInfo = weights::pallet_nomination_pools::WeightInfo<Self>;
}

parameter_types! {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading
Loading