From e943fea097266808936cd060e2090dd1becf1bd2 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Wed, 10 Jan 2024 12:26:41 +0100 Subject: [PATCH] [ParachainHost] adapt https://github.com/paritytech/polkadot-sdk/pull/2177 --- relay/kusama/src/lib.rs | 3 ++- .../weights/runtime_parachains_configuration.rs | 16 ++++++++++++++++ relay/polkadot/src/lib.rs | 1 + .../weights/runtime_parachains_configuration.rs | 16 ++++++++++++++++ 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index ffd15eac76..fca1341635 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -1679,13 +1679,14 @@ pub type Migrations = migrations::Unreleased; /// The runtime migrations per release. #[allow(deprecated, missing_docs)] pub mod migrations { - use super::Runtime; + use super::{Runtime, parachains_configuration}; /// Unreleased migrations. Add new ones here: pub type Unreleased = ( pallet_nomination_pools::migration::versioned::V5toV6, pallet_nomination_pools::migration::versioned::V6ToV7, pallet_staking::migrations::v14::MigrateToV14, + parachains_configuration::migration::v10::MigrateToV10, ); } diff --git a/relay/kusama/src/weights/runtime_parachains_configuration.rs b/relay/kusama/src/weights/runtime_parachains_configuration.rs index fd409cd3c4..bd5c71c868 100644 --- a/relay/kusama/src/weights/runtime_parachains_configuration.rs +++ b/relay/kusama/src/weights/runtime_parachains_configuration.rs @@ -157,4 +157,20 @@ impl runtime_parachains::configuration::WeightInfo for .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Configuration::PendingConfigs` (r:1 w:1) + /// Proof: `Configuration::PendingConfigs` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Configuration::BypassConsistencyCheck` (r:1 w:0) + /// Proof: `Configuration::BypassConsistencyCheck` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0) + /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_node_feature() -> Weight { + // Proof Size summary in bytes: + // Measured: `151` + // Estimated: `1636` + // Minimum execution time: 10_158_000 picoseconds. + Weight::from_parts(10_430_000, 0) + .saturating_add(Weight::from_parts(0, 1636)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 24ba0b65e7..1aba06dc78 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -1709,6 +1709,7 @@ pub mod migrations { pallet_nomination_pools::migration::versioned::V5toV6, pallet_nomination_pools::migration::versioned::V6ToV7, pallet_staking::migrations::v14::MigrateToV14, + parachains_configuration::migration::v10::MigrateToV10, ); } diff --git a/relay/polkadot/src/weights/runtime_parachains_configuration.rs b/relay/polkadot/src/weights/runtime_parachains_configuration.rs index c35f14898d..d9bbc5d897 100644 --- a/relay/polkadot/src/weights/runtime_parachains_configuration.rs +++ b/relay/polkadot/src/weights/runtime_parachains_configuration.rs @@ -157,4 +157,20 @@ impl runtime_parachains::configuration::WeightInfo for .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Configuration::PendingConfigs` (r:1 w:1) + /// Proof: `Configuration::PendingConfigs` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Configuration::BypassConsistencyCheck` (r:1 w:0) + /// Proof: `Configuration::BypassConsistencyCheck` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParasShared::CurrentSessionIndex` (r:1 w:0) + /// Proof: `ParasShared::CurrentSessionIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + fn set_node_feature() -> Weight { + // Proof Size summary in bytes: + // Measured: `151` + // Estimated: `1636` + // Minimum execution time: 10_158_000 picoseconds. + Weight::from_parts(10_430_000, 0) + .saturating_add(Weight::from_parts(0, 1636)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } }