Skip to content

Commit

Permalink
Re-enable block import in collator nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
skunert committed Nov 30, 2023
1 parent 63baa54 commit 8e924a2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
3 changes: 2 additions & 1 deletion cumulus/parachain-template/node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,11 @@ pub fn new_partial(
let executor = ParachainExecutor::new_with_wasm_executor(wasm);

let (client, backend, keystore_container, task_manager) =
sc_service::new_full_parts::<Block, RuntimeApi, _>(
sc_service::new_full_parts_record_import::<Block, RuntimeApi, _>(
config,
telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),
executor,
true,
)?;
let client = Arc::new(client);

Expand Down
3 changes: 2 additions & 1 deletion cumulus/polkadot-parachain/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,11 @@ where
.build();

let (client, backend, keystore_container, task_manager) =
sc_service::new_full_parts::<Block, RuntimeApi, _>(
sc_service::new_full_parts_record_import::<Block, RuntimeApi, _>(
config,
telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),
executor,
true,
)?;
let client = Arc::new(client);

Expand Down
17 changes: 10 additions & 7 deletions cumulus/test/client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,16 @@ pub fn validate_block(
let mut ext_ext = ext.ext();

let heap_pages = HeapAllocStrategy::Static { extra_pages: 1024 };
let executor = WasmExecutor::<sp_io::SubstrateHostFunctions>::builder()
.with_execution_method(WasmExecutionMethod::default())
.with_max_runtime_instances(1)
.with_runtime_cache_size(2)
.with_onchain_heap_alloc_strategy(heap_pages)
.with_offchain_heap_alloc_strategy(heap_pages)
.build();
let executor = WasmExecutor::<(
sp_io::SubstrateHostFunctions,
cumulus_primitives_proof_size_hostfunction::storage_proof_size::HostFunctions,
)>::builder()
.with_execution_method(WasmExecutionMethod::default())
.with_max_runtime_instances(1)
.with_runtime_cache_size(2)
.with_onchain_heap_alloc_strategy(heap_pages)
.with_offchain_heap_alloc_strategy(heap_pages)
.build();

executor
.uncached_call(
Expand Down

0 comments on commit 8e924a2

Please sign in to comment.