Companion for removal of execution strategies (#2836)

* Companion for removal of execution strategies

https://github.com/paritytech/substrate/pull/14387

* Update Cargo.lock

* Remove patches

* Delete file again

* update lockfile for {"polkadot", "substrate"}

* Fix

* FMT

---------

Co-authored-by: parity-processbot <>
This commit is contained in:
Bastian Köcher
2023-07-12 00:48:51 +02:00
committed by GitHub
parent 9e68861cad
commit ae0210c1cc
10 changed files with 317 additions and 310 deletions
@@ -15,6 +15,7 @@ log = "0.4.19"
codec = { package = "parity-scale-codec", version = "3.0.0" }
serde = { version = "1.0.168", features = ["derive"] }
jsonrpsee = { version = "0.16.2", features = ["server"] }
futures = "0.3.28"
# Local
parachain-template-runtime = { path = "../runtime" }
@@ -27,6 +28,7 @@ sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
+21 -5
View File
@@ -21,6 +21,7 @@ use cumulus_relay_chain_interface::RelayChainInterface;
// Substrate Imports
use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE;
use sc_client_api::Backend;
use sc_consensus::ImportQueue;
use sc_executor::{
HeapAllocStrategy, NativeElseWasmExecutor, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY,
@@ -29,6 +30,7 @@ use sc_network::NetworkBlock;
use sc_network_sync::SyncingService;
use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager};
use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle};
use sc_transaction_pool_api::OffchainTransactionPoolFactory;
use sp_keystore::KeystorePtr;
use substrate_prometheus_endpoint::Registry;
@@ -194,11 +196,25 @@ async fn start_node_impl(
.await?;
if parachain_config.offchain_worker.enabled {
sc_service::build_offchain_workers(
&parachain_config,
task_manager.spawn_handle(),
client.clone(),
network.clone(),
use futures::FutureExt;
task_manager.spawn_handle().spawn(
"offchain-workers-runner",
"offchain-work",
sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions {
runtime_api_provider: client.clone(),
keystore: Some(params.keystore_container.keystore()),
offchain_db: backend.offchain_storage(),
transaction_pool: Some(OffchainTransactionPoolFactory::new(
transaction_pool.clone(),
)),
network_provider: network.clone(),
is_validator: parachain_config.role.is_authority(),
enable_http_requests: false,
custom_extensions: move |_| vec![],
})
.run(client.clone(), task_manager.spawn_handle())
.boxed(),
);
}