diff --git a/Cargo.lock b/Cargo.lock index 63d9214..0aee972 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10607,7 +10607,6 @@ dependencies = [ "sc-client-api", "sc-client-db", "sc-consensus-slots", - "sc-executor", "sc-network", "sc-service", "sc-storage-monitor", diff --git a/Cargo.toml b/Cargo.toml index 82ef486..5844574 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,7 +55,6 @@ relm4-components = { version = "0.7.0-beta.2", git = "https://github.com/Relm4/R sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } sc-client-db = { git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } sc-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } -sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } sc-storage-monitor = { git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } diff --git a/src/backend/node.rs b/src/backend/node.rs index f9457e0..4ac0b7f 100644 --- a/src/backend/node.rs +++ b/src/backend/node.rs @@ -10,9 +10,7 @@ use sc_client_db::{DatabaseSource, PruningMode}; use sc_consensus_slots::SlotProportion; use sc_network::config::{Ed25519Secret, NetworkConfiguration, NodeKeyConfig, SyncMode}; use sc_service::config::{KeystoreConfig, OffchainWorkerConfig}; -use sc_service::{ - BasePath, BlocksPruning, Configuration, NativeExecutionDispatch, Role, RpcMethods, -}; +use sc_service::{BasePath, BlocksPruning, Configuration, Role, RpcMethods}; use sc_storage_monitor::{StorageMonitorParams, StorageMonitorService}; use sc_subspace_chain_specs::ConsensusChainSpec; use sp_core::crypto::Ss58AddressFormat; @@ -26,7 +24,7 @@ use subspace_core_primitives::BlockNumber; use subspace_networking::libp2p::identity::ed25519::Keypair; use subspace_networking::libp2p::Multiaddr; use subspace_networking::Node; -use subspace_runtime::{RuntimeApi, RuntimeGenesisConfig}; +use subspace_runtime::{ExecutorDispatch, RuntimeApi, RuntimeGenesisConfig}; use subspace_service::{FullClient, NewFull, SubspaceConfiguration, SubspaceNetworking}; use tokio::runtime::Handle; use tokio::time::MissedTickBehavior; @@ -181,24 +179,6 @@ impl ConsensusNode { } } -/// Executor dispatch for subspace runtime -pub(super) struct ExecutorDispatch; - -impl NativeExecutionDispatch for ExecutorDispatch { - type ExtendHostFunctions = ( - sp_consensus_subspace::consensus::HostFunctions, - sp_domains_fraud_proof::HostFunctions, - ); - - fn dispatch(method: &str, data: &[u8]) -> Option> { - subspace_runtime::api::dispatch(method, data) - } - - fn native_version() -> sc_executor::NativeVersion { - subspace_runtime::native_version() - } -} - pub(super) fn load_chain_specification(chain_spec: &'static [u8]) -> Result { ConsensusChainSpec::from_json_bytes(chain_spec).map(ChainSpec) }