HRMP - set `DefaultChannelSizeAndCapacityWithSystem` with dynamic values...
HRMP - set `DefaultChannelSizeAndCapacityWithSystem` with dynamic values according to the `ActiveConfig` (#4332) ## Summary This PR enhances the capability to set `DefaultChannelSizeAndCapacityWithSystem` for HRMP. Currently, all testnets (Rococo, Westend) have a hard-coded value set as 'half of the maximum' determined by the live `ActiveConfig`. While this approach appears satisfactory, potential issues could arise if the live `ActiveConfig` are adjusted below these hard-coded values, necessitating a new runtime release with updated values. Additionally, hard-coded values have consequences, such as Rococo's benchmarks not functioning: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6082656. ## Solution The proposed solution here is to utilize `ActiveConfigHrmpChannelSizeAndCapacityRatio`, which reads the current `ActiveConfig` and calculates `DefaultChannelSizeAndCapacityWithSystem`, for example, "half of the maximum" based on live data. This way, whenever `ActiveConfig` is modified, `ActiveConfigHrmpChannelSizeAndCapacityRatio` automatically returns adjusted values with the appropriate ratio. Thus, manual adjustments and new runtime releases become unnecessary. Relates to a comment/discussion: https://github.com/paritytech/polkadot-sdk/pull/3721/files#r1541001420 Relates to a comment/discussion: https://github.com/paritytech/polkadot-sdk/pull/3721/files#r1549291588 --------- Co-authored-by: command-bot <>
parent
6d392c7e
Showing
- polkadot/runtime/parachains/src/configuration.rs 14 additions, 1 deletionpolkadot/runtime/parachains/src/configuration.rs
- polkadot/runtime/parachains/src/configuration/tests.rs 49 additions, 1 deletionpolkadot/runtime/parachains/src/configuration/tests.rs
- polkadot/runtime/rococo/src/lib.rs 6 additions, 2 deletionspolkadot/runtime/rococo/src/lib.rs
- polkadot/runtime/rococo/src/weights/runtime_parachains_hrmp.rs 221 additions, 208 deletions...dot/runtime/rococo/src/weights/runtime_parachains_hrmp.rs
- polkadot/runtime/test-runtime/src/lib.rs 9 additions, 4 deletionspolkadot/runtime/test-runtime/src/lib.rs
- polkadot/runtime/westend/src/lib.rs 6 additions, 2 deletionspolkadot/runtime/westend/src/lib.rs
- polkadot/runtime/westend/src/weights/runtime_parachains_hrmp.rs 216 additions, 196 deletions...ot/runtime/westend/src/weights/runtime_parachains_hrmp.rs
Please register or sign in to comment