Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
extend abridged host config
Browse files Browse the repository at this point in the history
added asynchronous backing params
  • Loading branch information
slumber committed Aug 24, 2023
1 parent 7f0eb5f commit c87c07a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions primitives/src/v5/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,8 @@ pub struct AbridgedHostConfiguration {
pub validation_upgrade_cooldown: BlockNumber,
/// The delay, in blocks, before a validation upgrade is applied.
pub validation_upgrade_delay: BlockNumber,
/// Asynchronous backing parameters.
pub async_backing_params: super::vstaging::AsyncBackingParams,
}

/// Abridged version of `HrmpChannel` (from the `Hrmp` parachains host runtime module) meant to be
Expand Down
4 changes: 2 additions & 2 deletions runtime/parachains/src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ pub struct HostConfiguration<BlockNumber> {
///
/// [#4601]: https://github.com/paritytech/polkadot/issues/4601
pub validation_upgrade_delay: BlockNumber,
/// Asynchronous backing parameters.
pub async_backing_params: AsyncBackingParams,

/**
* The parameters that are not essential, but still may be of interest for parachains.
*/

/// Asynchronous backing parameters.
pub async_backing_params: AsyncBackingParams,
/// The maximum POV block size, in bytes.
pub max_pov_size: u32,
/// The maximum size of a message that can be put in a downward message queue.
Expand Down
5 changes: 4 additions & 1 deletion runtime/parachains/src/configuration/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,9 @@ fn verify_externally_accessible() {
use primitives::{well_known_keys, AbridgedHostConfiguration};

new_test_ext(Default::default()).execute_with(|| {
let ground_truth = HostConfiguration::default();
let mut ground_truth = HostConfiguration::default();
ground_truth.async_backing_params =
AsyncBackingParams { allowed_ancestry_len: 111, max_candidate_depth: 222 };

// Make sure that the configuration is stored in the storage.
ActiveConfig::<Test>::put(ground_truth.clone());
Expand All @@ -511,6 +513,7 @@ fn verify_externally_accessible() {
hrmp_max_message_num_per_candidate: ground_truth.hrmp_max_message_num_per_candidate,
validation_upgrade_cooldown: ground_truth.validation_upgrade_cooldown,
validation_upgrade_delay: ground_truth.validation_upgrade_delay,
async_backing_params: ground_truth.async_backing_params,
},
);
});
Expand Down

0 comments on commit c87c07a

Please sign in to comment.