mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 19:21:13 +00:00
collation-generation + collator-protocol: collate on multiple assigned cores (#3795)
This works only for collators that implement the `collator_fn` allowing `collation-generation` subsystem to pull collations triggered on new heads. Also enables `request_v2::CollationFetchingResponse::CollationWithParentHeadData` for test adder/undying collators. TODO: - [x] fix tests - [x] new tests - [x] PR doc --------- Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
This commit is contained in:
@@ -27,10 +27,11 @@ use sp_std::{collections::btree_map::BTreeMap, prelude::*};
|
||||
use polkadot_runtime_parachains::{
|
||||
assigner_parachains as parachains_assigner_parachains,
|
||||
configuration as parachains_configuration, disputes as parachains_disputes,
|
||||
disputes::slashing as parachains_slashing, dmp as parachains_dmp, hrmp as parachains_hrmp,
|
||||
inclusion as parachains_inclusion, initializer as parachains_initializer,
|
||||
origin as parachains_origin, paras as parachains_paras,
|
||||
paras_inherent as parachains_paras_inherent, runtime_api_impl::v7 as runtime_impl,
|
||||
disputes::slashing as parachains_slashing,
|
||||
dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion,
|
||||
initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras,
|
||||
paras_inherent as parachains_paras_inherent,
|
||||
runtime_api_impl::{v7 as runtime_impl, vstaging as staging_runtime_impl},
|
||||
scheduler as parachains_scheduler, session_info as parachains_session_info,
|
||||
shared as parachains_shared,
|
||||
};
|
||||
@@ -829,6 +830,7 @@ sp_api::impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
#[api_version(10)]
|
||||
impl primitives::runtime_api::ParachainHost<Block> for Runtime {
|
||||
fn validators() -> Vec<ValidatorId> {
|
||||
runtime_impl::validators::<Runtime>()
|
||||
@@ -956,6 +958,30 @@ sp_api::impl_runtime_apis! {
|
||||
key_ownership_proof,
|
||||
)
|
||||
}
|
||||
|
||||
fn minimum_backing_votes() -> u32 {
|
||||
runtime_impl::minimum_backing_votes::<Runtime>()
|
||||
}
|
||||
|
||||
fn para_backing_state(para_id: ParaId) -> Option<primitives::async_backing::BackingState> {
|
||||
runtime_impl::backing_state::<Runtime>(para_id)
|
||||
}
|
||||
|
||||
fn async_backing_params() -> primitives::AsyncBackingParams {
|
||||
runtime_impl::async_backing_params::<Runtime>()
|
||||
}
|
||||
|
||||
fn approval_voting_params() -> primitives::vstaging::ApprovalVotingParams {
|
||||
staging_runtime_impl::approval_voting_params::<Runtime>()
|
||||
}
|
||||
|
||||
fn disabled_validators() -> Vec<ValidatorIndex> {
|
||||
staging_runtime_impl::disabled_validators::<Runtime>()
|
||||
}
|
||||
|
||||
fn node_features() -> primitives::vstaging::NodeFeatures {
|
||||
staging_runtime_impl::node_features::<Runtime>()
|
||||
}
|
||||
}
|
||||
|
||||
impl beefy_primitives::BeefyApi<Block, BeefyId> for Runtime {
|
||||
|
||||
Reference in New Issue
Block a user