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
6 changes: 3 additions & 3 deletions cumulus/pallets/ah-ops/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub mod benchmarks {
let _ = T::Currency::deposit_creating(&sender, ed + ed);
let _ = T::Currency::reserve(&sender, ed);
let block = T::RcBlockNumberProvider::current_block_number();
let para_id = ParaId::from(1);
let para_id = ParaId::from(1u16);
RcLeaseReserve::<T>::insert((block, para_id, &sender), ed);

assert_eq!(T::Currency::reserved_balance(&sender), ed);
Expand All @@ -49,7 +49,7 @@ pub mod benchmarks {
let _ = T::Currency::deposit_creating(&pot, ed + ed);
let _ = T::Currency::reserve(&pot, ed);
let block = T::RcBlockNumberProvider::current_block_number();
let para_id = ParaId::from(1);
let para_id = ParaId::from(1u16);
RcLeaseReserve::<T>::insert((block, para_id, &pot), ed);

let sender = account("sender", 0, 0);
Expand All @@ -72,7 +72,7 @@ pub mod benchmarks {
let _ = T::Currency::deposit_creating(&sender, ed + ed);
let _ = T::Currency::reserve(&sender, ed);
let block = T::RcBlockNumberProvider::current_block_number();
let para_id = ParaId::from(1);
let para_id = ParaId::from(1u16);
RcCrowdloanReserve::<T>::insert((block, para_id, &sender), ed);

assert_eq!(T::Currency::reserved_balance(&sender), ed);
Expand Down
18 changes: 9 additions & 9 deletions cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1347,13 +1347,13 @@ construct_runtime!(
FastUnstake: pallet_fast_unstake = 82,
VoterList: pallet_bags_list::<Instance1> = 83,
DelegatedStaking: pallet_delegated_staking = 84,
StakingNextRcClient: pallet_staking_async_rc_client = 89,
StakingRcClient: pallet_staking_async_rc_client = 89,

// Staking election apparatus.
MultiBlock: pallet_election_provider_multi_block = 85,
MultiBlockVerifier: pallet_election_provider_multi_block::verifier = 86,
MultiBlockUnsigned: pallet_election_provider_multi_block::unsigned = 87,
MultiBlockSigned: pallet_election_provider_multi_block::signed = 88,
MultiBlockElection: pallet_election_provider_multi_block = 85,
MultiBlockElectionVerifier: pallet_election_provider_multi_block::verifier = 86,
MultiBlockElectionUnsigned: pallet_election_provider_multi_block::unsigned = 87,
MultiBlockElectionSigned: pallet_election_provider_multi_block::signed = 88,

// Governance.
ConvictionVoting: pallet_conviction_voting = 90,
Expand Down Expand Up @@ -1653,10 +1653,10 @@ mod benches {
[pallet_bags_list, VoterList]
[pallet_balances, Balances]
[pallet_conviction_voting, ConvictionVoting]
[pallet_election_provider_multi_block, MultiBlock]
[pallet_election_provider_multi_block_verifier, MultiBlockVerifier]
[pallet_election_provider_multi_block_unsigned, MultiBlockUnsigned]
[pallet_election_provider_multi_block_signed, MultiBlockSigned]
[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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl multi_block::Config for Runtime {
EitherOfDiverse<EnsureRoot<AccountId>, EnsureSignedBy<WestendStakingMiner, AccountId>>;
type DataProvider = Staking;
type MinerConfig = Self;
type Verifier = MultiBlockVerifier;
type Verifier = MultiBlockElectionVerifier;
// we chill and do nothing in the fallback.
type Fallback = multi_block::Continue<Self>;
// Revert back to signed phase if nothing is submitted and queued, so we prolong the election.
Expand All @@ -113,7 +113,7 @@ impl multi_block::verifier::Config for Runtime {
type MaxWinnersPerPage = MaxWinnersPerPage;
type MaxBackersPerWinner = MaxBackersPerWinner;
type MaxBackersPerWinnerFinal = MaxBackersPerWinnerFinal;
type SolutionDataProvider = MultiBlockSigned;
type SolutionDataProvider = MultiBlockElectionSigned;
type SolutionImprovementThreshold = SolutionImprovementThreshold;
type WeightInfo = multi_block::weights::westend::MultiBlockVerifierWeightInfo<Self>;
}
Expand Down Expand Up @@ -249,7 +249,7 @@ impl pallet_staking_async::Config for Runtime {
type AdminOrigin = EitherOf<EnsureRoot<AccountId>, StakingAdmin>;
type EraPayout = EraPayout;
type MaxExposurePageSize = MaxExposurePageSize;
type ElectionProvider = MultiBlock;
type ElectionProvider = MultiBlockElection;
type VoterList = VoterList;
type TargetList = UseValidatorsMap<Self>;
type MaxValidatorSet = MaxValidatorSet;
Expand All @@ -262,7 +262,7 @@ impl pallet_staking_async::Config for Runtime {
type MaxInvulnerables = frame_support::traits::ConstU32<20>;
type MaxDisabledValidators = ConstU32<100>;
type PlanningEraOffset = PlanningEraOffset;
type RcClientInterface = StakingNextRcClient;
type RcClientInterface = StakingRcClient;
}

impl pallet_staking_async_rc_client::Config for Runtime {
Expand Down
12 changes: 6 additions & 6 deletions polkadot/runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ impl pallet_timestamp::Config for Runtime {

impl pallet_authorship::Config for Runtime {
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Babe>;
type EventHandler = AssetHubStakingClient;
type EventHandler = StakingAhClient;
}

parameter_types! {
Expand All @@ -528,7 +528,7 @@ impl pallet_session::Config for Runtime {
type ValidatorIdOf = ConvertInto;
type ShouldEndSession = Babe;
type NextSessionRotation = Babe;
type SessionManager = session_historical::NoteHistoricalRoot<Self, AssetHubStakingClient>;
type SessionManager = session_historical::NoteHistoricalRoot<Self, StakingAhClient>;
type SessionHandler = <SessionKeys as OpaqueKeys>::KeyTypeIdProviders;
type Keys = SessionKeys;
type DisablingStrategy = pallet_session::disabling::UpToLimitWithReEnablingDisablingStrategy;
Expand Down Expand Up @@ -961,7 +961,7 @@ impl pallet_treasury::Config for Runtime {
impl pallet_offences::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type IdentificationTuple = session_historical::IdentificationTuple<Self>;
type OnOffenceHandler = AssetHubStakingClient;
type OnOffenceHandler = StakingAhClient;
}

impl pallet_authority_discovery::Config for Runtime {
Expand Down Expand Up @@ -1390,7 +1390,7 @@ impl parachains_inclusion::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type DisputesHandler = ParasDisputes;
type RewardValidators =
parachains_reward_points::RewardValidatorsWithEraPoints<Runtime, AssetHubStakingClient>;
parachains_reward_points::RewardValidatorsWithEraPoints<Runtime, StakingAhClient>;
type MessageQueue = MessageQueue;
type WeightInfo = weights::polkadot_runtime_parachains_inclusion::WeightInfo<Runtime>;
}
Expand Down Expand Up @@ -1573,7 +1573,7 @@ impl assigned_slots::Config for Runtime {
impl parachains_disputes::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RewardValidators =
parachains_reward_points::RewardValidatorsWithEraPoints<Runtime, AssetHubStakingClient>;
parachains_reward_points::RewardValidatorsWithEraPoints<Runtime, StakingAhClient>;
type SlashingHandler = parachains_slashing::SlashValidatorsForDisputes<ParasSlashing>;
type WeightInfo = weights::polkadot_runtime_parachains_disputes::WeightInfo<Runtime>;
}
Expand Down Expand Up @@ -1964,7 +1964,7 @@ mod runtime {
#[runtime::pallet_index(66)]
pub type Coretime = coretime;
#[runtime::pallet_index(67)]
pub type AssetHubStakingClient = pallet_staking_async_ah_client;
pub type StakingAhClient = pallet_staking_async_ah_client;

// Migrations pallet
#[runtime::pallet_index(98)]
Expand Down
18 changes: 9 additions & 9 deletions substrate/frame/staking-async/runtimes/parachain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1171,13 +1171,13 @@ construct_runtime!(
FastUnstake: pallet_fast_unstake = 82,
VoterList: pallet_bags_list::<Instance1> = 83,
DelegatedStaking: pallet_delegated_staking = 84,
StakingNextRcClient: pallet_staking_async_rc_client = 89,
StakingRcClient: pallet_staking_async_rc_client = 89,

// Election apparatus.
MultiBlock: pallet_election_provider_multi_block = 85,
MultiBlockVerifier: pallet_election_provider_multi_block::verifier = 86,
MultiBlockUnsigned: pallet_election_provider_multi_block::unsigned = 87,
MultiBlockSigned: pallet_election_provider_multi_block::signed = 88,
MultiBlockElection: pallet_election_provider_multi_block = 85,
MultiBlockElectionVerifier: pallet_election_provider_multi_block::verifier = 86,
MultiBlockElectionUnsigned: pallet_election_provider_multi_block::unsigned = 87,
MultiBlockElectionSigned: pallet_election_provider_multi_block::signed = 88,

// Governance.
Preimage: pallet_preimage = 90,
Expand Down Expand Up @@ -1332,10 +1332,10 @@ mod benches {
[pallet_bags_list, VoterList]
[pallet_balances, Balances]
[pallet_conviction_voting, ConvictionVoting]
[pallet_election_provider_multi_block, MultiBlock]
[pallet_election_provider_multi_block_verifier, MultiBlockVerifier]
[pallet_election_provider_multi_block_unsigned, MultiBlockUnsigned]
[pallet_election_provider_multi_block_signed, MultiBlockSigned]
[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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl multi_block::Config for Runtime {
#[cfg(feature = "runtime-benchmarks")]
type Fallback = frame_election_provider_support::onchain::OnChainExecution<OnChainConfig>;
type MinerConfig = Self;
type Verifier = MultiBlockVerifier;
type Verifier = MultiBlockElectionVerifier;
type OnRoundRotation = multi_block::CleanRound<Self>;
type WeightInfo = multi_block::weights::polkadot::MultiBlockWeightInfo<Self>;
}
Expand All @@ -123,7 +123,7 @@ impl multi_block::verifier::Config for Runtime {
type MaxWinnersPerPage = MaxWinnersPerPage;
type MaxBackersPerWinner = MaxBackersPerWinner;
type MaxBackersPerWinnerFinal = MaxBackersPerWinnerFinal;
type SolutionDataProvider = MultiBlockSigned;
type SolutionDataProvider = MultiBlockElectionSigned;
type SolutionImprovementThreshold = SolutionImprovementThreshold;
type WeightInfo = multi_block::weights::polkadot::MultiBlockVerifierWeightInfo<Self>;
}
Expand Down Expand Up @@ -262,7 +262,7 @@ impl pallet_staking_async::Config for Runtime {
type AdminOrigin = EitherOf<EnsureRoot<AccountId>, StakingAdmin>;
type EraPayout = EraPayout;
type MaxExposurePageSize = MaxExposurePageSize;
type ElectionProvider = MultiBlock;
type ElectionProvider = MultiBlockElection;
type VoterList = VoterList;
type TargetList = UseValidatorsMap<Self>;
type MaxValidatorSet = MaxValidatorSet;
Expand All @@ -276,7 +276,7 @@ impl pallet_staking_async::Config for Runtime {
type MaxDisabledValidators = ConstU32<100>;
type PlanningEraOffset =
pallet_staking_async::PlanningEraOffsetOf<Self, RelaySessionDuration, ConstU32<10>>;
type RcClientInterface = StakingNextRcClient;
type RcClientInterface = StakingRcClient;
}

impl pallet_staking_async_rc_client::Config for Runtime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
//! Genesis configs presets for the Westend runtime

use crate::{
AssetHubStakingClientConfig, BabeConfig, BalancesConfig, ConfigurationConfig, RegistrarConfig,
RuntimeGenesisConfig, SessionConfig, SessionKeys, SudoConfig, BABE_GENESIS_EPOCH_CONFIG,
BabeConfig, BalancesConfig, ConfigurationConfig, RegistrarConfig, RuntimeGenesisConfig,
SessionConfig, SessionKeys, StakingAhClientConfig, SudoConfig, BABE_GENESIS_EPOCH_CONFIG,
};
#[cfg(not(feature = "std"))]
use alloc::format;
Expand Down Expand Up @@ -197,7 +197,7 @@ fn westend_testnet_genesis(
sudo: SudoConfig { key: Some(root_key) },
configuration: ConfigurationConfig { config: default_parachains_host_configuration() },
registrar: RegistrarConfig { next_free_para_id: polkadot_primitives::LOWEST_PUBLIC_ID },
asset_hub_staking_client: AssetHubStakingClientConfig {
staking_ah_client: StakingAhClientConfig {
operating_mode: pallet_staking_async_ah_client::OperatingMode::Active,
..Default::default()
}
Expand Down
14 changes: 7 additions & 7 deletions substrate/frame/staking-async/runtimes/rc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ impl pallet_timestamp::Config for Runtime {

impl pallet_authorship::Config for Runtime {
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Babe>;
type EventHandler = AssetHubStakingClient;
type EventHandler = StakingAhClient;
}

parameter_types! {
Expand All @@ -524,7 +524,7 @@ impl sp_runtime::traits::Convert<AccountId, Option<AccountId>> for IdentityValid
}

/// A testing type that implements SessionManager, it receives a new validator set from
/// `AssetHubStakingClient`, but it prevents them from being passed over to the session pallet and
/// `StakingAhClient`, but it prevents them from being passed over to the session pallet and
/// just uses the previous session keys.
pub struct AckButPreviousSessionValidatorsPersist<I>(core::marker::PhantomData<I>);

Expand Down Expand Up @@ -559,7 +559,7 @@ impl pallet_session::Config for Runtime {
type ShouldEndSession = Babe;
type NextSessionRotation = Babe;
type SessionManager = AckButPreviousSessionValidatorsPersist<
session_historical::NoteHistoricalRoot<Self, AssetHubStakingClient>,
session_historical::NoteHistoricalRoot<Self, StakingAhClient>,
>;
type SessionHandler = <SessionKeys as OpaqueKeys>::KeyTypeIdProviders;
type Keys = SessionKeys;
Expand Down Expand Up @@ -941,7 +941,7 @@ impl pallet_treasury::Config for Runtime {
impl pallet_offences::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type IdentificationTuple = session_historical::IdentificationTuple<Self>;
type OnOffenceHandler = AssetHubStakingClient;
type OnOffenceHandler = StakingAhClient;
}

impl pallet_authority_discovery::Config for Runtime {
Expand Down Expand Up @@ -1336,7 +1336,7 @@ impl parachains_inclusion::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type DisputesHandler = ParasDisputes;
type RewardValidators =
parachains_reward_points::RewardValidatorsWithEraPoints<Runtime, AssetHubStakingClient>;
parachains_reward_points::RewardValidatorsWithEraPoints<Runtime, StakingAhClient>;
type MessageQueue = MessageQueue;
type WeightInfo = weights::polkadot_runtime_parachains_inclusion::WeightInfo<Runtime>;
}
Expand Down Expand Up @@ -1513,7 +1513,7 @@ impl assigned_slots::Config for Runtime {
impl parachains_disputes::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RewardValidators =
parachains_reward_points::RewardValidatorsWithEraPoints<Runtime, AssetHubStakingClient>;
parachains_reward_points::RewardValidatorsWithEraPoints<Runtime, StakingAhClient>;
type SlashingHandler = parachains_slashing::SlashValidatorsForDisputes<ParasSlashing>;
type WeightInfo = weights::polkadot_runtime_parachains_disputes::WeightInfo<Runtime>;
}
Expand Down Expand Up @@ -1822,7 +1822,7 @@ mod runtime {
pub type Coretime = coretime;

#[runtime::pallet_index(67)]
pub type AssetHubStakingClient = pallet_staking_async_ah_client;
pub type StakingAhClient = pallet_staking_async_ah_client;

// Migrations pallet
#[runtime::pallet_index(98)]
Expand Down
Loading