Skip to content

Commit

Permalink
[coretime] adapt paritytech/polkadot-sdk#1694 (as noop)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur committed Jan 29, 2024
1 parent dc628ce commit 06684d3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
16 changes: 13 additions & 3 deletions relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,8 @@ impl parachains_paras::Config for Runtime {
type QueueFootprinter = ParaInclusion;
type NextSessionRotation = Babe;
type OnNewHead = Registrar;
// TODO:(PR#159) check `AssignCoretime` bellow and remove this comment!
type AssignCoretime = ();
}

parameter_types! {
Expand Down Expand Up @@ -1300,7 +1302,9 @@ impl parachains_paras_inherent::Config for Runtime {
}

impl parachains_scheduler::Config for Runtime {
type AssignmentProvider = ParaAssignmentProvider;
// If you change this, make sure the `Assignment` type of the new provider is binary compatible,
// otherwise provide a migration.
type AssignmentProvider = ParachainsAssignmentProvider;
}

impl parachains_assigner_parachains::Config for Runtime {}
Expand All @@ -1309,6 +1313,8 @@ impl parachains_initializer::Config for Runtime {
type Randomness = pallet_babe::RandomnessFromOneEpochAgo<Runtime>;
type ForceOrigin = EnsureRoot<AccountId>;
type WeightInfo = weights::runtime_parachains_initializer::WeightInfo<Runtime>;
// TODO:(PR#159) check `CoretimeOnNewSession` bellow and remove this comment!
type CoretimeOnNewSession = ();
}

impl parachains_disputes::Config for Runtime {
Expand Down Expand Up @@ -1628,7 +1634,8 @@ construct_runtime! {
ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 61,
ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event<T>} = 62,
ParasSlashing: parachains_slashing::{Pallet, Call, Storage, ValidateUnsigned} = 63,
ParaAssignmentProvider: parachains_assigner_parachains::{Pallet, Storage} = 64,
// TODO:(PR#159) check rename `ParachainsAssignmentProvider` and remove `Storage` bellow and remove this comment!
ParachainsAssignmentProvider: parachains_assigner_parachains::{Pallet} = 64,

// Parachain Onboarding Pallets. Start indices at 70 to leave room.
Registrar: paras_registrar::{Pallet, Call, Storage, Event<T>} = 70,
Expand Down Expand Up @@ -1688,7 +1695,7 @@ pub type Migrations = migrations::Unreleased;
/// The runtime migrations per release.
#[allow(deprecated, missing_docs)]
pub mod migrations {
use super::{parachains_configuration, Runtime};
use super::{parachains_configuration, parachains_scheduler, Runtime};

// We don't have a limit in the Relay Chain.
const IDENTITY_MIGRATION_KEY_LIMIT: u64 = u64::MAX;
Expand All @@ -1707,6 +1714,9 @@ pub mod migrations {
pallet_grandpa::migrations::MigrateV4ToV5<Runtime>,
// Migrate Identity pallet for Usernames
pallet_identity::migration::versioned::V0ToV1<Runtime, IDENTITY_MIGRATION_KEY_LIMIT>,
// TODO:(PR#159) check `parachains_scheduler::MigrateV1ToV2` bellow and remove this
// comment!
parachains_scheduler::migration::MigrateV1ToV2<Runtime>,
);
}

Expand Down
14 changes: 12 additions & 2 deletions relay/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,8 @@ impl parachains_paras::Config for Runtime {
type QueueFootprinter = ParaInclusion;
type NextSessionRotation = Babe;
type OnNewHead = Registrar;
// TODO:(PR#159) check `AssignCoretime` bellow and remove this comment!
type AssignCoretime = ();
}

parameter_types! {
Expand Down Expand Up @@ -1374,7 +1376,9 @@ impl parachains_paras_inherent::Config for Runtime {
}

impl parachains_scheduler::Config for Runtime {
type AssignmentProvider = ParaAssignmentProvider;
// If you change this, make sure the `Assignment` type of the new provider is binary compatible,
// otherwise provide a migration.
type AssignmentProvider = ParachainsAssignmentProvider;
}

impl parachains_assigner_parachains::Config for Runtime {}
Expand All @@ -1383,6 +1387,8 @@ impl parachains_initializer::Config for Runtime {
type Randomness = pallet_babe::RandomnessFromOneEpochAgo<Runtime>;
type ForceOrigin = EnsureRoot<AccountId>;
type WeightInfo = weights::runtime_parachains_initializer::WeightInfo<Runtime>;
// TODO:(PR#159) check `CoretimeOnNewSession` bellow and remove this comment!
type CoretimeOnNewSession = ();
}

impl parachains_disputes::Config for Runtime {
Expand Down Expand Up @@ -1639,7 +1645,8 @@ construct_runtime! {
ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 61,
ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event<T>} = 62,
ParasSlashing: parachains_slashing::{Pallet, Call, Storage, ValidateUnsigned} = 63,
ParaAssignmentProvider: parachains_assigner_parachains::{Pallet} = 64,
// TODO:(PR#159) check rename `ParachainsAssignmentProvider` bellow and remove this comment!
ParachainsAssignmentProvider: parachains_assigner_parachains::{Pallet} = 64,

// Parachain Onboarding Pallets. Start indices at 70 to leave room.
Registrar: paras_registrar::{Pallet, Call, Storage, Event<T>} = 70,
Expand Down Expand Up @@ -1728,6 +1735,9 @@ pub mod migrations {
pallet_grandpa::migrations::MigrateV4ToV5<Runtime>,
// Migrate Identity pallet for Usernames
pallet_identity::migration::versioned::V0ToV1<Runtime, IDENTITY_MIGRATION_KEY_LIMIT>,
// TODO:(PR#159) check `parachains_scheduler::MigrateV1ToV2` bellow and remove this
// comment!
parachains_scheduler::migration::MigrateV1ToV2<Runtime>,
);
}

Expand Down

0 comments on commit 06684d3

Please sign in to comment.