From 7caffb09e83083b57affd548215e45b25c3d64dc Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 20 Apr 2023 11:47:03 +0200 Subject: [PATCH] Add MAX_CODE_SIZE to ScheduleConfigUpdate Signed-off-by: Oliver Tale-Yazdi --- runtime/kusama/src/lib.rs | 2 ++ runtime/parachains/src/configuration/migration_ump.rs | 4 ++++ runtime/polkadot/src/lib.rs | 2 ++ runtime/rococo/src/lib.rs | 2 ++ runtime/westend/src/lib.rs | 2 ++ 5 files changed, 12 insertions(+) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index b838c3ed3eea..2679bcfad43a 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -1515,6 +1515,7 @@ pub type Migrations = ( /// Helpers to configure all migrations. pub mod migrations { + use primitives::MAX_CODE_SIZE; use runtime_parachains::configuration::migration_ump; pub const MAX_UPWARD_QUEUE_SIZE: u32 = 4 * 1024 * 1024; @@ -1528,6 +1529,7 @@ pub mod migrations { MAX_UPWARD_QUEUE_COUNT, MAX_UPWARD_MESSAGE_SIZE, MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, + MAX_CODE_SIZE, >; } diff --git a/runtime/parachains/src/configuration/migration_ump.rs b/runtime/parachains/src/configuration/migration_ump.rs index c72d1fa94c61..c305d1f5f9d6 100644 --- a/runtime/parachains/src/configuration/migration_ump.rs +++ b/runtime/parachains/src/configuration/migration_ump.rs @@ -33,6 +33,7 @@ pub mod latest { const MAX_UPWARD_QUEUE_COUNT: u32, const MAX_UPWARD_MESSAGE_SIZE: u32, const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32, + const MAX_CODE_SIZE: u32, >(core::marker::PhantomData); impl< @@ -41,6 +42,7 @@ pub mod latest { const MAX_UPWARD_QUEUE_COUNT: u32, const MAX_UPWARD_MESSAGE_SIZE: u32, const MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE: u32, + const MAX_CODE_SIZE: u32, > OnRuntimeUpgrade for ScheduleConfigUpdate< T, @@ -48,6 +50,7 @@ pub mod latest { MAX_UPWARD_QUEUE_COUNT, MAX_UPWARD_MESSAGE_SIZE, MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, + MAX_CODE_SIZE, > { #[cfg(feature = "try-runtime")] @@ -77,6 +80,7 @@ pub mod latest { cfg.max_upward_queue_count = MAX_UPWARD_QUEUE_COUNT; cfg.max_upward_message_size = MAX_UPWARD_MESSAGE_SIZE; cfg.max_upward_message_num_per_candidate = MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE; + cfg.max_code_size = MAX_CODE_SIZE; }) { log::error!( target: LOG_TARGET, diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 87c96dc5a248..2e03add536e7 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -1473,6 +1473,7 @@ pub type Migrations = ( /// Helpers to configure all migrations. pub mod migrations { + use primitives::MAX_CODE_SIZE; use runtime_parachains::configuration::migration_ump; pub const MAX_UPWARD_QUEUE_SIZE: u32 = 1 * 1024 * 1024; @@ -1486,6 +1487,7 @@ pub mod migrations { MAX_UPWARD_QUEUE_COUNT, MAX_UPWARD_MESSAGE_SIZE, MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, + MAX_CODE_SIZE, >; } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index f88f429229b2..ed669d562a7b 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1523,6 +1523,7 @@ pub type Migrations = ( /// Helpers to configure all migrations. pub mod migrations { + use primitives::MAX_CODE_SIZE; use runtime_parachains::configuration::migration_ump; pub const MAX_UPWARD_QUEUE_SIZE: u32 = 8 * 1024 * 1024; @@ -1536,6 +1537,7 @@ pub mod migrations { MAX_UPWARD_QUEUE_COUNT, MAX_UPWARD_MESSAGE_SIZE, MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, + MAX_CODE_SIZE, >; } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 92a51184d40e..77dc1c7cb7a6 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1272,6 +1272,7 @@ pub type Migrations = ( /// Helpers to configure all migrations. pub mod migrations { + use primitives::MAX_CODE_SIZE; use runtime_parachains::configuration::migration_ump; pub const MAX_UPWARD_QUEUE_SIZE: u32 = 8 * 1024 * 1024; @@ -1285,6 +1286,7 @@ pub mod migrations { MAX_UPWARD_QUEUE_COUNT, MAX_UPWARD_MESSAGE_SIZE, MAX_UPWARD_MESSAGE_NUM_PER_CANDIDATE, + MAX_CODE_SIZE, >; }