From 10783e75176f1e2e0c9f2b4bdaee118078658cba Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Mon, 27 Feb 2023 13:08:41 +0200 Subject: [PATCH] Remove storage monitor for now, it doesn't work on Windows --- crates/subspace-node/Cargo.toml | 3 ++- crates/subspace-node/src/bin/subspace-node.rs | 23 +++++++++++-------- crates/subspace-node/src/lib.rs | 11 +++++---- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/crates/subspace-node/Cargo.toml b/crates/subspace-node/Cargo.toml index 145423f694e..c6b29ba31ba 100644 --- a/crates/subspace-node/Cargo.toml +++ b/crates/subspace-node/Cargo.toml @@ -43,7 +43,8 @@ sc-consensus-subspace = { version = "0.1.0", path = "../sc-consensus-subspace" } sc-subspace-chain-specs = { version = "0.1.0", path = "../sc-subspace-chain-specs" } sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "50fdd4fd3853b15c019fc96a0eb7dbffe1ff042c" } sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/substrate", rev = "50fdd4fd3853b15c019fc96a0eb7dbffe1ff042c", default-features = false } -sc-storage-monitor = { version = "0.1.0", git = "https://github.com/subspace/substrate", rev = "50fdd4fd3853b15c019fc96a0eb7dbffe1ff042c", default-features = false } +# TODO: Unlock once https://github.com/paritytech/substrate/pull/13466 is in our fork +#sc-storage-monitor = { version = "0.1.0", git = "https://github.com/subspace/substrate", rev = "50fdd4fd3853b15c019fc96a0eb7dbffe1ff042c", default-features = false } sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "50fdd4fd3853b15c019fc96a0eb7dbffe1ff042c" } sc-tracing = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "50fdd4fd3853b15c019fc96a0eb7dbffe1ff042c" } sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "50fdd4fd3853b15c019fc96a0eb7dbffe1ff042c" } diff --git a/crates/subspace-node/src/bin/subspace-node.rs b/crates/subspace-node/src/bin/subspace-node.rs index 8f0bc21c58b..e58700a572d 100644 --- a/crates/subspace-node/src/bin/subspace-node.rs +++ b/crates/subspace-node/src/bin/subspace-node.rs @@ -24,7 +24,8 @@ use sc_cli::{ChainSpec, CliConfiguration, SubstrateCli}; use sc_consensus_slots::SlotProportion; use sc_executor::NativeExecutionDispatch; use sc_service::PartialComponents; -use sc_storage_monitor::StorageMonitorService; +// TODO: Unlock once https://github.com/paritytech/substrate/pull/13466 is in our fork +// use sc_storage_monitor::StorageMonitorService; use sc_subspace_chain_specs::ExecutionChainSpec; use sc_utils::mpsc::tracing_unbounded; use sp_core::crypto::Ss58AddressFormat; @@ -362,7 +363,8 @@ fn main() -> Result<(), Error> { set_default_ss58_version(&runner.config().chain_spec); runner.run_node_until_exit(|primary_chain_config| async move { let tokio_handle = primary_chain_config.tokio_handle.clone(); - let database_source = primary_chain_config.database.clone(); + // TODO: Unlock once https://github.com/paritytech/substrate/pull/13466 is in our fork + // let database_source = primary_chain_config.database.clone(); let maybe_system_domain_chain_spec = primary_chain_config .chain_spec @@ -477,14 +479,15 @@ fn main() -> Result<(), Error> { })? }; - StorageMonitorService::try_spawn( - cli.storage_monitor, - database_source, - &primary_chain_node.task_manager.spawn_essential_handle(), - ) - .map_err(|error| { - sc_service::Error::Other(format!("Failed to start storage monitor: {error:?}")) - })?; + // TODO: Unlock once https://github.com/paritytech/substrate/pull/13466 is in our fork + // StorageMonitorService::try_spawn( + // cli.storage_monitor, + // database_source, + // &primary_chain_node.task_manager.spawn_essential_handle(), + // ) + // .map_err(|error| { + // sc_service::Error::Other(format!("Failed to start storage monitor: {error:?}")) + // })?; // Run an executor node, an optional component of Subspace full node. if !cli.domain_args.is_empty() { diff --git a/crates/subspace-node/src/lib.rs b/crates/subspace-node/src/lib.rs index 36453ad486a..9086667c23a 100644 --- a/crates/subspace-node/src/lib.rs +++ b/crates/subspace-node/src/lib.rs @@ -29,7 +29,8 @@ use clap::Parser; use sc_cli::{RunCmd, SubstrateCli}; use sc_executor::{NativeExecutionDispatch, RuntimeVersion}; use sc_service::ChainSpec; -use sc_storage_monitor::StorageMonitorParams; +// TODO: Unlock once https://github.com/paritytech/substrate/pull/13466 is in our fork +// use sc_storage_monitor::StorageMonitorParams; use sc_subspace_chain_specs::ConsensusChainSpec; use sc_telemetry::serde_json; use serde_json::Value; @@ -222,10 +223,10 @@ pub struct Cli { /// subspace-node [primarychain-args] -- [system-domain-args] -- [core-domain-args] #[arg(raw = true)] pub domain_args: Vec, - - /// Parameters used to create the storage monitor. - #[clap(flatten)] - pub storage_monitor: StorageMonitorParams, + // TODO: Unlock once https://github.com/paritytech/substrate/pull/13466 is in our fork + // /// Parameters used to create the storage monitor. + // #[clap(flatten)] + // pub storage_monitor: StorageMonitorParams, } impl SubstrateCli for Cli {