diff --git a/CHANGELOG.md b/CHANGELOG.md index 0615972a12..1c87f55236 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Staking runtime api to check if reward is pending for an era ([polkadot-fellows/runtimes#318](https://github.com/polkadot-fellows/runtimes/pull/318)) - Allow any parachain to have bidirectional channel with any system parachains ([polkadot-fellows/runtimes#329](https://github.com/polkadot-fellows/runtimes/pull/329)) - Enable support for new hardware signers like the generic ledger app ([polkadot-fellows/runtimes#337](https://github.com/polkadot-fellows/runtimes/pull/337)) +- Enable Elastic Scaling node side feature for Polkadot ([polkadot-fellows/runtimes#340](https://github.com/polkadot-fellows/runtimes/pull/340)) ### Changed diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index c065949f26..010ea3fd3c 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1803,6 +1803,9 @@ pub type Migrations = (migrations::Unreleased, migrations::Permanent); #[allow(deprecated, missing_docs)] pub mod migrations { use super::*; + use frame_support::traits::OnRuntimeUpgrade; + use frame_system::RawOrigin; + use runtime_parachains::configuration::WeightInfo; #[cfg(feature = "try-runtime")] use sp_core::crypto::ByteArray; @@ -1886,6 +1889,18 @@ pub mod migrations { } } + /// Enable the elastic scaling node side feature. + /// + /// This is required for Coretime to ensure the relay chain processes parachains that are + /// assigned to multiple cores. + pub struct EnableElasticScalingNodeFeature; + impl OnRuntimeUpgrade for EnableElasticScalingNodeFeature { + fn on_runtime_upgrade() -> Weight { + let _ = Configuration::set_node_feature(RawOrigin::Root.into(), 1, true); + weights::runtime_parachains_configuration::WeightInfo::::set_node_feature() + } + } + // We don't have a limit in the Relay Chain. const IDENTITY_MIGRATION_KEY_LIMIT: u64 = u64::MAX; @@ -1907,6 +1922,7 @@ pub mod migrations { ImOnlinePalletName, ::DbWeight, >, + EnableElasticScalingNodeFeature, ); /// Migrations/checks that do not need to be versioned and can run on every update.