diff --git a/pallets/author-slot-filter/src/lib.rs b/pallets/author-slot-filter/src/lib.rs index 2f922600..b4d8189c 100644 --- a/pallets/author-slot-filter/src/lib.rs +++ b/pallets/author-slot-filter/src/lib.rs @@ -41,6 +41,7 @@ mod mock; #[cfg(test)] mod tests; +#[allow(deprecated)] #[pallet] pub mod pallet { diff --git a/parachain-template/node/src/cli.rs b/parachain-template/node/src/cli.rs index f17741a8..378e85cc 100644 --- a/parachain-template/node/src/cli.rs +++ b/parachain-template/node/src/cli.rs @@ -64,7 +64,7 @@ pub struct RelayChainCli { pub chain_id: Option, /// The base path that should be used by the relay chain. - pub base_path: Option, + pub base_path: PathBuf, } impl RelayChainCli { @@ -77,7 +77,7 @@ impl RelayChainCli { let chain_id = extension.map(|e| e.relay_chain.clone()); let base_path = para_config.base_path.path().join("polkadot"); Self { - base_path: Some(base_path), + base_path, chain_id, base: clap::Parser::parse_from(relay_chain_args), } diff --git a/parachain-template/node/src/command.rs b/parachain-template/node/src/command.rs index 7c72e5c8..bbeed0d8 100644 --- a/parachain-template/node/src/command.rs +++ b/parachain-template/node/src/command.rs @@ -340,7 +340,7 @@ impl CliConfiguration for RelayChainCli { Ok(self .shared_params() .base_path()? - .or_else(|| self.base_path.clone().map(Into::into))) + .or_else(|| Some(self.base_path.clone().into()))) } fn rpc_addr(&self, default_listen_port: u16) -> Result> { diff --git a/parachain-template/node/src/service.rs b/parachain-template/node/src/service.rs index db7924a4..36bef2b4 100644 --- a/parachain-template/node/src/service.rs +++ b/parachain-template/node/src/service.rs @@ -30,7 +30,7 @@ use polkadot_service::CollatorPair; // Substrate Imports use sc_consensus::ImportQueue; use sc_consensus_manual_seal::{run_instant_seal, InstantSealParams}; -use sc_executor::NativeElseWasmExecutor; +use sc_executor::{NativeElseWasmExecutor, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY, HeapAllocStrategy}; use sc_network::{config::FullNetworkConfiguration, NetworkBlock}; use sc_network_sync::SyncingService; use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager}; @@ -107,12 +107,19 @@ where }) .transpose()?; - let executor = sc_executor::NativeElseWasmExecutor::::new( - config.wasm_method, - config.default_heap_pages, - config.max_runtime_instances, - config.runtime_cache_size, - ); + let heap_pages = config.default_heap_pages.map_or(DEFAULT_HEAP_ALLOC_STRATEGY, |h| { + HeapAllocStrategy::Static { extra_pages: h as _ } + }); + + let wasm = WasmExecutor::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 executor = sc_executor::NativeElseWasmExecutor::::new_with_wasm_executor(wasm); let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts::(