forked from paritytech/polkadot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HRMP - set
DefaultChannelSizeAndCapacityWithSystem
with dynamic val…
…ues according to the `ActiveConfig` (paritytech#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 <>
- Loading branch information
Showing
7 changed files
with
521 additions
and
414 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.