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

Commit

Permalink
update polkadot-parachain-bin
Browse files Browse the repository at this point in the history
  • Loading branch information
rphmeier committed Jul 21, 2023
1 parent d12053f commit 4889999
Show file tree
Hide file tree
Showing 6 changed files with 207 additions and 210 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 17 additions & 2 deletions client/collator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,22 @@ pub struct StartCollatorParams<Block: BlockT, RA, BS, Spawner> {
/// Start the collator.
#[deprecated = "Collators should run consensus futures which handle this logic internally"]
pub async fn start_collator<Block, RA, BS, Spawner>(
params: StartCollatorParams<Block, RA, BS, Spawner>,
) where
Block: BlockT,
BS: BlockBackend<Block> + Send + Sync + 'static,
Spawner: SpawnNamed + Clone + Send + Sync + 'static,
RA: ProvideRuntimeApi<Block> + Send + Sync + 'static,
RA::Api: CollectCollationInfo<Block>,
{
// This never needed to be asynchronous, but shouldn't be changed due to backcompat.
#[allow(deprecated)]
start_collator_sync(params);
}

/// Start the collator in a synchronous function.
#[deprecated = "Collators should run consensus futures which handle this logic internally"]
pub fn start_collator_sync<Block, RA, BS, Spawner>(
StartCollatorParams {
para_id,
block_status,
Expand All @@ -270,9 +286,8 @@ pub async fn start_collator<Block, RA, BS, Spawner>(

let collator = Collator::new(collator_service, parachain_consensus);

let mut request_stream = relay_chain_driven::init(key, para_id, overseer_handle).await;

let collation_future = Box::pin(async move {
let mut request_stream = relay_chain_driven::init(key, para_id, overseer_handle).await;
while let Some(request) = request_stream.next().await {
let collation = collator
.clone()
Expand Down
3 changes: 3 additions & 0 deletions client/consensus/aura/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ impl<B, CIDP, W> Clone for AuraConsensus<B, CIDP, W> {
}

/// Parameters of [`AuraConsensus::build`].
#[deprecated = "Use the `aura::collators::basic` collator instead"]
pub struct BuildAuraConsensusParams<PF, BI, CIDP, Client, BS, SO> {
pub proposer_factory: PF,
pub create_inherent_data_providers: CIDP,
Expand All @@ -98,6 +99,8 @@ where
CIDP::InherentDataProviders: InherentDataProviderExt,
{
/// Create a new boxed instance of AURA consensus.
#[allow(deprecated)]
#[deprecated = "Use the `aura::collators::basic` collator instead"]
pub fn build<P, Client, BI, SO, PF, BS, Error>(
BuildAuraConsensusParams {
proposer_factory,
Expand Down
2 changes: 1 addition & 1 deletion client/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ where
and will be removed in the future"]
pub mod old_consensus {
#[allow(deprecated)]
pub use cumulus_client_collator::{start_collator, StartCollatorParams};
pub use cumulus_client_collator::{start_collator, start_collator_sync, StartCollatorParams};
}

/// Prepare the parachain's node configuration
Expand Down
2 changes: 2 additions & 0 deletions polkadot-parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ xcm = { git = "https://github.com/paritytech/polkadot", branch = "rh-async-backi

# Cumulus
cumulus-client-cli = { path = "../client/cli" }
cumulus-client-collator = { path = "../client/collator" }
cumulus-client-consensus-aura = { path = "../client/consensus/aura" }
cumulus-client-consensus-relay-chain = { path = "../client/consensus/relay-chain" }
cumulus-client-consensus-common = { path = "../client/consensus/common" }
cumulus-client-consensus-proposer = { path = "../client/consensus/proposer" }
cumulus-client-service = { path = "../client/service" }
cumulus-primitives-core = { path = "../primitives/core" }
cumulus-primitives-parachain-inherent = { path = "../primitives/parachain-inherent" }
Expand Down
Loading

0 comments on commit 4889999

Please sign in to comment.