Skip to content

Commit 0558c42

Browse files
committed
Stop using NativeExecutionDispatch
1 parent 0c368be commit 0558c42

File tree

27 files changed

+172
-380
lines changed

27 files changed

+172
-380
lines changed

Cargo.lock

Lines changed: 4 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/sp-domains-fraud-proof/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ rand = { version = "0.8.5", features = ["min_const_gen"] }
5555
rlp = "0.5.2"
5656
sp-core = { version = "21.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
5757
sc-cli = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false }
58-
sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false }
5958
sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false }
6059
subspace-test-client = { version = "0.1.0", path = "../../test/subspace-test-client" }
6160
subspace-test-service = { version = "0.1.0", path = "../../test/subspace-test-service" }

crates/subspace-malicious-operator/src/bin/subspace-malicious-operator.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use subspace_malicious_operator::malicious_domain_instance_starter::DomainInstan
3333
use subspace_malicious_operator::{Cli, DomainCli};
3434
use subspace_networking::libp2p::Multiaddr;
3535
use subspace_proof_of_space::chia::ChiaTable;
36-
use subspace_runtime::{Block, ExecutorDispatch, RuntimeApi};
36+
use subspace_runtime::{Block, RuntimeApi};
3737
use subspace_service::config::{SubspaceConfiguration, SubspaceNetworking};
3838
use subspace_service::dsn::DsnConfig;
3939

@@ -210,18 +210,17 @@ fn main() -> Result<(), Error> {
210210
timekeeper_cpu_cores: Default::default(),
211211
};
212212

213-
let partial_components = subspace_service::new_partial::<
214-
PosTable,
215-
RuntimeApi,
216-
ExecutorDispatch,
217-
>(&consensus_chain_config, &pot_external_entropy)
213+
let partial_components = subspace_service::new_partial::<PosTable, RuntimeApi>(
214+
&consensus_chain_config,
215+
&pot_external_entropy,
216+
)
218217
.map_err(|error| {
219218
sc_service::Error::Other(format!("Failed to build a full subspace node: {error:?}"))
220219
})?;
221220

222221
let keystore = partial_components.keystore_container.keystore();
223222

224-
let consensus_chain_node = subspace_service::new_full::<PosTable, _, _>(
223+
let consensus_chain_node = subspace_service::new_full::<PosTable, _>(
225224
consensus_chain_config,
226225
partial_components,
227226
true,

crates/subspace-malicious-operator/src/malicious_domain_instance_starter.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use domain_eth_service::provider::EthProvider;
66
use domain_eth_service::DefaultEthConfig;
77
use domain_runtime_primitives::opaque::Block as DomainBlock;
88
use domain_service::{FullBackend, FullClient};
9-
use evm_domain_runtime::{AccountId as AccountId20, ExecutorDispatch as EVMDomainExecutorDispatch};
9+
use evm_domain_runtime::AccountId as AccountId20;
1010
use futures::StreamExt;
1111
use sc_cli::CliConfiguration;
1212
use sc_consensus_subspace::block_import::BlockImportingNotification;
@@ -20,7 +20,7 @@ use sp_domains::{DomainInstanceData, RuntimeType};
2020
use sp_keystore::KeystorePtr;
2121
use std::path::PathBuf;
2222
use std::sync::Arc;
23-
use subspace_runtime::{ExecutorDispatch as CExecutorDispatch, RuntimeApi as CRuntimeApi};
23+
use subspace_runtime::RuntimeApi as CRuntimeApi;
2424
use subspace_runtime_primitives::opaque::Block as CBlock;
2525
use subspace_service::FullClient as CFullClient;
2626

@@ -30,7 +30,7 @@ pub struct DomainInstanceStarter<CNetwork> {
3030
pub domain_cli: DomainCli,
3131
pub base_path: PathBuf,
3232
pub tokio_handle: tokio::runtime::Handle,
33-
pub consensus_client: Arc<CFullClient<CRuntimeApi, CExecutorDispatch>>,
33+
pub consensus_client: Arc<CFullClient<CRuntimeApi>>,
3434
pub consensus_keystore: KeystorePtr,
3535
pub consensus_offchain_tx_pool_factory: OffchainTransactionPoolFactory<CBlock>,
3636
pub block_importing_notification_stream:
@@ -130,11 +130,7 @@ where
130130
EthProvider::<
131131
evm_domain_runtime::TransactionConverter,
132132
DefaultEthConfig<
133-
FullClient<
134-
DomainBlock,
135-
evm_domain_runtime::RuntimeApi,
136-
EVMDomainExecutorDispatch,
137-
>,
133+
FullClient<DomainBlock, evm_domain_runtime::RuntimeApi>,
138134
FullBackend<DomainBlock>,
139135
>,
140136
>::new(Some(&evm_base_path), domain_cli.additional_args());
@@ -164,7 +160,6 @@ where
164160
_,
165161
_,
166162
evm_domain_runtime::RuntimeApi,
167-
EVMDomainExecutorDispatch,
168163
AccountId20,
169164
_,
170165
_,

crates/subspace-node/Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ sc-cli = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-s
4444
sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
4545
sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
4646
sc-consensus-subspace = { version = "0.1.0", path = "../sc-consensus-subspace" }
47-
sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
4847
sc-informant = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
4948
sc-keystore = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
5049
sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
@@ -62,11 +61,9 @@ sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk"
6261
sp-domains = { version = "0.1.0", path = "../sp-domains" }
6362
sp-domain-digests = { version = "0.1.0", path = "../../domains/primitives/digests" }
6463
sp-domains-fraud-proof = { version = "0.1.0", path = "../sp-domains-fraud-proof" }
65-
sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
6664
sp-keystore = { version = "0.27.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
6765
sp-messenger = { version = "0.1.0", path = "../../domains/primitives/messenger" }
6866
sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
69-
sp-wasm-interface = { version = "14.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
7067
subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" }
7168
subspace-networking = { version = "0.1.0", path = "../subspace-networking" }
7269
subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-space" }
@@ -89,8 +86,10 @@ do-not-enforce-cost-of-storage = [
8986
"subspace-runtime/do-not-enforce-cost-of-storage"
9087
]
9188
runtime-benchmarks = [
89+
"domain-service/runtime-benchmarks",
90+
"evm-domain-runtime/runtime-benchmarks",
9291
"frame-benchmarking/runtime-benchmarks",
9392
"frame-benchmarking-cli/runtime-benchmarks",
9493
"subspace-runtime/runtime-benchmarks",
95-
"evm-domain-runtime/runtime-benchmarks",
94+
"subspace-service/runtime-benchmarks",
9695
]

crates/subspace-node/src/commands/run.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use sc_utils::mpsc::tracing_unbounded;
2323
use sp_core::traits::SpawnEssentialNamed;
2424
use sp_messenger::messages::ChainId;
2525
use std::env;
26-
use subspace_runtime::{Block, ExecutorDispatch, RuntimeApi};
26+
use subspace_runtime::{Block, RuntimeApi};
2727
use tracing::{debug, error, info, info_span, warn};
2828

2929
/// Options for running a node
@@ -117,18 +117,17 @@ pub async fn run(run_options: RunOptions) -> Result<(), Error> {
117117
let span = info_span!("Consensus");
118118
let _enter = span.enter();
119119

120-
let partial_components = subspace_service::new_partial::<
121-
PosTable,
122-
RuntimeApi,
123-
ExecutorDispatch,
124-
>(&subspace_configuration, &pot_external_entropy)
120+
let partial_components = subspace_service::new_partial::<PosTable, RuntimeApi>(
121+
&subspace_configuration,
122+
&pot_external_entropy,
123+
)
125124
.map_err(|error| {
126125
sc_service::Error::Other(format!(
127126
"Failed to build a full subspace node 1: {error:?}"
128127
))
129128
})?;
130129

131-
let full_node_fut = subspace_service::new_full::<PosTable, _, _>(
130+
let full_node_fut = subspace_service::new_full::<PosTable, _>(
132131
subspace_configuration,
133132
partial_components,
134133
true,

crates/subspace-node/src/commands/run/domain.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ use domain_service::config::{
1111
};
1212
use domain_service::{FullBackend, FullClient};
1313
use evm_domain_runtime::{
14-
AccountId as AccountId20, ExecutorDispatch as EVMDomainExecutorDispatch,
15-
RuntimeGenesisConfig as EvmRuntimeGenesisConfig,
14+
AccountId as AccountId20, RuntimeGenesisConfig as EvmRuntimeGenesisConfig,
1615
};
1716
use futures::StreamExt;
1817
use sc_chain_spec::{ChainType, Properties};
@@ -35,7 +34,7 @@ use sp_domains::{DomainId, DomainInstanceData, OperatorId, RuntimeType};
3534
use std::collections::HashMap;
3635
use std::net::SocketAddr;
3736
use std::sync::Arc;
38-
use subspace_runtime::{ExecutorDispatch as CExecutorDispatch, RuntimeApi as CRuntimeApi};
37+
use subspace_runtime::RuntimeApi as CRuntimeApi;
3938
use subspace_runtime_primitives::opaque::Block as CBlock;
4039
use subspace_service::FullClient as CFullClient;
4140
use tracing::warn;
@@ -367,7 +366,7 @@ pub(super) fn create_domain_configuration(
367366
}
368367

369368
pub(super) struct DomainStartOptions<CNetwork> {
370-
pub(super) consensus_client: Arc<CFullClient<CRuntimeApi, CExecutorDispatch>>,
369+
pub(super) consensus_client: Arc<CFullClient<CRuntimeApi>>,
371370
pub(super) consensus_offchain_tx_pool_factory: OffchainTransactionPoolFactory<CBlock>,
372371
pub(super) consensus_network: Arc<CNetwork>,
373372
pub(super) block_importing_notification_stream:
@@ -455,11 +454,7 @@ where
455454
let eth_provider = EthProvider::<
456455
evm_domain_runtime::TransactionConverter,
457456
DefaultEthConfig<
458-
FullClient<
459-
DomainBlock,
460-
evm_domain_runtime::RuntimeApi,
461-
EVMDomainExecutorDispatch,
462-
>,
457+
FullClient<DomainBlock, evm_domain_runtime::RuntimeApi>,
463458
FullBackend<DomainBlock>,
464459
>,
465460
>::new(
@@ -491,7 +486,6 @@ where
491486
_,
492487
_,
493488
evm_domain_runtime::RuntimeApi,
494-
EVMDomainExecutorDispatch,
495489
AccountId20,
496490
_,
497491
_,

0 commit comments

Comments
 (0)