Revert "[Runtime] Bound XCMP queue" (#3117)

Reverts paritytech/polkadot-sdk#2302. 🤦‍♂️ should have checked the
migration CI first.

We either need to reduce the `max_message_size` for the open HRMP
channels on the failing chains or increase the `PageSize` of the XCMP
queue.
Both would be fine on a test-net, but i assume this will also fail
before the next SP runtime upgrade so first need to think what best to
do.
AFAIK its not possible currently to change the `max_message_size` of an
open HRMP channel.
This commit is contained in:
Oliver Tale-Yazdi
2024-01-30 13:50:35 +01:00
committed by GitHub
parent 400ee1bb31
commit fafe2722a1
23 changed files with 65 additions and 367 deletions
+12 -14
View File
@@ -16,8 +16,6 @@
//! A module that is responsible for migration of storage.
pub mod v5;
use crate::{Config, OverweightIndex, Pallet, QueueConfig, QueueConfigData, DEFAULT_POV_SIZE};
use cumulus_primitives_core::XcmpMessageFormat;
use frame_support::{
@@ -27,7 +25,7 @@ use frame_support::{
};
/// The current storage version.
pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(5);
pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(4);
pub const LOG: &str = "runtime::xcmp-queue-migration";
@@ -266,9 +264,9 @@ pub mod v4 {
/// Migrates `QueueConfigData` to v4, removing deprecated fields and bumping page
/// thresholds to at least the default values.
pub struct UncheckedMigrateV3ToV4<T: Config>(PhantomData<T>);
pub struct UncheckedMigrationToV4<T: Config>(PhantomData<T>);
impl<T: Config> OnRuntimeUpgrade for UncheckedMigrateV3ToV4<T> {
impl<T: Config> OnRuntimeUpgrade for UncheckedMigrationToV4<T> {
fn on_runtime_upgrade() -> Weight {
let translate = |pre: v2::QueueConfigData| -> QueueConfigData {
let pre_default = v2::QueueConfigData::default();
@@ -301,13 +299,13 @@ pub mod v4 {
}
}
/// [`UncheckedMigrateV3ToV4`] wrapped in a
/// [`UncheckedMigrationToV4`] wrapped in a
/// [`VersionedMigration`](frame_support::migrations::VersionedMigration), ensuring the
/// migration is only performed when on-chain version is 3.
pub type MigrateV3ToV4<T> = frame_support::migrations::VersionedMigration<
pub type MigrationToV4<T> = frame_support::migrations::VersionedMigration<
3,
4,
UncheckedMigrateV3ToV4<T>,
UncheckedMigrationToV4<T>,
Pallet<T>,
<T as frame_system::Config>::DbWeight,
>;
@@ -374,10 +372,10 @@ mod tests {
&v2.encode(),
);
let bytes = v4::MigrateV3ToV4::<Test>::pre_upgrade();
let bytes = v4::MigrationToV4::<Test>::pre_upgrade();
assert!(bytes.is_ok());
v4::MigrateV3ToV4::<Test>::on_runtime_upgrade();
assert!(v4::MigrateV3ToV4::<Test>::post_upgrade(bytes.unwrap()).is_ok());
v4::MigrationToV4::<Test>::on_runtime_upgrade();
assert!(v4::MigrationToV4::<Test>::post_upgrade(bytes.unwrap()).is_ok());
let v4 = QueueConfig::<Test>::get();
@@ -403,10 +401,10 @@ mod tests {
&v2.encode(),
);
let bytes = v4::MigrateV3ToV4::<Test>::pre_upgrade();
let bytes = v4::MigrationToV4::<Test>::pre_upgrade();
assert!(bytes.is_ok());
v4::MigrateV3ToV4::<Test>::on_runtime_upgrade();
assert!(v4::MigrateV3ToV4::<Test>::post_upgrade(bytes.unwrap()).is_ok());
v4::MigrationToV4::<Test>::on_runtime_upgrade();
assert!(v4::MigrationToV4::<Test>::post_upgrade(bytes.unwrap()).is_ok());
let v4 = QueueConfig::<Test>::get();