[Runtime] Bound XCMP queue (#3952)
Re-applying #2302 after increasing the `MaxPageSize`. Remove `without_storage_info` from the XCMP queue pallet. Part of https://github.com/paritytech/polkadot-sdk/issues/323 Changes: - Limit the number of messages and signals a HRMP channel can have at most. - Limit the number of HRML channels. 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 5 to have our tooling remind us to deploy that migration. ## Integration If you see this error in your try-runtime-cli: ```pre Max message size for channel is too large. This means that the V5 migration can be front-run and an attacker could place a large message just right before the migration to make other messages un-decodable. Please either increase `MaxPageSize` or decrease the `max_message_size` for this channel. Channel max: 102400, MaxPageSize: 65535 ``` Then increase the `MaxPageSize` of the `cumulus_pallet_xcmp_queue` to something like this: ```rust type MaxPageSize = ConstU32<{ 103 * 1024 }>; ``` There is currently no easy way for on-chain governance to adjust the HRMP max message size of all channels, but it could be done: https://github.com/paritytech/polkadot-sdk/issues/3145. --------- Signed-off-by:Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by:
Francisco Aguirre <franciscoaguirreperez@gmail.com>
parent
6487ac1e
Showing
- cumulus/pallets/parachain-system/src/lib.rs 8 additions, 1 deletioncumulus/pallets/parachain-system/src/lib.rs
- cumulus/pallets/parachain-system/src/mock.rs 1 addition, 1 deletioncumulus/pallets/parachain-system/src/mock.rs
- cumulus/pallets/xcmp-queue/src/lib.rs 88 additions, 32 deletionscumulus/pallets/xcmp-queue/src/lib.rs
- cumulus/pallets/xcmp-queue/src/migration.rs 3 additions, 1 deletioncumulus/pallets/xcmp-queue/src/migration.rs
- cumulus/pallets/xcmp-queue/src/migration/v5.rs 108 additions, 0 deletionscumulus/pallets/xcmp-queue/src/migration/v5.rs
- cumulus/pallets/xcmp-queue/src/mock.rs 5 additions, 1 deletioncumulus/pallets/xcmp-queue/src/mock.rs
- cumulus/pallets/xcmp-queue/src/tests.rs 1 addition, 1 deletioncumulus/pallets/xcmp-queue/src/tests.rs
- cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs 12 additions, 2 deletions...us/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs
- cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs 12 additions, 2 deletions...s/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
- cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs 13 additions, 3 deletions...achains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs
- cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs 12 additions, 2 deletions...chains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs
- cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs 12 additions, 2 deletions...hains/runtimes/collectives/collectives-westend/src/lib.rs
- cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs 2 additions, 1 deletion...parachains/runtimes/contracts/contracts-rococo/src/lib.rs
- cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs 10 additions, 1 deletion...ins/runtimes/contracts/contracts-rococo/src/xcm_config.rs
- cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs 12 additions, 2 deletions...s/parachains/runtimes/coretime/coretime-rococo/src/lib.rs
- cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs 11 additions, 2 deletions.../parachains/runtimes/coretime/coretime-westend/src/lib.rs
- cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs 3 additions, 2 deletions...us/parachains/runtimes/glutton/glutton-westend/src/lib.rs
- cumulus/parachains/runtimes/people/people-rococo/src/lib.rs 11 additions, 2 deletionscumulus/parachains/runtimes/people/people-rococo/src/lib.rs
- cumulus/parachains/runtimes/people/people-westend/src/lib.rs 11 additions, 2 deletionscumulus/parachains/runtimes/people/people-westend/src/lib.rs
- cumulus/parachains/runtimes/starters/shell/src/lib.rs 1 addition, 1 deletioncumulus/parachains/runtimes/starters/shell/src/lib.rs
Please register or sign in to comment