From b3e589aead87fc6c51c8fb4a7e86ada75edbce69 Mon Sep 17 00:00:00 2001 From: Ermal Kaleci Date: Thu, 8 Aug 2024 21:23:01 +0200 Subject: [PATCH] remove NativeElseWasmExecutor --- bin/collator/src/command.rs | 112 ++++++------- bin/collator/src/local/mod.rs | 2 +- bin/collator/src/local/service.rs | 49 +++--- bin/collator/src/parachain/mod.rs | 4 +- bin/collator/src/parachain/service.rs | 232 +++++++++----------------- 5 files changed, 157 insertions(+), 242 deletions(-) diff --git a/bin/collator/src/command.rs b/bin/collator/src/command.rs index 817f5d7373..d33ce9f18e 100644 --- a/bin/collator/src/command.rs +++ b/bin/collator/src/command.rs @@ -21,8 +21,8 @@ use crate::{ cli::{Cli, RelayChainCli, Subcommand}, local::{self, development_config}, parachain::{ - self, astar, chain_spec, service::AdditionalConfig, shibuya, shiden, start_astar_node, - start_shibuya_node, start_shiden_node, + self, chain_spec, service::AdditionalConfig, start_astar_node, start_shibuya_node, + start_shiden_node, }, }; use cumulus_primitives_core::ParaId; @@ -205,7 +205,7 @@ pub fn run() -> Result<()> { task_manager, import_queue, .. - } = parachain::new_partial::( + } = parachain::new_partial::( &config, parachain::build_import_queue, )?; @@ -218,7 +218,7 @@ pub fn run() -> Result<()> { task_manager, import_queue, .. - } = parachain::new_partial::( + } = parachain::new_partial::( &config, parachain::build_import_queue_fallback, )?; @@ -231,7 +231,7 @@ pub fn run() -> Result<()> { task_manager, import_queue, .. - } = parachain::new_partial::( + } = parachain::new_partial::( &config, parachain::build_import_queue, )?; @@ -247,7 +247,7 @@ pub fn run() -> Result<()> { client, task_manager, .. - } = parachain::new_partial::( + } = parachain::new_partial::( &config, parachain::build_import_queue, )?; @@ -259,7 +259,7 @@ pub fn run() -> Result<()> { client, task_manager, .. - } = parachain::new_partial::( + } = parachain::new_partial::( &config, parachain::build_import_queue_fallback, )?; @@ -271,7 +271,7 @@ pub fn run() -> Result<()> { client, task_manager, .. - } = parachain::new_partial::( + } = parachain::new_partial::( &config, parachain::build_import_queue, )?; @@ -287,7 +287,7 @@ pub fn run() -> Result<()> { client, task_manager, .. - } = parachain::new_partial::( + } = parachain::new_partial::( &config, parachain::build_import_queue, )?; @@ -299,7 +299,7 @@ pub fn run() -> Result<()> { client, task_manager, .. - } = parachain::new_partial::( + } = parachain::new_partial::( &config, parachain::build_import_queue_fallback, )?; @@ -311,7 +311,7 @@ pub fn run() -> Result<()> { client, task_manager, .. - } = parachain::new_partial::( + } = parachain::new_partial::( &config, parachain::build_import_queue, )?; @@ -328,7 +328,7 @@ pub fn run() -> Result<()> { task_manager, import_queue, .. - } = parachain::new_partial::( + } = parachain::new_partial::( &config, parachain::build_import_queue, )?; @@ -341,7 +341,7 @@ pub fn run() -> Result<()> { task_manager, import_queue, .. - } = parachain::new_partial::( + } = parachain::new_partial::( &config, parachain::build_import_queue_fallback, )?; @@ -354,7 +354,7 @@ pub fn run() -> Result<()> { task_manager, import_queue, .. - } = parachain::new_partial::( + } = parachain::new_partial::( &config, parachain::build_import_queue, )?; @@ -390,7 +390,7 @@ pub fn run() -> Result<()> { task_manager, backend, .. - } = parachain::new_partial::( + } = parachain::new_partial::( &config, parachain::build_import_queue, )?; @@ -407,7 +407,7 @@ pub fn run() -> Result<()> { task_manager, backend, .. - } = parachain::new_partial::( + } = parachain::new_partial::( &config, parachain::build_import_queue_fallback, )?; @@ -424,7 +424,7 @@ pub fn run() -> Result<()> { task_manager, backend, .. - } = parachain::new_partial::( + } = parachain::new_partial::( &config, parachain::build_import_queue, )?; @@ -441,7 +441,7 @@ pub fn run() -> Result<()> { if runner.config().chain_spec.is_astar() { runner.sync_run(|config| { let PartialComponents { client, .. } = - parachain::new_partial::( + parachain::new_partial::( &config, parachain::build_import_queue, )?; @@ -450,7 +450,7 @@ pub fn run() -> Result<()> { } else if runner.config().chain_spec.is_shiden() { runner.sync_run(|config| { let PartialComponents { client, .. } = - parachain::new_partial::( + parachain::new_partial::( &config, parachain::build_import_queue_fallback, )?; @@ -459,7 +459,7 @@ pub fn run() -> Result<()> { } else { runner.sync_run(|config| { let PartialComponents { client, .. } = - parachain::new_partial::( + parachain::new_partial::( &config, parachain::build_import_queue, )?; @@ -519,20 +519,18 @@ pub fn run() -> Result<()> { BenchmarkCmd::Block(cmd) => { if chain_spec.is_astar() { runner.sync_run(|config| { - let params = - parachain::new_partial::( - &config, - parachain::build_import_queue, - )?; + let params = parachain::new_partial::( + &config, + parachain::build_import_queue, + )?; cmd.run(params.client) }) } else if chain_spec.is_shiden() { runner.sync_run(|config| { - let params = - parachain::new_partial::( - &config, - parachain::build_import_queue_fallback, - )?; + let params = parachain::new_partial::( + &config, + parachain::build_import_queue_fallback, + )?; cmd.run(params.client) }) } else if chain_spec.is_shibuya() { @@ -556,11 +554,10 @@ pub fn run() -> Result<()> { BenchmarkCmd::Storage(cmd) => { if chain_spec.is_astar() { runner.sync_run(|config| { - let params = - parachain::new_partial::( - &config, - parachain::build_import_queue, - )?; + let params = parachain::new_partial::( + &config, + parachain::build_import_queue, + )?; let db = params.backend.expose_db(); let storage = params.backend.expose_storage(); @@ -568,11 +565,10 @@ pub fn run() -> Result<()> { }) } else if chain_spec.is_shiden() { runner.sync_run(|config| { - let params = - parachain::new_partial::( - &config, - parachain::build_import_queue_fallback, - )?; + let params = parachain::new_partial::( + &config, + parachain::build_import_queue_fallback, + )?; let db = params.backend.expose_db(); let storage = params.backend.expose_storage(); @@ -605,11 +601,10 @@ pub fn run() -> Result<()> { BenchmarkCmd::Overhead(cmd) => { if chain_spec.is_astar() { runner.sync_run(|config| { - let params = - parachain::new_partial::( - &config, - parachain::build_import_queue, - )?; + let params = parachain::new_partial::( + &config, + parachain::build_import_queue, + )?; let ext_builder = RemarkBuilder::new(params.client.clone()); let inherent_data = para_benchmark_inherent_data() .map_err(|e| format!("generating inherent data: {:?}", e))?; @@ -624,11 +619,10 @@ pub fn run() -> Result<()> { }) } else if chain_spec.is_shiden() { runner.sync_run(|config| { - let params = - parachain::new_partial::( - &config, - parachain::build_import_queue_fallback, - )?; + let params = parachain::new_partial::( + &config, + parachain::build_import_queue_fallback, + )?; let ext_builder = RemarkBuilder::new(params.client.clone()); let inherent_data = para_benchmark_inherent_data() @@ -684,11 +678,10 @@ pub fn run() -> Result<()> { BenchmarkCmd::Extrinsic(cmd) => { if chain_spec.is_astar() { runner.sync_run(|config| { - let params = - parachain::new_partial::( - &config, - parachain::build_import_queue, - )?; + let params = parachain::new_partial::( + &config, + parachain::build_import_queue, + )?; let remark_builder = RemarkBuilder::new(params.client.clone()); let tka_builder = TransferKeepAliveBuilder::new( params.client.clone(), @@ -706,11 +699,10 @@ pub fn run() -> Result<()> { }) } else if chain_spec.is_shiden() { runner.sync_run(|config| { - let params = - parachain::new_partial::( - &config, - parachain::build_import_queue_fallback, - )?; + let params = parachain::new_partial::( + &config, + parachain::build_import_queue_fallback, + )?; let remark_builder = RemarkBuilder::new(params.client.clone()); let tka_builder = TransferKeepAliveBuilder::new( params.client.clone(), diff --git a/bin/collator/src/local/mod.rs b/bin/collator/src/local/mod.rs index 164a544fb0..859723fd15 100644 --- a/bin/collator/src/local/mod.rs +++ b/bin/collator/src/local/mod.rs @@ -25,4 +25,4 @@ mod service; mod chain_spec; pub use chain_spec::*; -pub use service::{new_partial, start_node, Executor, HostFunctions, RuntimeApi}; +pub use service::{new_partial, start_node, HostFunctions, RuntimeApi}; diff --git a/bin/collator/src/local/service.rs b/bin/collator/src/local/service.rs index 71848b4681..e444eb7f9c 100644 --- a/bin/collator/src/local/service.rs +++ b/bin/collator/src/local/service.rs @@ -24,7 +24,7 @@ use fc_storage::StorageOverrideHandler; use futures::{FutureExt, StreamExt}; use sc_client_api::{Backend, BlockBackend, BlockchainEvents}; use sc_consensus_grandpa::SharedVoterState; -use sc_executor::NativeElseWasmExecutor; +use sc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY}; use sc_network::NetworkBackend; use sc_service::{error::Error as ServiceError, Configuration, TaskManager}; use sc_telemetry::{Telemetry, TelemetryWorker}; @@ -46,37 +46,20 @@ use astar_primitives::*; /// imported and generated. const GRANDPA_JUSTIFICATION_PERIOD: u32 = 512; -/// Extra host functions -#[cfg(feature = "runtime-benchmarks")] -pub type HostFunctions = ( - frame_benchmarking::benchmarking::HostFunctions, - // evm tracing host functions - moonbeam_primitives_ext::moonbeam_ext::HostFunctions, -); - -/// Extra host functions -#[cfg(not(feature = "runtime-benchmarks"))] +/// Parachain host functions +#[cfg(feature = "evm-tracing")] pub type HostFunctions = ( - // evm tracing host functions + cumulus_client_service::ParachainHostFunctions, moonbeam_primitives_ext::moonbeam_ext::HostFunctions, ); -/// Local runtime native executor. -pub struct Executor; +/// Parachain host functions +#[cfg(not(feature = "evm-tracing"))] +pub type HostFunctions = (cumulus_client_service::ParachainHostFunctions,); -impl sc_executor::NativeExecutionDispatch for Executor { - type ExtendHostFunctions = HostFunctions; - - fn dispatch(method: &str, data: &[u8]) -> Option> { - local_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - local_runtime::native_version() - } -} +type ParachainExecutor = WasmExecutor; -type FullClient = sc_service::TFullClient>; +type FullClient = sc_service::TFullClient; type FullBackend = sc_service::TFullBackend; type FullSelectChain = sc_consensus::LongestChain; @@ -119,7 +102,19 @@ pub fn new_partial( }) .transpose()?; - let executor = sc_service::new_native_or_wasm_executor(&config); + let heap_pages = config + .default_heap_pages + .map_or(DEFAULT_HEAP_ALLOC_STRATEGY, |h| HeapAllocStrategy::Static { + extra_pages: h as _, + }); + + let executor = ParachainExecutor::builder() + .with_execution_method(config.wasm_method) + .with_onchain_heap_alloc_strategy(heap_pages) + .with_offchain_heap_alloc_strategy(heap_pages) + .with_max_runtime_instances(config.max_runtime_instances) + .with_runtime_cache_size(config.runtime_cache_size) + .build(); let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts_record_import::( diff --git a/bin/collator/src/parachain/mod.rs b/bin/collator/src/parachain/mod.rs index 101be82796..b93711ae27 100644 --- a/bin/collator/src/parachain/mod.rs +++ b/bin/collator/src/parachain/mod.rs @@ -28,8 +28,8 @@ pub mod service; pub mod chain_spec; pub use service::{ - astar, build_import_queue, build_import_queue_fallback, new_partial, shibuya, shiden, - start_astar_node, start_shibuya_node, start_shiden_node, HostFunctions, + build_import_queue, build_import_queue_fallback, new_partial, start_astar_node, + start_shibuya_node, start_shiden_node, HostFunctions, }; pub(crate) use shell_upgrade::{ diff --git a/bin/collator/src/parachain/service.rs b/bin/collator/src/parachain/service.rs index 5e40dff20d..0e64f6b2f4 100644 --- a/bin/collator/src/parachain/service.rs +++ b/bin/collator/src/parachain/service.rs @@ -41,7 +41,7 @@ use fc_storage::StorageOverrideHandler; use futures::StreamExt; use sc_client_api::BlockchainEvents; use sc_consensus::{import_queue::BasicQueue, ImportQueue}; -use sc_executor::NativeElseWasmExecutor; +use sc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY}; use sc_network::{NetworkBackend, NetworkBlock}; use sc_network_sync::SyncingService; use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager}; @@ -66,113 +66,52 @@ use crate::{ rpc::tracing, }; -/// Extra host functions +/// Parachain host functions +#[cfg(feature = "evm-tracing")] pub type HostFunctions = ( cumulus_client_service::ParachainHostFunctions, moonbeam_primitives_ext::moonbeam_ext::HostFunctions, ); -/// Astar network runtime executor. -pub mod astar { - use super::HostFunctions; - pub use astar_runtime::RuntimeApi; - - /// Shibuya runtime executor. - pub struct Executor; - impl sc_executor::NativeExecutionDispatch for Executor { - type ExtendHostFunctions = HostFunctions; - - fn dispatch(method: &str, data: &[u8]) -> Option> { - astar_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - astar_runtime::native_version() - } - } -} - -/// Shiden network runtime executor. -pub mod shiden { - use super::HostFunctions; - pub use shiden_runtime::RuntimeApi; - - /// Shiden runtime executor. - pub struct Executor; - impl sc_executor::NativeExecutionDispatch for Executor { - type ExtendHostFunctions = HostFunctions; - - fn dispatch(method: &str, data: &[u8]) -> Option> { - shiden_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - shiden_runtime::native_version() - } - } -} - -/// Shibuya network runtime executor. -pub mod shibuya { - use super::HostFunctions; - pub use shibuya_runtime::RuntimeApi; - - /// Shibuya runtime executor. - pub struct Executor; - impl sc_executor::NativeExecutionDispatch for Executor { - type ExtendHostFunctions = HostFunctions; - - fn dispatch(method: &str, data: &[u8]) -> Option> { - shibuya_runtime::api::dispatch(method, data) - } +/// Parachain host functions +#[cfg(not(feature = "evm-tracing"))] +pub type HostFunctions = (cumulus_client_service::ParachainHostFunctions,); - fn native_version() -> sc_executor::NativeVersion { - shibuya_runtime::native_version() - } - } -} +type ParachainExecutor = WasmExecutor; /// Starts a `ServiceBuilder` for a full service. /// /// Use this macro if you don't actually need the full service, but just the builder in order to /// be able to perform chain operations. -pub fn new_partial( +pub fn new_partial( config: &Configuration, build_import_queue: BIQ, ) -> Result< PartialComponents< - TFullClient>, + TFullClient, TFullBackend, (), sc_consensus::DefaultImportQueue, - sc_transaction_pool::FullPool< - Block, - TFullClient>, - >, + sc_transaction_pool::FullPool>, ( ParachainBlockImport< Block, FrontierBlockImport< Block, - Arc>>, - TFullClient>, + Arc>, + TFullClient, >, TFullBackend, >, Option, Option, - Arc< - fc_db::kv::Backend< - Block, - TFullClient>, - >, - >, + Arc>>, ), >, sc_service::Error, > where - RuntimeApi: ConstructRuntimeApi>> + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, @@ -185,15 +124,14 @@ where + fp_rpc::EthereumRuntimeRPCApi, sc_client_api::StateBackendFor, Block>: sc_client_api::backend::StateBackend, - Executor: sc_executor::NativeExecutionDispatch + 'static, BIQ: FnOnce( - Arc>>, + Arc>, ParachainBlockImport< Block, FrontierBlockImport< Block, - Arc>>, - TFullClient>, + Arc>, + TFullClient, >, TFullBackend, >, @@ -213,7 +151,19 @@ where }) .transpose()?; - let executor = sc_service::new_native_or_wasm_executor(&config); + let heap_pages = config + .default_heap_pages + .map_or(DEFAULT_HEAP_ALLOC_STRATEGY, |h| HeapAllocStrategy::Static { + extra_pages: h as _, + }); + + let executor = ParachainExecutor::builder() + .with_execution_method(config.wasm_method) + .with_onchain_heap_alloc_strategy(heap_pages) + .with_offchain_heap_alloc_strategy(heap_pages) + .with_max_runtime_instances(config.max_runtime_instances) + .with_runtime_cache_size(config.runtime_cache_size) + .build(); let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts_record_import::( @@ -305,7 +255,7 @@ async fn build_relay_chain_interface( /// This is the actual implementation that is abstract over the executor and the runtime api. #[cfg(not(feature = "evm-tracing"))] #[sc_tracing::logging::prefix_logs_with("Parachain")] -async fn start_node_impl( +async fn start_node_impl( parachain_config: Configuration, polkadot_config: Configuration, collator_options: CollatorOptions, @@ -315,10 +265,10 @@ async fn start_node_impl( start_consensus: SC, ) -> sc_service::error::Result<( TaskManager, - Arc>>, + Arc>, )> where - RuntimeApi: ConstructRuntimeApi>> + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, @@ -336,15 +286,14 @@ where + AuraApi, sc_client_api::StateBackendFor, Block>: sc_client_api::backend::StateBackend, - Executor: sc_executor::NativeExecutionDispatch + 'static, BIQ: FnOnce( - Arc>>, + Arc>, ParachainBlockImport< Block, FrontierBlockImport< Block, - Arc>>, - TFullClient>, + Arc>, + TFullClient, >, TFullBackend, >, @@ -353,14 +302,14 @@ where &TaskManager, ) -> sc_consensus::DefaultImportQueue, SC: FnOnce( - Arc>>, + Arc>, Arc>, ParachainBlockImport< Block, FrontierBlockImport< Block, - Arc>>, - TFullClient>, + Arc>, + TFullClient, >, TFullBackend, >, @@ -368,12 +317,7 @@ where Option, &TaskManager, Arc, - Arc< - sc_transaction_pool::FullPool< - Block, - TFullClient>, - >, - >, + Arc>>, Arc>, KeystorePtr, ParaId, @@ -384,7 +328,7 @@ where { let parachain_config = prepare_node_config(parachain_config); - let params = new_partial::(¶chain_config, build_import_queue)?; + let params = new_partial::(¶chain_config, build_import_queue)?; let (parachain_block_import, mut telemetry, telemetry_worker_handle, frontier_backend) = params.other; let net_config = @@ -630,7 +574,7 @@ pub struct AdditionalConfig { /// This is the actual implementation that is abstract over the executor and the runtime api. #[cfg(feature = "evm-tracing")] #[sc_tracing::logging::prefix_logs_with("Parachain")] -async fn start_node_impl( +async fn start_node_impl( parachain_config: Configuration, polkadot_config: Configuration, collator_options: CollatorOptions, @@ -640,10 +584,10 @@ async fn start_node_impl( start_consensus: SC, ) -> sc_service::error::Result<( TaskManager, - Arc>>, + Arc>, )> where - RuntimeApi: ConstructRuntimeApi>> + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, @@ -663,15 +607,14 @@ where + AuraApi, sc_client_api::StateBackendFor, Block>: sc_client_api::backend::StateBackend, - Executor: sc_executor::NativeExecutionDispatch + 'static, BIQ: FnOnce( - Arc>>, + Arc>, ParachainBlockImport< Block, FrontierBlockImport< Block, - Arc>>, - TFullClient>, + Arc>, + TFullClient, >, TFullBackend, >, @@ -680,14 +623,14 @@ where &TaskManager, ) -> sc_consensus::DefaultImportQueue, SC: FnOnce( - Arc>>, + Arc>, Arc>, ParachainBlockImport< Block, FrontierBlockImport< Block, - Arc>>, - TFullClient>, + Arc>, + TFullClient, >, TFullBackend, >, @@ -695,12 +638,7 @@ where Option, &TaskManager, Arc, - Arc< - sc_transaction_pool::FullPool< - Block, - TFullClient>, - >, - >, + Arc>>, Arc>, KeystorePtr, ParaId, @@ -711,7 +649,7 @@ where { let parachain_config = prepare_node_config(parachain_config); - let params = new_partial::(¶chain_config, build_import_queue)?; + let params = new_partial::(¶chain_config, build_import_queue)?; let (parachain_block_import, mut telemetry, telemetry_worker_handle, frontier_backend) = params.other; let net_config = @@ -966,14 +904,14 @@ where /// Build aura import queue with fallback to relay-chain verifier. /// Starts with relay-chain verifier until aura becomes available. -pub fn build_import_queue_fallback( - client: Arc>>, +pub fn build_import_queue_fallback( + client: Arc>, block_import: ParachainBlockImport< Block, FrontierBlockImport< Block, - Arc>>, - TFullClient>, + Arc>, + TFullClient, >, TFullBackend, >, @@ -982,7 +920,7 @@ pub fn build_import_queue_fallback( task_manager: &TaskManager, ) -> sc_consensus::DefaultImportQueue where - RuntimeApi: ConstructRuntimeApi>> + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, @@ -996,7 +934,6 @@ where + AuraApi, sc_client_api::StateBackendFor, Block>: sc_client_api::StateBackend, - Executor: sc_executor::NativeExecutionDispatch + 'static, { let verifier_client = client.clone(); @@ -1042,14 +979,14 @@ where } /// Build aura only import queue. -pub fn build_import_queue( - client: Arc>>, +pub fn build_import_queue( + client: Arc>, block_import: ParachainBlockImport< Block, FrontierBlockImport< Block, - Arc>>, - TFullClient>, + Arc>, + TFullClient, >, TFullBackend, >, @@ -1058,7 +995,7 @@ pub fn build_import_queue( task_manager: &TaskManager, ) -> sc_consensus::DefaultImportQueue where - RuntimeApi: ConstructRuntimeApi>> + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, @@ -1072,7 +1009,6 @@ where + AuraApi, sc_client_api::StateBackendFor, Block>: sc_client_api::StateBackend, - Executor: sc_executor::NativeExecutionDispatch + 'static, { let cidp_client = client.clone(); @@ -1108,15 +1044,15 @@ where } /// Start collating with the `shell` runtime while waiting for an upgrade to an Aura compatible runtime. -fn start_aura_consensus_fallback( - client: Arc>>, +fn start_aura_consensus_fallback( + client: Arc>, backend: Arc>, parachain_block_import: ParachainBlockImport< Block, FrontierBlockImport< Block, - Arc>>, - TFullClient>, + Arc>, + TFullClient, >, TFullBackend, >, @@ -1125,10 +1061,7 @@ fn start_aura_consensus_fallback( task_manager: &TaskManager, relay_chain_interface: Arc, transaction_pool: Arc< - sc_transaction_pool::FullPool< - Block, - TFullClient>, - >, + sc_transaction_pool::FullPool>, >, sync_oracle: Arc>, keystore: KeystorePtr, @@ -1137,7 +1070,7 @@ fn start_aura_consensus_fallback( additional_config: AdditionalConfig, ) -> Result<(), sc_service::Error> where - RuntimeApi: ConstructRuntimeApi>> + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, @@ -1153,7 +1086,6 @@ where + cumulus_primitives_core::CollectCollationInfo, sc_client_api::StateBackendFor, Block>: sc_client_api::StateBackend, - Executor: sc_executor::NativeExecutionDispatch + 'static, { let mut proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( task_manager.spawn_handle(), @@ -1260,15 +1192,15 @@ where Ok(()) } -fn start_aura_consensus( - client: Arc>>, +fn start_aura_consensus( + client: Arc>, backend: Arc>, parachain_block_import: ParachainBlockImport< Block, FrontierBlockImport< Block, - Arc>>, - TFullClient>, + Arc>, + TFullClient, >, TFullBackend, >, @@ -1277,10 +1209,7 @@ fn start_aura_consensus( task_manager: &TaskManager, relay_chain_interface: Arc, transaction_pool: Arc< - sc_transaction_pool::FullPool< - Block, - TFullClient>, - >, + sc_transaction_pool::FullPool>, >, sync_oracle: Arc>, keystore: KeystorePtr, @@ -1289,7 +1218,7 @@ fn start_aura_consensus( additional_config: AdditionalConfig, ) -> Result<(), sc_service::Error> where - RuntimeApi: ConstructRuntimeApi>> + RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, @@ -1305,7 +1234,6 @@ where + cumulus_primitives_core::CollectCollationInfo, sc_client_api::StateBackendFor, Block>: sc_client_api::StateBackend, - Executor: sc_executor::NativeExecutionDispatch + 'static, { let mut proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording( task_manager.spawn_handle(), @@ -1376,9 +1304,9 @@ pub async fn start_astar_node( additional_config: AdditionalConfig, ) -> sc_service::error::Result<( TaskManager, - Arc>>, + Arc>, )> { - start_node_impl::>( + start_node_impl::>( parachain_config, polkadot_config, collator_options, @@ -1399,9 +1327,9 @@ pub async fn start_shiden_node( additional_config: AdditionalConfig, ) -> sc_service::error::Result<( TaskManager, - Arc>>, + Arc>, )> { - start_node_impl::>( + start_node_impl::>( parachain_config, polkadot_config, collator_options, @@ -1422,9 +1350,9 @@ pub async fn start_shibuya_node( additional_config: AdditionalConfig, ) -> sc_service::error::Result<( TaskManager, - Arc>>, + Arc>, )> { - start_node_impl::>( + start_node_impl::>( parachain_config, polkadot_config, collator_options,