Unverified Commit e5a93fbc authored by Branislav Kontur's avatar Branislav Kontur Committed by GitHub
Browse files

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
Pipeline #471401 passed with stages
in 1 hour, 9 minutes, and 6 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment