From 74cd45bb51dfe61d3414400abaa8695159c158ae Mon Sep 17 00:00:00 2001 From: Andrei Sandu Date: Mon, 3 Jun 2024 12:53:06 +0300 Subject: [PATCH 1/3] enable feature bit Signed-off-by: Andrei Sandu --- relay/polkadot/src/lib.rs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index c065949f26..b0e2a8df72 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1783,7 +1783,6 @@ pub type SignedExtra = ( frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, claims::PrevalidateAttests, - frame_metadata_hash_extension::CheckMetadataHash, ); pub struct NominationPoolsMigrationV4OldPallet; @@ -1803,9 +1802,11 @@ 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; - parameter_types! { pub const ImOnlinePalletName: &'static str = "ImOnline"; } @@ -1886,6 +1887,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 +1920,7 @@ pub mod migrations { ImOnlinePalletName, ::DbWeight, >, + EnableElasticScalingNodeFeature, ); /// Migrations/checks that do not need to be versioned and can run on every update. From 860edb5e52dc767f0f0886046f74cd37fa7a2f4f Mon Sep 17 00:00:00 2001 From: Andrei Sandu Date: Mon, 3 Jun 2024 13:04:41 +0300 Subject: [PATCH 2/3] fix Signed-off-by: Andrei Sandu --- relay/polkadot/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index b0e2a8df72..010ea3fd3c 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1783,6 +1783,7 @@ pub type SignedExtra = ( frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, claims::PrevalidateAttests, + frame_metadata_hash_extension::CheckMetadataHash, ); pub struct NominationPoolsMigrationV4OldPallet; @@ -1807,6 +1808,7 @@ pub mod migrations { use runtime_parachains::configuration::WeightInfo; #[cfg(feature = "try-runtime")] use sp_core::crypto::ByteArray; + parameter_types! { pub const ImOnlinePalletName: &'static str = "ImOnline"; } From e48d419d38ac79847f95c4265c162f26ff9b94f1 Mon Sep 17 00:00:00 2001 From: Andrei Sandu Date: Mon, 3 Jun 2024 13:07:54 +0300 Subject: [PATCH 3/3] Update changelog Signed-off-by: Andrei Sandu --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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