Skip to content

Commit

Permalink
Remove storage monitor for now, it doesn't work on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc committed Feb 27, 2023
1 parent 165e946 commit 9cf171c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 17 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion crates/subspace-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
23 changes: 13 additions & 10 deletions crates/subspace-node/src/bin/subspace-node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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() {
Expand Down
11 changes: 6 additions & 5 deletions crates/subspace-node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -222,10 +223,10 @@ pub struct Cli {
/// subspace-node [primarychain-args] -- [system-domain-args] -- [core-domain-args]
#[arg(raw = true)]
pub domain_args: Vec<String>,

/// 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 {
Expand Down

0 comments on commit 9cf171c

Please sign in to comment.