Remove AssignmentProviderConfig and use parameters from HostConfiguration instead (#3181)

This PR removes `AssignmentProviderConfig` and uses the corresponding
ondemand parameters from `HostConfiguration` instead. Additionally
`scheduling_lookahead` and all coretime/ondemand related parameters are
extracted in a separate struct - `SchedulerParams`.

The most relevant commit from the PR is [this
one](https://github.com/paritytech/polkadot-sdk/pull/3181/commits/830bc0f5e858944474171bbe33382ad96040b535).

Fixes https://github.com/paritytech/polkadot-sdk/issues/2268

---------

Co-authored-by: command-bot <>
This commit is contained in:
Tsvetomir Dimitrov
2024-02-29 09:12:02 +02:00
committed by GitHub
parent a22319cdd5
commit a035dc9be7
43 changed files with 900 additions and 438 deletions
+12 -4
View File
@@ -24,6 +24,8 @@ use polkadot_primitives::{AccountId, AccountPublic, AssignmentId, ValidatorId};
use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
use sp_consensus_babe::AuthorityId as BabeId;
#[cfg(any(feature = "rococo-native", feature = "westend-native",))]
use polkadot_primitives::vstaging::SchedulerParams;
#[cfg(feature = "rococo-native")]
use rococo_runtime as rococo;
#[cfg(feature = "rococo-native")]
@@ -129,8 +131,6 @@ fn default_parachains_host_configuration(
max_code_size: MAX_CODE_SIZE,
max_pov_size: MAX_POV_SIZE,
max_head_data_size: 32 * 1024,
group_rotation_frequency: 20,
paras_availability_period: 4,
max_upward_queue_count: 8,
max_upward_queue_size: 1024 * 1024,
max_downward_message_size: 1024 * 1024,
@@ -151,11 +151,16 @@ fn default_parachains_host_configuration(
relay_vrf_modulo_samples: 2,
zeroth_delay_tranche_width: 0,
minimum_validation_upgrade_delay: 5,
scheduling_lookahead: 2,
async_backing_params: AsyncBackingParams {
max_candidate_depth: 3,
allowed_ancestry_len: 2,
},
scheduler_params: SchedulerParams {
lookahead: 2,
group_rotation_frequency: 20,
paras_availability_period: 4,
..Default::default()
},
..Default::default()
}
}
@@ -891,7 +896,10 @@ pub fn rococo_testnet_genesis(
"sudo": { "key": Some(root_key.clone()) },
"configuration": {
"config": polkadot_runtime_parachains::configuration::HostConfiguration {
max_validators_per_core: Some(1),
scheduler_params: SchedulerParams {
max_validators_per_core: Some(1),
..default_parachains_host_configuration().scheduler_params
},
..default_parachains_host_configuration()
},
},