mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
Single ParachainBlockImport instance (#1782)
This commit is contained in:
@@ -18,7 +18,7 @@ use codec::Codec;
|
||||
use cumulus_client_cli::CollatorOptions;
|
||||
use cumulus_client_consensus_aura::{AuraConsensus, BuildAuraConsensusParams, SlotProportion};
|
||||
use cumulus_client_consensus_common::{
|
||||
ParachainBlockImport, ParachainCandidate, ParachainConsensus,
|
||||
ParachainBlockImport as TParachainBlockImport, ParachainCandidate, ParachainConsensus,
|
||||
};
|
||||
use cumulus_client_network::BlockAnnounceValidator;
|
||||
use cumulus_client_service::{
|
||||
@@ -73,6 +73,8 @@ type ParachainClient<RuntimeApi> = TFullClient<Block, RuntimeApi, WasmExecutor<H
|
||||
|
||||
type ParachainBackend = TFullBackend<Block>;
|
||||
|
||||
type ParachainBlockImport<RuntimeApi> = TParachainBlockImport<Arc<ParachainClient<RuntimeApi>>>;
|
||||
|
||||
/// Native executor instance.
|
||||
pub struct ShellRuntimeExecutor;
|
||||
|
||||
@@ -162,7 +164,7 @@ pub fn new_partial<RuntimeApi, BIQ>(
|
||||
(),
|
||||
sc_consensus::DefaultImportQueue<Block, ParachainClient<RuntimeApi>>,
|
||||
sc_transaction_pool::FullPool<Block, ParachainClient<RuntimeApi>>,
|
||||
(Option<Telemetry>, Option<TelemetryWorkerHandle>),
|
||||
(ParachainBlockImport<RuntimeApi>, Option<Telemetry>, Option<TelemetryWorkerHandle>),
|
||||
>,
|
||||
sc_service::Error,
|
||||
>
|
||||
@@ -179,6 +181,7 @@ where
|
||||
sc_client_api::StateBackendFor<ParachainBackend, Block>: sp_api::StateBackend<BlakeTwo256>,
|
||||
BIQ: FnOnce(
|
||||
Arc<ParachainClient<RuntimeApi>>,
|
||||
ParachainBlockImport<RuntimeApi>,
|
||||
&Configuration,
|
||||
Option<TelemetryHandle>,
|
||||
&TaskManager,
|
||||
@@ -229,8 +232,11 @@ where
|
||||
client.clone(),
|
||||
);
|
||||
|
||||
let block_import = ParachainBlockImport::new(client.clone());
|
||||
|
||||
let import_queue = build_import_queue(
|
||||
client.clone(),
|
||||
block_import.clone(),
|
||||
config,
|
||||
telemetry.as_ref().map(|telemetry| telemetry.handle()),
|
||||
&task_manager,
|
||||
@@ -244,7 +250,7 @@ where
|
||||
task_manager,
|
||||
transaction_pool,
|
||||
select_chain: (),
|
||||
other: (telemetry, telemetry_worker_handle),
|
||||
other: (block_import, telemetry, telemetry_worker_handle),
|
||||
};
|
||||
|
||||
Ok(params)
|
||||
@@ -279,7 +285,7 @@ async fn start_shell_node_impl<RuntimeApi, RB, BIQ, BIC>(
|
||||
parachain_config: Configuration,
|
||||
polkadot_config: Configuration,
|
||||
collator_options: CollatorOptions,
|
||||
id: ParaId,
|
||||
para_id: ParaId,
|
||||
rpc_ext_builder: RB,
|
||||
build_import_queue: BIQ,
|
||||
build_consensus: BIC,
|
||||
@@ -298,10 +304,10 @@ where
|
||||
+ cumulus_primitives_core::CollectCollationInfo<Block>,
|
||||
sc_client_api::StateBackendFor<ParachainBackend, Block>: sp_api::StateBackend<BlakeTwo256>,
|
||||
RB: Fn(Arc<ParachainClient<RuntimeApi>>) -> Result<jsonrpsee::RpcModule<()>, sc_service::Error>
|
||||
+ Send
|
||||
+ 'static,
|
||||
BIQ: FnOnce(
|
||||
Arc<ParachainClient<RuntimeApi>>,
|
||||
ParachainBlockImport<RuntimeApi>,
|
||||
&Configuration,
|
||||
Option<TelemetryHandle>,
|
||||
&TaskManager,
|
||||
@@ -311,6 +317,7 @@ where
|
||||
>,
|
||||
BIC: FnOnce(
|
||||
Arc<ParachainClient<RuntimeApi>>,
|
||||
ParachainBlockImport<RuntimeApi>,
|
||||
Option<&Registry>,
|
||||
Option<TelemetryHandle>,
|
||||
&TaskManager,
|
||||
@@ -324,7 +331,7 @@ where
|
||||
let parachain_config = prepare_node_config(parachain_config);
|
||||
|
||||
let params = new_partial::<RuntimeApi, BIQ>(¶chain_config, build_import_queue)?;
|
||||
let (mut telemetry, telemetry_worker_handle) = params.other;
|
||||
let (block_import, mut telemetry, telemetry_worker_handle) = params.other;
|
||||
|
||||
let client = params.client.clone();
|
||||
let backend = params.backend.clone();
|
||||
@@ -345,7 +352,8 @@ where
|
||||
s => s.to_string().into(),
|
||||
})?;
|
||||
|
||||
let block_announce_validator = BlockAnnounceValidator::new(relay_chain_interface.clone(), id);
|
||||
let block_announce_validator =
|
||||
BlockAnnounceValidator::new(relay_chain_interface.clone(), para_id);
|
||||
|
||||
let force_authoring = parachain_config.force_authoring;
|
||||
let validator = parachain_config.role.is_authority();
|
||||
@@ -405,6 +413,7 @@ where
|
||||
if validator {
|
||||
let parachain_consensus = build_consensus(
|
||||
client.clone(),
|
||||
block_import,
|
||||
prometheus_registry.as_ref(),
|
||||
telemetry.as_ref().map(|t| t.handle()),
|
||||
&task_manager,
|
||||
@@ -418,7 +427,7 @@ where
|
||||
let spawner = task_manager.spawn_handle();
|
||||
|
||||
let params = StartCollatorParams {
|
||||
para_id: id,
|
||||
para_id,
|
||||
block_status: client.clone(),
|
||||
announce_block,
|
||||
client: client.clone(),
|
||||
@@ -437,7 +446,7 @@ where
|
||||
client: client.clone(),
|
||||
announce_block,
|
||||
task_manager: &mut task_manager,
|
||||
para_id: id,
|
||||
para_id,
|
||||
relay_chain_interface,
|
||||
relay_chain_slot_duration,
|
||||
import_queue,
|
||||
@@ -459,7 +468,7 @@ async fn start_node_impl<RuntimeApi, RB, BIQ, BIC>(
|
||||
parachain_config: Configuration,
|
||||
polkadot_config: Configuration,
|
||||
collator_options: CollatorOptions,
|
||||
id: ParaId,
|
||||
para_id: ParaId,
|
||||
_rpc_ext_builder: RB,
|
||||
build_import_queue: BIQ,
|
||||
build_consensus: BIC,
|
||||
@@ -479,20 +488,20 @@ where
|
||||
+ pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>
|
||||
+ frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
|
||||
sc_client_api::StateBackendFor<ParachainBackend, Block>: sp_api::StateBackend<BlakeTwo256>,
|
||||
RB: Fn(Arc<ParachainClient<RuntimeApi>>) -> Result<jsonrpsee::RpcModule<()>, sc_service::Error>
|
||||
+ Send
|
||||
+ 'static,
|
||||
RB: Fn(Arc<ParachainClient<RuntimeApi>>) -> Result<jsonrpsee::RpcModule<()>, sc_service::Error>,
|
||||
BIQ: FnOnce(
|
||||
Arc<ParachainClient<RuntimeApi>>,
|
||||
&Configuration,
|
||||
Option<TelemetryHandle>,
|
||||
&TaskManager,
|
||||
) -> Result<
|
||||
sc_consensus::DefaultImportQueue<Block, ParachainClient<RuntimeApi>>,
|
||||
sc_service::Error,
|
||||
> + 'static,
|
||||
Arc<ParachainClient<RuntimeApi>>,
|
||||
ParachainBlockImport<RuntimeApi>,
|
||||
&Configuration,
|
||||
Option<TelemetryHandle>,
|
||||
&TaskManager,
|
||||
) -> Result<
|
||||
sc_consensus::DefaultImportQueue<Block, ParachainClient<RuntimeApi>>,
|
||||
sc_service::Error,
|
||||
>,
|
||||
BIC: FnOnce(
|
||||
Arc<ParachainClient<RuntimeApi>>,
|
||||
ParachainBlockImport<RuntimeApi>,
|
||||
Option<&Registry>,
|
||||
Option<TelemetryHandle>,
|
||||
&TaskManager,
|
||||
@@ -506,7 +515,7 @@ where
|
||||
let parachain_config = prepare_node_config(parachain_config);
|
||||
|
||||
let params = new_partial::<RuntimeApi, BIQ>(¶chain_config, build_import_queue)?;
|
||||
let (mut telemetry, telemetry_worker_handle) = params.other;
|
||||
let (block_import, mut telemetry, telemetry_worker_handle) = params.other;
|
||||
|
||||
let client = params.client.clone();
|
||||
let backend = params.backend.clone();
|
||||
@@ -526,7 +535,8 @@ where
|
||||
s => s.to_string().into(),
|
||||
})?;
|
||||
|
||||
let block_announce_validator = BlockAnnounceValidator::new(relay_chain_interface.clone(), id);
|
||||
let block_announce_validator =
|
||||
BlockAnnounceValidator::new(relay_chain_interface.clone(), para_id);
|
||||
|
||||
let force_authoring = parachain_config.force_authoring;
|
||||
let validator = parachain_config.role.is_authority();
|
||||
@@ -598,6 +608,7 @@ where
|
||||
if validator {
|
||||
let parachain_consensus = build_consensus(
|
||||
client.clone(),
|
||||
block_import,
|
||||
prometheus_registry.as_ref(),
|
||||
telemetry.as_ref().map(|t| t.handle()),
|
||||
&task_manager,
|
||||
@@ -611,7 +622,7 @@ where
|
||||
let spawner = task_manager.spawn_handle();
|
||||
|
||||
let params = StartCollatorParams {
|
||||
para_id: id,
|
||||
para_id,
|
||||
block_status: client.clone(),
|
||||
announce_block,
|
||||
client: client.clone(),
|
||||
@@ -630,7 +641,7 @@ where
|
||||
client: client.clone(),
|
||||
announce_block,
|
||||
task_manager: &mut task_manager,
|
||||
para_id: id,
|
||||
para_id,
|
||||
relay_chain_interface,
|
||||
relay_chain_slot_duration,
|
||||
import_queue,
|
||||
@@ -647,6 +658,7 @@ where
|
||||
/// Build the import queue for the rococo parachain runtime.
|
||||
pub fn rococo_parachain_build_import_queue(
|
||||
client: Arc<ParachainClient<rococo_parachain_runtime::RuntimeApi>>,
|
||||
block_import: ParachainBlockImport<rococo_parachain_runtime::RuntimeApi>,
|
||||
config: &Configuration,
|
||||
telemetry: Option<TelemetryHandle>,
|
||||
task_manager: &TaskManager,
|
||||
@@ -664,7 +676,7 @@ pub fn rococo_parachain_build_import_queue(
|
||||
_,
|
||||
_,
|
||||
>(cumulus_client_consensus_aura::ImportQueueParams {
|
||||
block_import: client.clone(),
|
||||
block_import,
|
||||
client,
|
||||
create_inherent_data_providers: move |_, _| async move {
|
||||
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||
@@ -689,7 +701,7 @@ pub async fn start_rococo_parachain_node(
|
||||
parachain_config: Configuration,
|
||||
polkadot_config: Configuration,
|
||||
collator_options: CollatorOptions,
|
||||
id: ParaId,
|
||||
para_id: ParaId,
|
||||
hwbench: Option<sc_sysinfo::HwBench>,
|
||||
) -> sc_service::error::Result<(
|
||||
TaskManager,
|
||||
@@ -699,10 +711,11 @@ pub async fn start_rococo_parachain_node(
|
||||
parachain_config,
|
||||
polkadot_config,
|
||||
collator_options,
|
||||
id,
|
||||
para_id,
|
||||
|_| Ok(RpcModule::new(())),
|
||||
rococo_parachain_build_import_queue,
|
||||
|client,
|
||||
block_import,
|
||||
prometheus_registry,
|
||||
telemetry,
|
||||
task_manager,
|
||||
@@ -733,7 +746,7 @@ pub async fn start_rococo_parachain_node(
|
||||
relay_parent,
|
||||
&relay_chain_interface,
|
||||
&validation_data,
|
||||
id,
|
||||
para_id,
|
||||
).await;
|
||||
|
||||
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||
@@ -753,7 +766,7 @@ pub async fn start_rococo_parachain_node(
|
||||
Ok((slot, timestamp, parachain_inherent))
|
||||
}
|
||||
},
|
||||
block_import: client.clone(),
|
||||
block_import,
|
||||
para_client: client,
|
||||
backoff_authoring_blocks: Option::<()>::None,
|
||||
sync_oracle,
|
||||
@@ -776,6 +789,7 @@ pub async fn start_rococo_parachain_node(
|
||||
/// Build the import queue for the shell runtime.
|
||||
pub fn shell_build_import_queue<RuntimeApi>(
|
||||
client: Arc<ParachainClient<RuntimeApi>>,
|
||||
block_import: ParachainBlockImport<RuntimeApi>,
|
||||
config: &Configuration,
|
||||
_: Option<TelemetryHandle>,
|
||||
task_manager: &TaskManager,
|
||||
@@ -794,7 +808,7 @@ where
|
||||
{
|
||||
cumulus_client_consensus_relay_chain::import_queue(
|
||||
client.clone(),
|
||||
client,
|
||||
block_import,
|
||||
|_, _| async { Ok(()) },
|
||||
&task_manager.spawn_essential_handle(),
|
||||
config.prometheus_registry(),
|
||||
@@ -807,7 +821,7 @@ pub async fn start_shell_node<RuntimeApi>(
|
||||
parachain_config: Configuration,
|
||||
polkadot_config: Configuration,
|
||||
collator_options: CollatorOptions,
|
||||
id: ParaId,
|
||||
para_id: ParaId,
|
||||
hwbench: Option<sc_sysinfo::HwBench>,
|
||||
) -> sc_service::error::Result<(TaskManager, Arc<ParachainClient<RuntimeApi>>)>
|
||||
where
|
||||
@@ -827,10 +841,11 @@ where
|
||||
parachain_config,
|
||||
polkadot_config,
|
||||
collator_options,
|
||||
id,
|
||||
para_id,
|
||||
|_| Ok(RpcModule::new(())),
|
||||
shell_build_import_queue,
|
||||
|client,
|
||||
block_import,
|
||||
prometheus_registry,
|
||||
telemetry,
|
||||
task_manager,
|
||||
@@ -841,7 +856,7 @@ where
|
||||
_| {
|
||||
let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording(
|
||||
task_manager.spawn_handle(),
|
||||
client.clone(),
|
||||
client,
|
||||
transaction_pool,
|
||||
prometheus_registry,
|
||||
telemetry,
|
||||
@@ -849,9 +864,9 @@ where
|
||||
|
||||
Ok(cumulus_client_consensus_relay_chain::build_relay_chain_consensus(
|
||||
cumulus_client_consensus_relay_chain::BuildRelayChainConsensusParams {
|
||||
para_id: id,
|
||||
para_id,
|
||||
proposer_factory,
|
||||
block_import: client,
|
||||
block_import,
|
||||
relay_chain_interface: relay_chain_interface.clone(),
|
||||
create_inherent_data_providers: move |_, (relay_parent, validation_data)| {
|
||||
let relay_chain_interface = relay_chain_interface.clone();
|
||||
@@ -861,7 +876,7 @@ where
|
||||
relay_parent,
|
||||
&relay_chain_interface,
|
||||
&validation_data,
|
||||
id,
|
||||
para_id,
|
||||
).await;
|
||||
let parachain_inherent = parachain_inherent.ok_or_else(|| {
|
||||
Box::<dyn std::error::Error + Send + Sync>::from(
|
||||
@@ -989,6 +1004,7 @@ where
|
||||
/// Build the import queue for Statemint and other Aura-based runtimes.
|
||||
pub fn aura_build_import_queue<RuntimeApi, AuraId: AppKey>(
|
||||
client: Arc<ParachainClient<RuntimeApi>>,
|
||||
block_import: ParachainBlockImport<RuntimeApi>,
|
||||
config: &Configuration,
|
||||
telemetry_handle: Option<TelemetryHandle>,
|
||||
task_manager: &TaskManager,
|
||||
@@ -1045,13 +1061,7 @@ where
|
||||
let registry = config.prometheus_registry();
|
||||
let spawner = task_manager.spawn_essential_handle();
|
||||
|
||||
Ok(BasicQueue::new(
|
||||
verifier,
|
||||
Box::new(ParachainBlockImport::new(client)),
|
||||
None,
|
||||
&spawner,
|
||||
registry,
|
||||
))
|
||||
Ok(BasicQueue::new(verifier, Box::new(block_import), None, &spawner, registry))
|
||||
}
|
||||
|
||||
/// Start an aura powered parachain node.
|
||||
@@ -1060,7 +1070,7 @@ pub async fn start_generic_aura_node<RuntimeApi, AuraId: AppKey>(
|
||||
parachain_config: Configuration,
|
||||
polkadot_config: Configuration,
|
||||
collator_options: CollatorOptions,
|
||||
id: ParaId,
|
||||
para_id: ParaId,
|
||||
hwbench: Option<sc_sysinfo::HwBench>,
|
||||
) -> sc_service::error::Result<(TaskManager, Arc<ParachainClient<RuntimeApi>>)>
|
||||
where
|
||||
@@ -1085,10 +1095,11 @@ where
|
||||
parachain_config,
|
||||
polkadot_config,
|
||||
collator_options,
|
||||
id,
|
||||
para_id,
|
||||
|_| Ok(RpcModule::new(())),
|
||||
aura_build_import_queue::<_, AuraId>,
|
||||
|client,
|
||||
block_import,
|
||||
prometheus_registry,
|
||||
telemetry,
|
||||
task_manager,
|
||||
@@ -1097,8 +1108,9 @@ where
|
||||
sync_oracle,
|
||||
keystore,
|
||||
force_authoring| {
|
||||
let client2 = client.clone();
|
||||
let spawn_handle = task_manager.spawn_handle();
|
||||
let client2 = client.clone();
|
||||
let block_import2 = block_import.clone();
|
||||
let transaction_pool2 = transaction_pool.clone();
|
||||
let telemetry2 = telemetry.clone();
|
||||
let prometheus_registry2 = prometheus_registry.map(|r| (*r).clone());
|
||||
@@ -1127,7 +1139,7 @@ where
|
||||
relay_parent,
|
||||
&relay_chain_for_aura,
|
||||
&validation_data,
|
||||
id,
|
||||
para_id,
|
||||
).await;
|
||||
|
||||
let timestamp =
|
||||
@@ -1149,8 +1161,8 @@ where
|
||||
Ok((slot, timestamp, parachain_inherent))
|
||||
}
|
||||
},
|
||||
block_import: client2.clone(),
|
||||
para_client: client2.clone(),
|
||||
block_import: block_import2,
|
||||
para_client: client2,
|
||||
backoff_authoring_blocks: Option::<()>::None,
|
||||
sync_oracle,
|
||||
keystore,
|
||||
@@ -1176,9 +1188,9 @@ where
|
||||
let relay_chain_consensus =
|
||||
cumulus_client_consensus_relay_chain::build_relay_chain_consensus(
|
||||
cumulus_client_consensus_relay_chain::BuildRelayChainConsensusParams {
|
||||
para_id: id,
|
||||
para_id,
|
||||
proposer_factory,
|
||||
block_import: client.clone(),
|
||||
block_import,
|
||||
relay_chain_interface: relay_chain_interface.clone(),
|
||||
create_inherent_data_providers:
|
||||
move |_, (relay_parent, validation_data)| {
|
||||
@@ -1189,7 +1201,7 @@ where
|
||||
relay_parent,
|
||||
&relay_chain_interface,
|
||||
&validation_data,
|
||||
id,
|
||||
para_id,
|
||||
).await;
|
||||
let parachain_inherent =
|
||||
parachain_inherent.ok_or_else(|| {
|
||||
@@ -1222,7 +1234,7 @@ async fn start_contracts_rococo_node_impl<RuntimeApi, RB, BIQ, BIC>(
|
||||
parachain_config: Configuration,
|
||||
polkadot_config: Configuration,
|
||||
collator_options: CollatorOptions,
|
||||
id: ParaId,
|
||||
para_id: ParaId,
|
||||
_rpc_ext_builder: RB,
|
||||
build_import_queue: BIQ,
|
||||
build_consensus: BIC,
|
||||
@@ -1242,20 +1254,20 @@ where
|
||||
+ pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>
|
||||
+ frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
|
||||
sc_client_api::StateBackendFor<ParachainBackend, Block>: sp_api::StateBackend<BlakeTwo256>,
|
||||
RB: Fn(Arc<ParachainClient<RuntimeApi>>) -> Result<jsonrpsee::RpcModule<()>, sc_service::Error>
|
||||
+ Send
|
||||
+ 'static,
|
||||
RB: Fn(Arc<ParachainClient<RuntimeApi>>) -> Result<jsonrpsee::RpcModule<()>, sc_service::Error>,
|
||||
BIQ: FnOnce(
|
||||
Arc<ParachainClient<RuntimeApi>>,
|
||||
&Configuration,
|
||||
Option<TelemetryHandle>,
|
||||
&TaskManager,
|
||||
) -> Result<
|
||||
sc_consensus::DefaultImportQueue<Block, ParachainClient<RuntimeApi>>,
|
||||
sc_service::Error,
|
||||
> + 'static,
|
||||
Arc<ParachainClient<RuntimeApi>>,
|
||||
ParachainBlockImport<RuntimeApi>,
|
||||
&Configuration,
|
||||
Option<TelemetryHandle>,
|
||||
&TaskManager,
|
||||
) -> Result<
|
||||
sc_consensus::DefaultImportQueue<Block, ParachainClient<RuntimeApi>>,
|
||||
sc_service::Error,
|
||||
>,
|
||||
BIC: FnOnce(
|
||||
Arc<ParachainClient<RuntimeApi>>,
|
||||
ParachainBlockImport<RuntimeApi>,
|
||||
Option<&Registry>,
|
||||
Option<TelemetryHandle>,
|
||||
&TaskManager,
|
||||
@@ -1269,7 +1281,7 @@ where
|
||||
let parachain_config = prepare_node_config(parachain_config);
|
||||
|
||||
let params = new_partial::<RuntimeApi, BIQ>(¶chain_config, build_import_queue)?;
|
||||
let (mut telemetry, telemetry_worker_handle) = params.other;
|
||||
let (block_import, mut telemetry, telemetry_worker_handle) = params.other;
|
||||
|
||||
let client = params.client.clone();
|
||||
let backend = params.backend.clone();
|
||||
@@ -1289,7 +1301,8 @@ where
|
||||
s => s.to_string().into(),
|
||||
})?;
|
||||
|
||||
let block_announce_validator = BlockAnnounceValidator::new(relay_chain_interface.clone(), id);
|
||||
let block_announce_validator =
|
||||
BlockAnnounceValidator::new(relay_chain_interface.clone(), para_id);
|
||||
|
||||
let force_authoring = parachain_config.force_authoring;
|
||||
let validator = parachain_config.role.is_authority();
|
||||
@@ -1361,6 +1374,7 @@ where
|
||||
if validator {
|
||||
let parachain_consensus = build_consensus(
|
||||
client.clone(),
|
||||
block_import,
|
||||
prometheus_registry.as_ref(),
|
||||
telemetry.as_ref().map(|t| t.handle()),
|
||||
&task_manager,
|
||||
@@ -1374,7 +1388,7 @@ where
|
||||
let spawner = task_manager.spawn_handle();
|
||||
|
||||
let params = StartCollatorParams {
|
||||
para_id: id,
|
||||
para_id,
|
||||
block_status: client.clone(),
|
||||
announce_block,
|
||||
client: client.clone(),
|
||||
@@ -1393,7 +1407,7 @@ where
|
||||
client: client.clone(),
|
||||
announce_block,
|
||||
task_manager: &mut task_manager,
|
||||
para_id: id,
|
||||
para_id,
|
||||
relay_chain_interface,
|
||||
relay_chain_slot_duration,
|
||||
import_queue,
|
||||
@@ -1410,6 +1424,7 @@ where
|
||||
#[allow(clippy::type_complexity)]
|
||||
pub fn contracts_rococo_build_import_queue(
|
||||
client: Arc<ParachainClient<contracts_rococo_runtime::RuntimeApi>>,
|
||||
block_import: ParachainBlockImport<contracts_rococo_runtime::RuntimeApi>,
|
||||
config: &Configuration,
|
||||
telemetry: Option<TelemetryHandle>,
|
||||
task_manager: &TaskManager,
|
||||
@@ -1427,7 +1442,7 @@ pub fn contracts_rococo_build_import_queue(
|
||||
_,
|
||||
_,
|
||||
>(cumulus_client_consensus_aura::ImportQueueParams {
|
||||
block_import: client.clone(),
|
||||
block_import,
|
||||
client,
|
||||
create_inherent_data_providers: move |_, _| async move {
|
||||
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||
@@ -1452,7 +1467,7 @@ pub async fn start_contracts_rococo_node(
|
||||
parachain_config: Configuration,
|
||||
polkadot_config: Configuration,
|
||||
collator_options: CollatorOptions,
|
||||
id: ParaId,
|
||||
para_id: ParaId,
|
||||
hwbench: Option<sc_sysinfo::HwBench>,
|
||||
) -> sc_service::error::Result<(
|
||||
TaskManager,
|
||||
@@ -1462,10 +1477,11 @@ pub async fn start_contracts_rococo_node(
|
||||
parachain_config,
|
||||
polkadot_config,
|
||||
collator_options,
|
||||
id,
|
||||
para_id,
|
||||
|_| Ok(RpcModule::new(())),
|
||||
contracts_rococo_build_import_queue,
|
||||
|client,
|
||||
block_import,
|
||||
prometheus_registry,
|
||||
telemetry,
|
||||
task_manager,
|
||||
@@ -1495,7 +1511,7 @@ pub async fn start_contracts_rococo_node(
|
||||
relay_parent,
|
||||
&relay_chain_interface,
|
||||
&validation_data,
|
||||
id,
|
||||
para_id,
|
||||
).await;
|
||||
|
||||
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||
@@ -1515,7 +1531,7 @@ pub async fn start_contracts_rococo_node(
|
||||
Ok((slot, timestamp, parachain_inherent))
|
||||
}
|
||||
},
|
||||
block_import: client.clone(),
|
||||
block_import,
|
||||
para_client: client,
|
||||
backoff_authoring_blocks: Option::<()>::None,
|
||||
sync_oracle,
|
||||
|
||||
Reference in New Issue
Block a user