[Runtime] Bound XCMP queue (#2302)

Remove `without_storage_info` from the XCMP queue pallet. Part of
https://github.com/paritytech/polkadot-sdk/issues/323

Changes:
- Limit the number of channels that can be suspended at the same time.
- Limit the number of channels that can have messages or signals pending
at the same time.

A No-OP migration is put in place to ensure that all `BoundedVec`s still
decode and not truncate after upgrade. The storage version is thereby
bumped to 4 to have our tooling remind us to deploy that migration.

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
This commit is contained in:
Oliver Tale-Yazdi
2024-01-29 17:36:23 +01:00
committed by GitHub
parent a664908304
commit b8f55d1b76
23 changed files with 367 additions and 65 deletions
@@ -445,13 +445,20 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
type VersionWrapper = PolkadotXcm;
// Enqueue XCMP messages from siblings for later processing.
type XcmpQueue = TransformOrigin<MessageQueue, AggregateMessageOrigin, ParaId, ParaIdToSibling>;
type MaxInboundSuspended = sp_core::ConstU32<1_000>;
type MaxInboundSuspended = ConstU32<1_000>;
type MaxActiveOutboundChannels = ConstU32<128>;
type MaxPageSize = ConstU32<{ 1 << 16 }>;
type ControllerOrigin = EitherOfDiverse<EnsureRoot<AccountId>, Fellows>;
type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin;
type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo<Runtime>;
type PriceForSiblingDelivery = PriceForSiblingParachainDelivery;
}
impl cumulus_pallet_xcmp_queue::migration::v5::V5Config for Runtime {
// This must be the same as the `ChannelInfo` from the `Config`:
type ChannelList = ParachainSystem;
}
parameter_types! {
pub const RelayOrigin: AggregateMessageOrigin = AggregateMessageOrigin::Parent;
}
@@ -720,8 +727,8 @@ pub type UncheckedExtrinsic =
type Migrations = (
// unreleased
pallet_collator_selection::migration::v1::MigrateToV1<Runtime>,
// unreleased
cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4<Runtime>,
cumulus_pallet_xcmp_queue::migration::v4::MigrateV3ToV4<Runtime>,
cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5<Runtime>,
);
/// Executive: handles dispatch to the various modules.