Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -294,7 +294,7 @@ impl pallet_staking_async::Config for Runtime {
type EventListeners = (NominationPools, DelegatedStaking);
type WeightInfo = weights::pallet_staking_async::WeightInfo<Runtime>;
type MaxInvulnerables = frame_support::traits::ConstU32<20>;
type PlanningEraOffset = PlanningEraOffset;
type PlanningEraOffset = ConstU32<6>;
type RcClientInterface = StakingRcClient;
type MaxEraDuration = MaxEraDuration;
type MaxPruningItems = MaxPruningItems;
Expand All @@ -305,6 +305,8 @@ impl pallet_staking_async_rc_client::Config for Runtime {
type AHStakingInterface = Staking;
type SendToRelayChain = StakingXcmToRelayChain;
type MaxValidatorSetRetries = ConstU32<64>;
// export validator session at end of session 4 within an era.
type ValidatorSetExportSession = ConstU32<4>;
}

#[derive(Encode, Decode)]
Expand Down
20 changes: 20 additions & 0 deletions prdoc/pr_10311.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
title: '[Staking] Async Elections Post AHM'
doc:
- audience: Runtime Dev
description: |-
Staking elections can be configured so they run as soon as the era starts, but their results are buffered and
only sent to RC after the end of session `n - 2` and before start of session `n - 1`, assuming the new validator set
must activate at end of session `n`.

This helps us avoid difficulty of timing the election precisely as elections are long running and can sometimes
take longer than usual.

See documentation for `pallet_staking_async::Config::PlanningEraOffset` and
`pallet_staking_async_rc_client::Config::ValidatorSetExportSession` to learn more.
crates:
- name: pallet-staking-async
bump: minor
- name: pallet-staking-async-rc-client
bump: minor
- name: asset-hub-westend-runtime
bump: minor
Loading
Loading