Expose ClaimQueue via a runtime api and use it in collation-generation (#3580)

The PR adds two things:
1. Runtime API exposing the whole claim queue
2. Consumes the API in `collation-generation` to fetch the next
scheduled `ParaEntry` for an occupied core.

Related to https://github.com/paritytech/polkadot-sdk/issues/1797
This commit is contained in:
Tsvetomir Dimitrov
2024-03-20 08:55:58 +02:00
committed by GitHub
parent e659c4b3f7
commit e58e854a32
15 changed files with 532 additions and 52 deletions
+6 -2
View File
@@ -30,7 +30,7 @@ use polkadot_node_subsystem::{
messages::{RuntimeApiMessage, RuntimeApiRequest, RuntimeApiSender},
overseer, SubsystemSender,
};
use polkadot_primitives::{slashing, ExecutorParams};
use polkadot_primitives::{slashing, CoreIndex, ExecutorParams};
pub use overseer::{
gen::{OrchestraError as OverseerError, Timeout},
@@ -53,7 +53,10 @@ pub use rand;
use sp_application_crypto::AppCrypto;
use sp_core::ByteArray;
use sp_keystore::{Error as KeystoreError, KeystorePtr};
use std::time::Duration;
use std::{
collections::{BTreeMap, VecDeque},
time::Duration,
};
use thiserror::Error;
use vstaging::get_disabled_validators_with_fallback;
@@ -304,6 +307,7 @@ specialize_requests! {
fn request_submit_report_dispute_lost(dp: slashing::DisputeProof, okop: slashing::OpaqueKeyOwnershipProof) -> Option<()>; SubmitReportDisputeLost;
fn request_disabled_validators() -> Vec<ValidatorIndex>; DisabledValidators;
fn request_async_backing_params() -> AsyncBackingParams; AsyncBackingParams;
fn request_claim_queue() -> BTreeMap<CoreIndex, VecDeque<ParaId>>; ClaimQueue;
}
/// Requests executor parameters from the runtime effective at given relay-parent. First obtains