From 5721baba30ca1e4614d40879a0f79e6b8c4335cd Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 13 Jan 2020 11:38:37 +0100 Subject: [PATCH 01/77] Expose a method that allows converting RunCmd to Configuration --- client/cli/src/lib.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 620a90c514d00..a105319c5d3c2 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -295,6 +295,26 @@ impl<'a, CC, RP> ParseAndPrepare<'a, CC, RP> where CC: GetSharedParams { } } +impl<'a, CC, RP> ParseAndPrepare<'a, CC, RP> { + /// Convert ParseAndPrepare to Configuration + pub fn into_configuration( + self, + spec_factory: S, + ) -> error::Result> + where + C: Default, + G: RuntimeGenesis, + E: ChainSpecExtension, + S: FnOnce(&str) -> Result>, String>, + { + match self { + ParseAndPrepare::Run(c) => + create_run_node_config(c.params.left, spec_factory, c.impl_name, c.version), + _ => todo!(), + } + } +} + /// Command ready to run the main client. pub struct ParseAndPrepareRun<'a, RP> { params: MergeParameters, From e53379180bccc76bf5f501cdc7952d3bd72d5b28 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 13 Jan 2020 14:32:45 +0100 Subject: [PATCH 02/77] WIP --- client/cli/src/lib.rs | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index a105319c5d3c2..cad1880ce4708 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -300,7 +300,7 @@ impl<'a, CC, RP> ParseAndPrepare<'a, CC, RP> { pub fn into_configuration( self, spec_factory: S, - ) -> error::Result> + ) -> Option>> where C: Default, G: RuntimeGenesis, @@ -309,8 +309,44 @@ impl<'a, CC, RP> ParseAndPrepare<'a, CC, RP> { { match self { ParseAndPrepare::Run(c) => - create_run_node_config(c.params.left, spec_factory, c.impl_name, c.version), - _ => todo!(), + Some(create_run_node_config( + c.params.left, + spec_factory, + c.impl_name, + c.version + )), + ParseAndPrepare::BuildSpec(_) => None, + ParseAndPrepare::ExportBlocks(c) => + Some(create_config_with_db_path( + spec_factory, + &c.params.shared_params, + c.version, + )), + ParseAndPrepare::ImportBlocks(c) => + Some(create_config_with_db_path( + spec_factory, + &c.params.shared_params, + c.version, + )), + ParseAndPrepare::CheckBlock(c) => + Some(create_config_with_db_path( + spec_factory, + &c.params.shared_params, + c.version, + )), + ParseAndPrepare::PurgeChain(c) => + Some(create_config_with_db_path( + spec_factory, + &c.params.shared_params, + c.version + )), + ParseAndPrepare::RevertChain(c) => + Some(create_config_with_db_path( + spec_factory, + &c.params.shared_params, + c.version, + )), + ParseAndPrepare::CustomCommand(_) => None, } } } From ecaeb7f5a13e1683f767c7d60c474159ff8e0673 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 13 Jan 2020 15:48:23 +0100 Subject: [PATCH 03/77] WIP --- client/cli/src/lib.rs | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index cad1880ce4708..9536c3d0e548f 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -1309,4 +1309,40 @@ mod tests { assert_eq!(expected_path, node_config.keystore.path().unwrap().to_owned()); } } + + #[test] + fn parse_and_prepare_into_configuration() { + let chain_spec = ChainSpec::from_genesis( + "test", + "test-id", + || (), + Vec::new(), + None, + None, + None, + None, + ); + let version = VersionInfo { + name: "test", + version: "42", + commit: "234234", + executable_name: "test", + description: "cool test", + author: "universe", + support_url: "com", + }; + let spec_factory = |_: &str| Ok(Some(chain_spec.clone())); + + let args = vec!["substrate", "--dev", "--state-cache-size=42"]; + let pnp = parse_and_prepare::(&version, "test", args); + let config = pnp.into_configuration::<(), _, _, _>(spec_factory).unwrap().unwrap(); + assert_eq!(config.roles, sc_service::Roles::AUTHORITY); + assert_eq!(config.state_cache_size, 42); + + let args = vec!["substrate", "import-blocks", "--dev"]; + let pnp = parse_and_prepare::(&version, "test", args); + let config = pnp.into_configuration::<(), _, _, _>(spec_factory).unwrap().unwrap(); + // NOTE: only RunCmd (no subcommand) knows --dev + assert_eq!(config.roles, sc_service::Roles::FULL); + } } From f6c249b413337bd9c4e54aa09b9a0acb179b3ddf Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 13 Jan 2020 16:38:21 +0100 Subject: [PATCH 04/77] WIP --- client/cli/src/lib.rs | 56 ++++++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 14 deletions(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 9536c3d0e548f..5027443977cf5 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -300,7 +300,7 @@ impl<'a, CC, RP> ParseAndPrepare<'a, CC, RP> { pub fn into_configuration( self, spec_factory: S, - ) -> Option>> + ) -> error::Result>> where C: Default, G: RuntimeGenesis, @@ -314,39 +314,47 @@ impl<'a, CC, RP> ParseAndPrepare<'a, CC, RP> { spec_factory, c.impl_name, c.version - )), - ParseAndPrepare::BuildSpec(_) => None, + )).transpose(), + ParseAndPrepare::BuildSpec(c) => { + let spec = load_spec(&c.params.shared_params, spec_factory)?; + + Some(create_build_spec_config( + &spec, + &c.params.shared_params, + c.version, + )).transpose() + }, ParseAndPrepare::ExportBlocks(c) => Some(create_config_with_db_path( spec_factory, &c.params.shared_params, c.version, - )), + )).transpose(), ParseAndPrepare::ImportBlocks(c) => Some(create_config_with_db_path( spec_factory, &c.params.shared_params, c.version, - )), + )).transpose(), ParseAndPrepare::CheckBlock(c) => Some(create_config_with_db_path( spec_factory, &c.params.shared_params, c.version, - )), + )).transpose(), ParseAndPrepare::PurgeChain(c) => Some(create_config_with_db_path( spec_factory, &c.params.shared_params, c.version - )), + )).transpose(), ParseAndPrepare::RevertChain(c) => Some(create_config_with_db_path( spec_factory, &c.params.shared_params, c.version, - )), - ParseAndPrepare::CustomCommand(_) => None, + )).transpose(), + ParseAndPrepare::CustomCommand(_) => Ok(None), } } } @@ -406,11 +414,11 @@ impl<'a> ParseAndPrepareBuildSpec<'a> { let mut spec = load_spec(&self.params.shared_params, spec_factory)?; if spec.boot_nodes().is_empty() && !self.params.disable_default_bootnode { - let base_path = base_path(&self.params.shared_params, self.version); - let cfg = sc_service::Configuration::::default_with_spec_and_base_path( - spec.clone(), - Some(base_path), - ); + let cfg = create_build_spec_config::( + &spec, + &self.params.shared_params, + self.version, + )?; let node_key = node_key_config( self.params.node_key_params, &Some(cfg.in_chain_config_dir(DEFAULT_NETWORK_CONFIG_PATH).expect("We provided a base_path")) @@ -1062,6 +1070,26 @@ where Ok(config) } +/// Creates a configuration including the base path and the shared params +fn create_build_spec_config( + spec: &ChainSpec, + cli: &SharedParams, + version: &VersionInfo, +) -> error::Result> +where + C: Default, + G: RuntimeGenesis, + E: ChainSpecExtension, +{ + let base_path = base_path(&cli, version); + let cfg = sc_service::Configuration::::default_with_spec_and_base_path( + spec.clone(), + Some(base_path), + ); + + Ok(cfg) +} + /// Internal trait used to cast to a dynamic type that implements Read and Seek. trait ReadPlusSeek: Read + Seek {} From 940575661e7296ed0c518c93be0ab1d7688bd5f6 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 15 Jan 2020 10:23:25 +0100 Subject: [PATCH 05/77] WIP --- bin/node/cli/build.rs | 4 +- bin/node/cli/src/cli.rs | 85 +++++++++++++-------- client/cli/src/lib.rs | 49 +++++------- client/cli/src/params.rs | 123 +----------------------------- primitives/keyring/src/sr25519.rs | 17 +++++ 5 files changed, 95 insertions(+), 183 deletions(-) diff --git a/bin/node/cli/build.rs b/bin/node/cli/build.rs index 9e18fc669934d..1efeff0c83cb9 100644 --- a/bin/node/cli/build.rs +++ b/bin/node/cli/build.rs @@ -16,7 +16,7 @@ use std::{fs, env, path::Path}; use structopt::{StructOpt, clap::Shell}; -use sc_cli::{NoCustom, CoreParams}; +use sc_cli::CoreParams; use vergen::{ConstantsFlags, generate_cargo_keys}; fn main() { @@ -48,5 +48,5 @@ fn build_completion(shell: &Shell) { fs::create_dir(&path).ok(); - CoreParams::::clap().gen_completions("substrate-node", *shell, &path); + CoreParams::clap().gen_completions("substrate-node", *shell, &path); } diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs index 8fb95bed687bb..87c8d244dba4f 100644 --- a/bin/node/cli/src/cli.rs +++ b/bin/node/cli/src/cli.rs @@ -21,7 +21,7 @@ use sc_cli::{IntoExit, NoCustom, SharedParams, ImportParams, error}; use sc_service::{AbstractService, Roles as ServiceRoles, Configuration}; use log::info; use structopt::StructOpt; -use sc_cli::{display_role, parse_and_prepare, GetSharedParams, ParseAndPrepare}; +use sc_cli::{display_role, parse_and_prepare, GetSharedParams, ParseAndPrepare, CoreParams}; use crate::{service, ChainSpec, load_spec}; use crate::factory_impl::FactoryState; use node_transaction_factory::RuntimeAdapter; @@ -38,6 +38,12 @@ pub enum CustomSubcommands { Factory(FactoryCmd), } +#[derive(Clone, Debug, StructOpt)] +struct Cli { + #[structopt(subcommand)] + custom_subcommands: Option, +} + impl GetSharedParams for CustomSubcommands { fn shared_params(&self) -> Option<&SharedParams> { match self { @@ -96,9 +102,52 @@ pub fn run(args: I, exit: E, version: sc_cli::VersionInfo) -> error::Re { type Config = Configuration<(), A, B>; - match parse_and_prepare::(&version, "substrate-node", args) { + let clap = Cli::clap(); + let core_clap = CoreParams::clap(); + let clap = clap.subcommands(core_clap.p.subcommands); + let opt = clap.get_matches_from(args); + //let opt = Cli::from_iter(args); + panic!("{:?}", opt); + + panic!("boo"); + /* + CustomSubcommands::Factory(cli_args) => { + let mut config: Config<_, _> = sc_cli::create_config_with_db_path( + load_spec, + &cli_args.shared_params, + &version, + )?; + + sc_cli::fill_import_params(&mut config, &cli_args.import_params, ServiceRoles::FULL)?; + + match ChainSpec::from(config.chain_spec.id()) { + Some(ref c) if c == &ChainSpec::Development || c == &ChainSpec::LocalTestnet => {}, + _ => panic!("Factory is only supported for development and local testnet."), + } + + let factory_state = FactoryState::new( + cli_args.mode.clone(), + cli_args.num, + cli_args.rounds, + ); + + let service_builder = new_full_start!(config).0; + node_transaction_factory::factory::, _, _, _, _, _>( + factory_state, + service_builder.client(), + service_builder.select_chain() + .expect("The select_chain is always initialized by new_full_start!; QED") + ).map_err(|e| format!("Error in transaction factory: {}", e))?; + + Ok(()) + }, + */ + + panic!("boo"); + + match parse_and_prepare(&version, "substrate-node", args) { ParseAndPrepare::Run(cmd) => cmd.run(load_spec, exit, - |exit, _cli_args, _custom_args, config: Config<_, _>| { + |exit, _cli_args, config: Config<_, _>| { info!("{}", version.name); info!(" version {}", config.full_version()); info!(" by Parity Technologies, 2017-2019"); @@ -130,36 +179,6 @@ pub fn run(args: I, exit: E, version: sc_cli::VersionInfo) -> error::Re ParseAndPrepare::PurgeChain(cmd) => cmd.run(load_spec), ParseAndPrepare::RevertChain(cmd) => cmd.run_with_builder(|config: Config<_, _>| Ok(new_full_start!(config).0), load_spec), - ParseAndPrepare::CustomCommand(CustomSubcommands::Factory(cli_args)) => { - let mut config: Config<_, _> = sc_cli::create_config_with_db_path( - load_spec, - &cli_args.shared_params, - &version, - )?; - - sc_cli::fill_import_params(&mut config, &cli_args.import_params, ServiceRoles::FULL)?; - - match ChainSpec::from(config.chain_spec.id()) { - Some(ref c) if c == &ChainSpec::Development || c == &ChainSpec::LocalTestnet => {}, - _ => panic!("Factory is only supported for development and local testnet."), - } - - let factory_state = FactoryState::new( - cli_args.mode.clone(), - cli_args.num, - cli_args.rounds, - ); - - let service_builder = new_full_start!(config).0; - node_transaction_factory::factory::, _, _, _, _, _>( - factory_state, - service_builder.client(), - service_builder.select_chain() - .expect("The select_chain is always initialized by new_full_start!; QED") - ).map_err(|e| format!("Error in transaction factory: {}", e))?; - - Ok(()) - } } } diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 5027443977cf5..14b0f3a9510c9 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -53,7 +53,7 @@ use structopt::{StructOpt, StructOptInternal, clap::AppSettings}; pub use structopt::clap::App; use params::{ RunCmd, PurgeChainCmd, RevertCmd, ImportBlocksCmd, ExportBlocksCmd, BuildSpecCmd, - NetworkConfigurationParams, MergeParameters, TransactionPoolParams, + NetworkConfigurationParams, TransactionPoolParams, NodeKeyParams, NodeKeyType, Cors, CheckBlockCmd, }; pub use params::{NoCustom, CoreParams, SharedParams, ImportParams, ExecutionStrategy}; @@ -190,14 +190,12 @@ fn is_node_name_valid(_name: &str) -> Result<(), &str> { /// `RP` are custom parameters for the run command. This needs to be a `struct`! The custom /// parameters are visible to the user as if they were normal run command parameters. If no custom /// parameters are required, `NoCustom` can be used as type here. -pub fn parse_and_prepare<'a, CC, RP, I>( +pub fn parse_and_prepare<'a, I>( version: &'a VersionInfo, impl_name: &'static str, args: I, -) -> ParseAndPrepare<'a, CC, RP> +) -> ParseAndPrepare<'a> where - CC: StructOpt + Clone + GetSharedParams, - RP: StructOpt + Clone + StructOptInternal, I: IntoIterator, ::Item: Into + Clone, { @@ -207,7 +205,7 @@ where ); sp_panic_handler::set(version.support_url, &full_version); - let matches = CoreParams::::clap() + let matches = CoreParams::clap() .name(version.executable_name) .author(version.author) .about(version.description) @@ -216,7 +214,7 @@ where .setting(AppSettings::ArgsNegateSubcommands) .setting(AppSettings::SubcommandsNegateReqs) .get_matches_from(args); - let cli_args = CoreParams::::from_clap(&matches); + let cli_args = CoreParams::from_clap(&matches); fdlimit::raise_fd_limit(); let args = match cli_args { @@ -241,7 +239,6 @@ where params::CoreParams::Revert(params) => ParseAndPrepare::RevertChain( ParseAndPrepareRevert { params, version } ), - params::CoreParams::Custom(params) => ParseAndPrepare::CustomCommand(params), }; init_logger(args.shared_params().and_then(|p| p.log.as_ref()).map(|v| v.as_ref()).unwrap_or("")); args @@ -260,9 +257,9 @@ pub fn display_role(config: &Configuration) -> String { /// Output of calling `parse_and_prepare`. #[must_use] -pub enum ParseAndPrepare<'a, CC, RP> { +pub enum ParseAndPrepare<'a> { /// Command ready to run the main client. - Run(ParseAndPrepareRun<'a, RP>), + Run(ParseAndPrepareRun<'a>), /// Command ready to build chain specs. BuildSpec(ParseAndPrepareBuildSpec<'a>), /// Command ready to export the chain. @@ -275,27 +272,24 @@ pub enum ParseAndPrepare<'a, CC, RP> { PurgeChain(ParseAndPreparePurge<'a>), /// Command ready to revert the chain. RevertChain(ParseAndPrepareRevert<'a>), - /// An additional custom command passed to `parse_and_prepare`. - CustomCommand(CC), } -impl<'a, CC, RP> ParseAndPrepare<'a, CC, RP> where CC: GetSharedParams { +impl<'a> ParseAndPrepare<'a> { /// Return common set of parameters shared by all commands. pub fn shared_params(&self) -> Option<&SharedParams> { match self { - ParseAndPrepare::Run(c) => Some(&c.params.left.shared_params), + ParseAndPrepare::Run(c) => Some(&c.params.shared_params), ParseAndPrepare::BuildSpec(c) => Some(&c.params.shared_params), ParseAndPrepare::ExportBlocks(c) => Some(&c.params.shared_params), ParseAndPrepare::ImportBlocks(c) => Some(&c.params.shared_params), ParseAndPrepare::CheckBlock(c) => Some(&c.params.shared_params), ParseAndPrepare::PurgeChain(c) => Some(&c.params.shared_params), ParseAndPrepare::RevertChain(c) => Some(&c.params.shared_params), - ParseAndPrepare::CustomCommand(c) => c.shared_params(), } } } -impl<'a, CC, RP> ParseAndPrepare<'a, CC, RP> { +impl<'a> ParseAndPrepare<'a> { /// Convert ParseAndPrepare to Configuration pub fn into_configuration( self, @@ -310,7 +304,7 @@ impl<'a, CC, RP> ParseAndPrepare<'a, CC, RP> { match self { ParseAndPrepare::Run(c) => Some(create_run_node_config( - c.params.left, + c.params, spec_factory, c.impl_name, c.version @@ -354,19 +348,18 @@ impl<'a, CC, RP> ParseAndPrepare<'a, CC, RP> { &c.params.shared_params, c.version, )).transpose(), - ParseAndPrepare::CustomCommand(_) => Ok(None), } } } /// Command ready to run the main client. -pub struct ParseAndPrepareRun<'a, RP> { - params: MergeParameters, +pub struct ParseAndPrepareRun<'a> { + params: RunCmd, impl_name: &'static str, version: &'a VersionInfo, } -impl<'a, RP> ParseAndPrepareRun<'a, RP> { +impl<'a> ParseAndPrepareRun<'a> { /// Runs the command and runs the main client. pub fn run( self, @@ -377,18 +370,17 @@ impl<'a, RP> ParseAndPrepareRun<'a, RP> { where S: FnOnce(&str) -> Result>, String>, E: Into, - RP: StructOpt + Clone, C: Default, G: RuntimeGenesis, CE: ChainSpecExtension, Exit: IntoExit, - RS: FnOnce(Exit, RunCmd, RP, Configuration) -> Result<(), E> + RS: FnOnce(Exit, RunCmd, Configuration) -> Result<(), E> { let config = create_run_node_config( - self.params.left.clone(), spec_factory, self.impl_name, self.version, + self.params.clone(), spec_factory, self.impl_name, self.version, )?; - run_service(exit, self.params.left, self.params.right, config).map_err(Into::into) + run_service(exit, self.params, config).map_err(Into::into) } } @@ -1361,16 +1353,15 @@ mod tests { }; let spec_factory = |_: &str| Ok(Some(chain_spec.clone())); - let args = vec!["substrate", "--dev", "--state-cache-size=42"]; - let pnp = parse_and_prepare::(&version, "test", args); + let args = vec!["substrate", "run", "--dev", "--state-cache-size=42"]; + let pnp = parse_and_prepare(&version, "test", args); let config = pnp.into_configuration::<(), _, _, _>(spec_factory).unwrap().unwrap(); assert_eq!(config.roles, sc_service::Roles::AUTHORITY); assert_eq!(config.state_cache_size, 42); let args = vec!["substrate", "import-blocks", "--dev"]; - let pnp = parse_and_prepare::(&version, "test", args); + let pnp = parse_and_prepare(&version, "test", args); let config = pnp.into_configuration::<(), _, _, _>(spec_factory).unwrap().unwrap(); - // NOTE: only RunCmd (no subcommand) knows --dev assert_eq!(config.roles, sc_service::Roles::FULL); } } diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 07fbe9b73885c..327f47c850afd 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -613,39 +613,11 @@ lazy_static::lazy_static! { } /// Wrapper for exposing the keyring test accounts into the Cli. -#[derive(Debug, Clone)] +#[derive(Debug, Clone, StructOpt)] pub struct Keyring { pub account: Option, } -impl StructOpt for Keyring { - fn clap<'a, 'b>() -> App<'a, 'b> { - unimplemented!("Should not be called for `TestAccounts`.") - } - - fn from_clap(m: &structopt::clap::ArgMatches) -> Self { - Keyring { - account: TEST_ACCOUNTS_CLI_VALUES.iter().find(|a| m.is_present(&a.name)).map(|a| a.variant), - } - } -} - -impl StructOptInternal for Keyring { - fn augment_clap<'a, 'b>(app: App<'a, 'b>) -> App<'a, 'b> { - TEST_ACCOUNTS_CLI_VALUES.iter().fold(app, |app, a| { - let conflicts_with_strs = a.conflicts_with.iter().map(|s| s.as_str()).collect::>(); - - app.arg( - Arg::with_name(&a.name) - .long(&a.name) - .help(&a.help) - .conflicts_with_all(&conflicts_with_strs) - .takes_value(false) - ) - }) - } -} - /// Default to verbosity level 0, if none is provided. fn parse_telemetry_endpoints(s: &str) -> Result<(String, u8), Box> { let pos = s.find(' '); @@ -858,10 +830,10 @@ pub struct PurgeChainCmd { /// The core commands are split into multiple subcommands and `Run` is the default subcommand. From /// the CLI user perspective, it is not visible that `Run` is a subcommand. So, all parameters of /// `Run` are exported as main executable parameters. -#[derive(Debug, Clone)] -pub enum CoreParams { +#[derive(Debug, Clone, StructOpt)] +pub enum CoreParams { /// Run a node. - Run(MergeParameters), + Run(RunCmd), /// Build a spec.json file, outputing to stdout. BuildSpec(BuildSpecCmd), @@ -880,65 +852,6 @@ pub enum CoreParams { /// Remove the whole chain data. PurgeChain(PurgeChainCmd), - - /// Further custom subcommands. - Custom(CC), -} - -impl StructOpt for CoreParams where - CC: StructOpt + GetSharedParams, - RP: StructOpt + StructOptInternal, -{ - fn clap<'a, 'b>() -> App<'a, 'b> { - RP::augment_clap( - RunCmd::augment_clap( - CC::clap().unset_setting(AppSettings::SubcommandRequiredElseHelp) - ) - ).subcommand( - BuildSpecCmd::augment_clap(SubCommand::with_name("build-spec")) - .about("Build a spec.json file, outputting to stdout.") - ) - .subcommand( - ExportBlocksCmd::augment_clap(SubCommand::with_name("export-blocks")) - .about("Export blocks to a file. This file can only be re-imported \ - if it is in binary format (not JSON!)." - ) - ) - .subcommand( - ImportBlocksCmd::augment_clap(SubCommand::with_name("import-blocks")) - .about("Import blocks from file.") - ) - .subcommand( - CheckBlockCmd::augment_clap(SubCommand::with_name("check-block")) - .about("Re-validate a known block.") - ) - .subcommand( - RevertCmd::augment_clap(SubCommand::with_name("revert")) - .about("Revert chain to the previous state.") - ) - .subcommand( - PurgeChainCmd::augment_clap(SubCommand::with_name("purge-chain")) - .about("Remove the whole chain data.") - ) - } - - fn from_clap(matches: &::structopt::clap::ArgMatches) -> Self { - match matches.subcommand() { - ("build-spec", Some(matches)) => - CoreParams::BuildSpec(BuildSpecCmd::from_clap(matches)), - ("export-blocks", Some(matches)) => - CoreParams::ExportBlocks(ExportBlocksCmd::from_clap(matches)), - ("import-blocks", Some(matches)) => - CoreParams::ImportBlocks(ImportBlocksCmd::from_clap(matches)), - ("check-block", Some(matches)) => - CoreParams::CheckBlock(CheckBlockCmd::from_clap(matches)), - ("revert", Some(matches)) => CoreParams::Revert(RevertCmd::from_clap(matches)), - ("purge-chain", Some(matches)) => - CoreParams::PurgeChain(PurgeChainCmd::from_clap(matches)), - (_, None) => CoreParams::Run(MergeParameters::from_clap(matches)), - _ => CoreParams::Custom(CC::from_clap(matches)), - } - } } /// A special commandline parameter that expands to nothing. @@ -956,36 +869,8 @@ impl StructOpt for NoCustom { } } -impl StructOptInternal for NoCustom { - fn augment_clap<'a, 'b>(app: App<'a, 'b>) -> App<'a, 'b> { - app - } -} - impl GetSharedParams for NoCustom { fn shared_params(&self) -> Option<&SharedParams> { None } } - -/// Merge all CLI parameters of `L` and `R` into the same level. -#[derive(Clone, Debug)] -pub struct MergeParameters { - /// The left side parameters. - pub left: L, - /// The right side parameters. - pub right: R, -} - -impl StructOpt for MergeParameters where L: StructOpt + StructOptInternal, R: StructOpt { - fn clap<'a, 'b>() -> App<'a, 'b> { - L::augment_clap(R::clap()) - } - - fn from_clap(matches: &::structopt::clap::ArgMatches) -> Self { - MergeParameters { - left: L::from_clap(matches), - right: R::from_clap(matches), - } - } -} diff --git a/primitives/keyring/src/sr25519.rs b/primitives/keyring/src/sr25519.rs index 27627a0c50d7e..dbc22bac97b5d 100644 --- a/primitives/keyring/src/sr25519.rs +++ b/primitives/keyring/src/sr25519.rs @@ -113,6 +113,23 @@ impl From for sp_runtime::MultiSigner { } } +#[derive(Debug)] +pub struct ParseKeyringError; + +impl std::fmt::Display for ParseKeyringError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "ParseKeyringError") + } +} + +impl std::str::FromStr for Keyring { + type Err = ParseKeyringError; + + fn from_str(_: &str) -> Result::Err> { + todo!(); + } +} + lazy_static! { static ref PRIVATE_KEYS: HashMap = { Keyring::iter().map(|i| (i, i.pair())).collect() From 99159d28e06cd3d214296a633d10e7309245b599 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 20 Jan 2020 12:15:10 +0100 Subject: [PATCH 06/77] WIP --- Cargo.lock | 100 ++++++-- bin/node-template/Cargo.toml | 1 - bin/node-template/src/cli.rs | 108 +-------- bin/node/cli/Cargo.toml | 6 +- bin/node/cli/bin/main.rs | 23 +- bin/node/cli/src/cli.rs | 118 +-------- bin/utils/chain-spec-builder/Cargo.toml | 2 +- client/cli/Cargo.toml | 5 +- client/cli/src/lib.rs | 308 ++++++++++++++++-------- client/cli/src/params.rs | 18 +- 10 files changed, 331 insertions(+), 358 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d649721e431fd..1317241728143 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -523,7 +523,7 @@ dependencies = [ "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "sc-keystore 2.0.0", "sp-core 2.0.0", - "structopt 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1726,7 +1726,7 @@ dependencies = [ "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1770,7 +1770,7 @@ dependencies = [ "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1984,7 +1984,7 @@ dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "pin-project 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2926,6 +2926,17 @@ dependencies = [ "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "mio-named-pipes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "mio-uds" version = "0.6.7" @@ -2947,6 +2958,15 @@ dependencies = [ "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "miow" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "more-asserts" version = "0.2.1" @@ -3022,7 +3042,6 @@ name = "node-cli" version = "2.0.0" dependencies = [ "browser-utils 2.0.0", - "ctrlc 3.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "frame-support 2.0.0", "frame-system 2.0.0", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3074,7 +3093,7 @@ dependencies = [ "sp-runtime 2.0.0", "sp-timestamp 2.0.0", "sp-transaction-pool 2.0.0", - "structopt 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-build-script-utils 2.0.0", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3216,7 +3235,6 @@ dependencies = [ name = "node-template" version = "2.0.0" dependencies = [ - "ctrlc 3.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5091,6 +5109,7 @@ dependencies = [ "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ctrlc 3.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5112,10 +5131,10 @@ dependencies = [ "sp-panic-handler 2.0.0", "sp-runtime 2.0.0", "sp-state-machine 2.0.0", - "structopt 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -6064,6 +6083,15 @@ name = "shlex" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "signal-hook-registry" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arc-swap 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "slab" version = "0.4.2" @@ -6134,6 +6162,17 @@ dependencies = [ "subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "socket2" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "soketto" version = "0.3.1" @@ -6763,16 +6802,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "structopt" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "structopt-derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "structopt-derive 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "structopt-derive" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -7208,13 +7248,25 @@ dependencies = [ [[package]] name = "tokio" -version = "0.2.4" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-named-pipes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", "pin-project-lite 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-macros 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7285,6 +7337,15 @@ dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tokio-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "tokio-reactor" version = "0.1.11" @@ -7426,7 +7487,7 @@ dependencies = [ "futures-sink 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "pin-project-lite 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -8500,8 +8561,10 @@ dependencies = [ "checksum miniz_oxide 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6f3f74f726ae935c3f514300cc6773a0c9492abc5e972d42ba0c0ebb88757625" "checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" "checksum mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" +"checksum mio-named-pipes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f5e374eff525ce1c5b7687c4cef63943e7686524a387933ad27ca7ec43779cb3" "checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +"checksum miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "396aa0f2003d7df8395cb93e09871561ccc3e785f0acb369170e8cc74ddf9226" "checksum more-asserts 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" "checksum multimap 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb04b9f127583ed176e163fb9ec6f3e793b87e21deedd5734a69386a18a0151" "checksum multistream-select 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f938ffe420493e77c8b6cbcc3f282283f68fc889c5dcbc8e51668d5f3a01ad94" @@ -8649,6 +8712,7 @@ dependencies = [ "checksum sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" "checksum shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" "checksum shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" +"checksum signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" "checksum slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1cc9c640a4adbfbcc11ffb95efe5aa7af7309e002adab54b185507dbf2377b99" "checksum slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ddc0d2aff1f8f325ef660d9a0eb6e6dcd20b30b3f581a5897f58bf42d061c37a" @@ -8657,6 +8721,7 @@ dependencies = [ "checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" "checksum smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ecf3b85f68e8abaa7555aa5abdb1153079387e60b718283d732f03897fcfc86" "checksum snow 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "afb767eee7d257ba202f0b9b08673bc13b22281632ef45267b19f13100accd2f" +"checksum socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85" "checksum soketto 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3caa0ad6b765419f21e4cfa490ec7514a9fae4af986adef168a69477ba528671" "checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" "checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" @@ -8666,8 +8731,8 @@ dependencies = [ "checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" "checksum string-interner 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd710eadff449a1531351b0e43eb81ea404336fa2f56c777427ab0e32a4cf183" "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" -"checksum structopt 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "884ae79d6aad1e738f4a70dff314203fd498490a63ebc4d03ea83323c40b7b72" -"checksum structopt-derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0a97f829a34a0a9d5b353a881025a23b8c9fd09d46be6045df6b22920dbd7a93" +"checksum structopt 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "df136b42d76b1fbea72e2ab3057343977b04b4a2e00836c3c7c0673829572713" +"checksum structopt-derive 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd50a87d2f7b8958055f3e73a963d78feaccca3836767a9069844e34b5b03c0a" "checksum strum 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6138f8f88a16d90134763314e3fc76fa3ed6a7db4725d6acf9a3ef95a3188d22" "checksum strum_macros 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0054a7df764039a6cd8592b9de84be4bec368ff081d203a7d5371cbfa8e65c81" "checksum substrate-bip39 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3be511be555a3633e71739a79e4ddff6a6aaa6579fa6114182a51d72c3eb93c5" @@ -8695,7 +8760,7 @@ dependencies = [ "checksum tiny-keccak 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2953ca5148619bc99695c1274cb54c5275bbb913c6adad87e72eaf8db9787f69" "checksum tinytemplate 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4574b75faccaacddb9b284faecdf0b544b80b6b294f3d062d325c5726a209c20" "checksum tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" -"checksum tokio 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bcced6bb623d4bff3739c176c415f13c418f426395c169c9c3cd9a492c715b16" +"checksum tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "ffa2fdcfa937b20cb3c822a635ceecd5fc1a27a6a474527e5516aa24b8c8820a" "checksum tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" "checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" "checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" @@ -8703,6 +8768,7 @@ dependencies = [ "checksum tokio-executor 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee9ceecf69145923834ea73f32ba40c790fd877b74a7817dd0b089f1eb9c7c8" "checksum tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "3fe6dc22b08d6993916647d108a1a7d15b9cd29c4f4496c62b92c45b5041b7af" "checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" +"checksum tokio-macros 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "50a61f268a3db2acee8dcab514efc813dc6dbe8a00e86076f935f94304b59a7a" "checksum tokio-reactor 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "6732fe6b53c8d11178dcb77ac6d9682af27fc6d4cb87789449152e5377377146" "checksum tokio-rustls 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1df2fa53ac211c136832f530ccb081af9af891af22d685a9493e232c7a359bc2" "checksum tokio-sync 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "d06554cce1ae4a50f42fba8023918afa931413aded705b560e29600ccf7c6d76" diff --git a/bin/node-template/Cargo.toml b/bin/node-template/Cargo.toml index aaaae647cf564..88daa09ede6e0 100644 --- a/bin/node-template/Cargo.toml +++ b/bin/node-template/Cargo.toml @@ -12,7 +12,6 @@ path = "src/main.rs" [dependencies] futures = "0.3.1" futures01 = { package = "futures", version = "0.1.29" } -ctrlc = { version = "3.1.3", features = ["termination"] } log = "0.4.8" tokio = "0.1.22" parking_lot = "0.9.0" diff --git a/bin/node-template/src/cli.rs b/bin/node-template/src/cli.rs index 16638c4af955d..909bbc8884905 100644 --- a/bin/node-template/src/cli.rs +++ b/bin/node-template/src/cli.rs @@ -3,56 +3,25 @@ use futures::{future::{select, Map}, FutureExt, TryFutureExt, channel::oneshot, use std::cell::RefCell; use tokio::runtime::Runtime; pub use sc_cli::{VersionInfo, IntoExit, error}; -use sc_cli::{display_role, informant, parse_and_prepare, ParseAndPrepare, NoCustom}; +use sc_cli::{display_role, informant, parse_and_prepare, ParseAndPrepare, NoCustom, CoreParams}; use sc_service::{AbstractService, Roles as ServiceRoles, Configuration}; use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair}; use crate::chain_spec; use log::info; /// Parse command line arguments into service configuration. -pub fn run(args: I, exit: E, version: VersionInfo) -> error::Result<()> where +pub fn run(args: I, version: VersionInfo) -> error::Result<()> where I: IntoIterator, T: Into + Clone, E: IntoExit, { + let opt = CoreParams::from_iter(args); + todo!(); + /* type Config = Configuration<(), T>; - match parse_and_prepare::(&version, "substrate-node", args) { - ParseAndPrepare::Run(cmd) => cmd.run(load_spec, exit, - |exit, _cli_args, _custom_args, config: Config<_>| { - info!("{}", version.name); - info!(" version {}", config.full_version()); - info!(" by {}, 2017, 2018", version.author); - info!("Chain specification: {}", config.chain_spec.name()); - info!("Node name: {}", config.name); - info!("Roles: {}", display_role(&config)); - let runtime = Runtime::new().map_err(|e| format!("{:?}", e))?; - match config.roles { - ServiceRoles::LIGHT => run_until_exit( - runtime, - service::new_light(config)?, - exit - ), - _ => run_until_exit( - runtime, - service::new_full(config)?, - exit - ), - } - }), - ParseAndPrepare::BuildSpec(cmd) => cmd.run::(load_spec), - ParseAndPrepare::ExportBlocks(cmd) => cmd.run_with_builder(|config: Config<_>| - Ok(new_full_start!(config).0), load_spec, exit), - ParseAndPrepare::ImportBlocks(cmd) => cmd.run_with_builder(|config: Config<_>| - Ok(new_full_start!(config).0), load_spec, exit), - ParseAndPrepare::CheckBlock(cmd) => cmd.run_with_builder(|config: Config<_>| - Ok(new_full_start!(config).0), load_spec, exit), - ParseAndPrepare::PurgeChain(cmd) => cmd.run(load_spec), - ParseAndPrepare::RevertChain(cmd) => cmd.run_with_builder(|config: Config<_>| - Ok(new_full_start!(config).0), load_spec), - ParseAndPrepare::CustomCommand(_) => Ok(()) - }?; Ok(()) + */ } fn load_spec(id: &str) -> Result, String> { @@ -61,68 +30,3 @@ fn load_spec(id: &str) -> Result, String> { None => None, }) } - -fn run_until_exit( - mut runtime: Runtime, - service: T, - e: E, -) -> error::Result<()> -where - T: AbstractService, - E: IntoExit, -{ - let (exit_send, exit) = oneshot::channel(); - - let informant = informant::build(&service); - - let future = select(exit, informant) - .map(|_| Ok(())) - .compat(); - - runtime.executor().spawn(future); - - // we eagerly drop the service so that the internal exit future is fired, - // but we need to keep holding a reference to the global telemetry guard - let _telemetry = service.telemetry(); - - let service_res = { - let exit = e.into_exit(); - let service = service - .map_err(|err| error::Error::Service(err)) - .compat(); - let select = select(service, exit) - .map(|_| Ok(())) - .compat(); - runtime.block_on(select) - }; - - let _ = exit_send.send(()); - - // TODO [andre]: timeout this future #1318 - - use futures01::Future; - - let _ = runtime.shutdown_on_idle().wait(); - - service_res -} - -// handles ctrl-c -pub struct Exit; -impl IntoExit for Exit { - type Exit = Map, fn(Result<(), oneshot::Canceled>) -> ()>; - fn into_exit(self) -> Self::Exit { - // can't use signal directly here because CtrlC takes only `Fn`. - let (exit_send, exit) = oneshot::channel(); - - let exit_send_cell = RefCell::new(Some(exit_send)); - ctrlc::set_handler(move || { - let exit_send = exit_send_cell.try_borrow_mut().expect("signal handler not reentrant; qed").take(); - if let Some(exit_send) = exit_send { - exit_send.send(()).expect("Error sending exit notification"); - } - }).expect("Error setting Ctrl-C handler"); - - exit.map(drop) - } -} diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml index 1f7c90bc3a6c5..a953a862186c8 100644 --- a/bin/node/cli/Cargo.toml +++ b/bin/node/cli/Cargo.toml @@ -31,7 +31,7 @@ hex-literal = "0.2.1" jsonrpc-core = "14.0.3" log = "0.4.8" rand = "0.7.2" -structopt = "=0.3.7" +structopt = "=0.3.8" # primitives sp-authority-discovery = { version = "2.0.0", path = "../../../primitives/authority-discovery" } @@ -83,7 +83,6 @@ node-executor = { version = "2.0.0", path = "../executor" } # CLI-specific dependencies tokio = { version = "0.1.22", optional = true } sc-cli = { version = "2.0.0", optional = true, path = "../../../client/cli" } -ctrlc = { version = "3.1.3", features = ["termination"], optional = true } node-transaction-factory = { version = "2.0.0", optional = true, path = "../transaction-factory" } # WASM-specific dependencies @@ -101,7 +100,7 @@ tempfile = "3.1.0" [build-dependencies] sc-cli = { version = "2.0.0", package = "sc-cli", path = "../../../client/cli" } build-script-utils = { version = "2.0.0", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" } -structopt = "=0.3.7" +structopt = "=0.3.8" vergen = "3.0.4" [features] @@ -115,7 +114,6 @@ cli = [ "sc-cli", "node-transaction-factory", "tokio", - "ctrlc", "sc-service/rocksdb", "node-executor/wasmi-errno", ] diff --git a/bin/node/cli/bin/main.rs b/bin/node/cli/bin/main.rs index c766f3945c99f..80cfbec95ad32 100644 --- a/bin/node/cli/bin/main.rs +++ b/bin/node/cli/bin/main.rs @@ -22,27 +22,6 @@ use futures::channel::oneshot; use futures::{future, FutureExt}; use sc_cli::VersionInfo; -use std::cell::RefCell; - -// handles ctrl-c -struct Exit; -impl sc_cli::IntoExit for Exit { - type Exit = future::Map, fn(Result<(), oneshot::Canceled>) -> ()>; - fn into_exit(self) -> Self::Exit { - // can't use signal directly here because CtrlC takes only `Fn`. - let (exit_send, exit) = oneshot::channel(); - - let exit_send_cell = RefCell::new(Some(exit_send)); - ctrlc::set_handler(move || { - if let Some(exit_send) = exit_send_cell.try_borrow_mut().expect("signal handler not reentrant; qed").take() { - exit_send.send(()).expect("Error sending exit notification"); - } - }).expect("Error setting Ctrl-C handler"); - - exit.map(|_| ()) - } -} - fn main() -> Result<(), sc_cli::error::Error> { let version = VersionInfo { name: "Substrate Node", @@ -54,5 +33,5 @@ fn main() -> Result<(), sc_cli::error::Error> { support_url: "https://github.com/paritytech/substrate/issues/new", }; - node_cli::run(std::env::args(), Exit, version) + node_cli::run(std::env::args(), version) } diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs index 87c8d244dba4f..2e6190e89f19d 100644 --- a/bin/node/cli/src/cli.rs +++ b/bin/node/cli/src/cli.rs @@ -21,14 +21,15 @@ use sc_cli::{IntoExit, NoCustom, SharedParams, ImportParams, error}; use sc_service::{AbstractService, Roles as ServiceRoles, Configuration}; use log::info; use structopt::StructOpt; -use sc_cli::{display_role, parse_and_prepare, GetSharedParams, ParseAndPrepare, CoreParams}; +use sc_cli::{display_role, parse_and_prepare, GetSharedParams, ParseAndPrepare, CoreParams, run}; use crate::{service, ChainSpec, load_spec}; use crate::factory_impl::FactoryState; use node_transaction_factory::RuntimeAdapter; -/// Custom subcommands. #[derive(Clone, Debug, StructOpt)] -pub enum CustomSubcommands { +enum Cli { + #[structopt(flatten)] + SubstrateCli(CoreParams), /// The custom factory subcommmand for manufacturing transactions. #[structopt( name = "factory", @@ -38,20 +39,6 @@ pub enum CustomSubcommands { Factory(FactoryCmd), } -#[derive(Clone, Debug, StructOpt)] -struct Cli { - #[structopt(subcommand)] - custom_subcommands: Option, -} - -impl GetSharedParams for CustomSubcommands { - fn shared_params(&self) -> Option<&SharedParams> { - match self { - CustomSubcommands::Factory(cmd) => Some(&cmd.shared_params), - } - } -} - /// The `factory` command used to generate transactions. /// Please note: this command currently only works on an empty database! #[derive(Debug, StructOpt, Clone)] @@ -95,23 +82,17 @@ pub struct FactoryCmd { } /// Parse command line arguments into service configuration. -pub fn run(args: I, exit: E, version: sc_cli::VersionInfo) -> error::Result<()> where +pub fn run(args: I, version: sc_cli::VersionInfo) -> error::Result<()> where I: IntoIterator, T: Into + Clone, E: IntoExit, { type Config = Configuration<(), A, B>; - let clap = Cli::clap(); - let core_clap = CoreParams::clap(); - let clap = clap.subcommands(core_clap.p.subcommands); - let opt = clap.get_matches_from(args); - //let opt = Cli::from_iter(args); - panic!("{:?}", opt); - - panic!("boo"); - /* - CustomSubcommands::Factory(cli_args) => { + let opt = Cli::from_iter(args); + match opt { + Cli::SubstrateCli(cli) => run(load_spect, &version), + Cli::Factory(cli_args) => { let mut config: Config<_, _> = sc_cli::create_config_with_db_path( load_spec, &cli_args.shared_params, @@ -141,87 +122,6 @@ pub fn run(args: I, exit: E, version: sc_cli::VersionInfo) -> error::Re Ok(()) }, - */ - - panic!("boo"); - - match parse_and_prepare(&version, "substrate-node", args) { - ParseAndPrepare::Run(cmd) => cmd.run(load_spec, exit, - |exit, _cli_args, config: Config<_, _>| { - info!("{}", version.name); - info!(" version {}", config.full_version()); - info!(" by Parity Technologies, 2017-2019"); - info!("Chain specification: {}", config.chain_spec.name()); - info!("Node name: {}", config.name); - info!("Roles: {}", display_role(&config)); - let runtime = RuntimeBuilder::new().name_prefix("main-tokio-").build() - .map_err(|e| format!("{:?}", e))?; - match config.roles { - ServiceRoles::LIGHT => run_until_exit( - runtime, - service::new_light(config)?, - exit - ), - _ => run_until_exit( - runtime, - service::new_full(config)?, - exit - ), - } - }), - ParseAndPrepare::BuildSpec(cmd) => cmd.run::(load_spec), - ParseAndPrepare::ExportBlocks(cmd) => cmd.run_with_builder(|config: Config<_, _>| - Ok(new_full_start!(config).0), load_spec, exit), - ParseAndPrepare::ImportBlocks(cmd) => cmd.run_with_builder(|config: Config<_, _>| - Ok(new_full_start!(config).0), load_spec, exit), - ParseAndPrepare::CheckBlock(cmd) => cmd.run_with_builder(|config: Config<_, _>| - Ok(new_full_start!(config).0), load_spec, exit), - ParseAndPrepare::PurgeChain(cmd) => cmd.run(load_spec), - ParseAndPrepare::RevertChain(cmd) => cmd.run_with_builder(|config: Config<_, _>| - Ok(new_full_start!(config).0), load_spec), } -} - -fn run_until_exit( - mut runtime: Runtime, - service: T, - e: E, -) -> error::Result<()> -where - T: AbstractService, - E: IntoExit, -{ - use futures::{FutureExt, TryFutureExt, channel::oneshot, future::select, compat::Future01CompatExt}; - - let (exit_send, exit) = oneshot::channel(); - - let informant = sc_cli::informant::build(&service); - - let future = select(informant, exit) - .map(|_| Ok(())) - .compat(); - - runtime.executor().spawn(future); - - // we eagerly drop the service so that the internal exit future is fired, - // but we need to keep holding a reference to the global telemetry guard - let _telemetry = service.telemetry(); - - let service_res = { - let exit = e.into_exit(); - let service = service - .map_err(|err| error::Error::Service(err)) - .compat(); - let select = select(service, exit) - .map(|_| Ok(())) - .compat(); - runtime.block_on(select) - }; - - let _ = exit_send.send(()); - - // TODO [andre]: timeout this future #1318 - let _ = runtime.shutdown_on_idle().wait(); - service_res } diff --git a/bin/utils/chain-spec-builder/Cargo.toml b/bin/utils/chain-spec-builder/Cargo.toml index c8d79afbced11..9095d181a7aaf 100644 --- a/bin/utils/chain-spec-builder/Cargo.toml +++ b/bin/utils/chain-spec-builder/Cargo.toml @@ -11,4 +11,4 @@ sc-keystore = { version = "2.0.0", path = "../../../client/keystore" } node-cli = { version = "2.0.0", path = "../../node/cli" } sp-core = { version = "2.0.0", path = "../../../primitives/core" } rand = "0.7.2" -structopt = "=0.3.7" +structopt = "=0.3.8" diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml index 460cc2a05a32e..50aa220d6d044 100644 --- a/client/cli/Cargo.toml +++ b/client/cli/Cargo.toml @@ -16,7 +16,7 @@ time = "0.1.42" ansi_term = "0.12.1" lazy_static = "1.4.0" app_dirs = "1.2.1" -tokio = "0.2.1" +tokio = { version = "0.2.9", features = [ "full" ] } futures = { version = "0.3.1", features = ["compat"] } fdlimit = "0.1.1" serde_json = "1.0.41" @@ -31,8 +31,9 @@ sp-state-machine = { version = "2.0.0", path = "../../primitives/state-machine" sc-telemetry = { version = "2.0.0", path = "../telemetry" } sp-keyring = { version = "2.0.0", path = "../../primitives/keyring" } names = "0.11.0" -structopt = "=0.3.7" +structopt = "=0.3.8" sc-tracing = { version = "2.0.0", path = "../tracing" } +ctrlc = { version = "3.1.3", features = ["termination"] } [target.'cfg(not(target_os = "unknown"))'.dependencies] rpassword = "4.0.1" diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 14b0f3a9510c9..689138ba28a42 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -31,6 +31,7 @@ use sc_service::{ config::{Configuration, DatabaseConfig, KeystoreConfig}, ServiceBuilderCommand, RuntimeGenesis, ChainSpecExtension, PruningMode, ChainSpec, + AbstractService, Roles as ServiceRoles, }; use sc_network::{ self, @@ -48,7 +49,7 @@ use std::{ use names::{Generator, Name}; use regex::Regex; -use structopt::{StructOpt, StructOptInternal, clap::AppSettings}; +use structopt::{StructOpt, clap::AppSettings}; #[doc(hidden)] pub use structopt::clap::App; use params::{ @@ -61,10 +62,12 @@ pub use traits::GetSharedParams; use app_dirs::{AppInfo, AppDataType}; use log::info; use lazy_static::lazy_static; -use futures::{Future, compat::Future01CompatExt, executor::block_on}; +use futures::{Future, compat::Future01CompatExt, executor::block_on, future, future::FutureExt}; use sc_telemetry::TelemetryEndpoints; use sp_runtime::generic::BlockId; use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; +use futures::select; +use futures::pin_mut; /// default sub directory to store network config const DEFAULT_NETWORK_CONFIG_PATH : &'static str = "network"; @@ -177,27 +180,16 @@ fn is_node_name_valid(_name: &str) -> Result<(), &str> { Ok(()) } -/// Parse command line interface arguments and prepares the command for execution. -/// -/// Before returning, this function performs various initializations, such as initializing the -/// panic handler and the logger, or increasing the limit for file descriptors. -/// -/// # Remarks -/// -/// `CC` is a custom subcommand. This needs to be an `enum`! If no custom subcommand is required, -/// `NoCustom` can be used as type here. -/// -/// `RP` are custom parameters for the run command. This needs to be a `struct`! The custom -/// parameters are visible to the user as if they were normal run command parameters. If no custom -/// parameters are required, `NoCustom` can be used as type here. -pub fn parse_and_prepare<'a, I>( - version: &'a VersionInfo, +pub fn run( + core_params: CoreParams, + load_spec: F, impl_name: &'static str, - args: I, -) -> ParseAndPrepare<'a> + version: &VersionInfo, +) -> error::Result<()> where - I: IntoIterator, - ::Item: Into + Clone, + F: FnOnce(&str) -> Result>, String>, + G: RuntimeGenesis, + E: ChainSpecExtension, { let full_version = sc_service::config::full_version_from_strs( version.version, @@ -205,6 +197,7 @@ where ); sp_panic_handler::set(version.support_url, &full_version); + /* let matches = CoreParams::clap() .name(version.executable_name) .author(version.author) @@ -214,35 +207,155 @@ where .setting(AppSettings::ArgsNegateSubcommands) .setting(AppSettings::SubcommandsNegateReqs) .get_matches_from(args); - let cli_args = CoreParams::from_clap(&matches); + */ + //let cli_args = CoreParams::from_clap(&matches); fdlimit::raise_fd_limit(); - - let args = match cli_args { - params::CoreParams::Run(params) => ParseAndPrepare::Run( - ParseAndPrepareRun { params, impl_name, version } - ), - params::CoreParams::BuildSpec(params) => ParseAndPrepare::BuildSpec( + init_logger(core_params.get_shared_params().log.as_ref().map(|v| v.as_ref()).unwrap_or("")); + + let config = get_config(core_params, load_spec, impl_name, &version)?; + + match core_params { + CoreParams::Run(params) => { + //ParseAndPrepare::Run( + info!("{}", version.name); + info!(" version {}", config.full_version()); + info!(" by {}, 2017, 2018", version.author); + info!("Chain specification: {}", config.chain_spec.name()); + info!("Node name: {}", config.name); + info!("Roles: {}", display_role(&config)); + match config.roles { + ServiceRoles::LIGHT => run_until_exit( + new_light(config)?, + ), + _ => run_until_exit( + new_full(config)?, + ), + } + }, + /* + CoreParams::BuildSpec(params) => ParseAndPrepare::BuildSpec( ParseAndPrepareBuildSpec { params, version } + ParseAndPrepare::BuildSpec(cmd) => cmd.run::(load_spec), ), - params::CoreParams::ExportBlocks(params) => ParseAndPrepare::ExportBlocks( + CoreParams::ExportBlocks(params) => ParseAndPrepare::ExportBlocks( ParseAndPrepareExport { params, version } ), - params::CoreParams::ImportBlocks(params) => ParseAndPrepare::ImportBlocks( + CoreParams::ImportBlocks(params) => ParseAndPrepare::ImportBlocks( ParseAndPrepareImport { params, version } ), - params::CoreParams::CheckBlock(params) => ParseAndPrepare::CheckBlock( + CoreParams::CheckBlock(params) => ParseAndPrepare::CheckBlock( CheckBlock { params, version } ), - params::CoreParams::PurgeChain(params) => ParseAndPrepare::PurgeChain( + CoreParams::PurgeChain(params) => ParseAndPrepare::PurgeChain( ParseAndPreparePurge { params, version } ), - params::CoreParams::Revert(params) => ParseAndPrepare::RevertChain( + CoreParams::Revert(params) => ParseAndPrepare::RevertChain( ParseAndPrepareRevert { params, version } ), + */ + /* + ParseAndPrepare::ExportBlocks(cmd) => cmd.run_with_builder(|config: Configuration<_, G, E>| + Ok(new_full_start!(config).0), load_spec, exit), + ParseAndPrepare::ImportBlocks(cmd) => cmd.run_with_builder(|config: Configuration<_, G, E>| + Ok(new_full_start!(config).0), load_spec, exit), + ParseAndPrepare::CheckBlock(cmd) => cmd.run_with_builder(|config: Configuration<_, G, E>| + Ok(new_full_start!(config).0), load_spec, exit), + ParseAndPrepare::PurgeChain(cmd) => cmd.run(load_spec), + ParseAndPrepare::RevertChain(cmd) => cmd.run_with_builder(|config: Configuration<_, G, E>| + Ok(new_full_start!(config).0), load_spec), + */ + _ => todo!(), + }; + + Ok(()) +} + +struct Runtime(F) +where + F: Future> + future::FusedFuture + Unpin, + E: std::error::Error; + +impl Runtime +where + F: Future> + future::FusedFuture + Unpin, + E: std::error::Error, +{ + #[tokio::main] + async fn run(self) -> Result<(), Box> + { + use tokio::signal::unix::{signal, SignalKind}; + + let mut stream_int = signal(SignalKind::interrupt())?; + let mut stream_term = signal(SignalKind::terminate())?; + + let mut t1 = stream_int.recv().fuse(); + let mut t2 = stream_term.recv().fuse(); + let mut t3 = self.0; + + pin_mut!(t1, t2); + + select! { + _ = t1 => println!("Caught SIGINT"), + _ = t2 => println!("Caught SIGTERM"), + res = t3 => res?, + } + + Ok(()) + } +} + +fn run_until_exit( + service: T, +) -> error::Result<()> +where + T: AbstractService + std::marker::Unpin, +{ + let runtime = Runtime(service.compat().fuse()); + runtime.run().map_err(|e| e.to_string())?; + + Ok(()) +} + +/* + //use futures::Stream; + use futures::{TryFutureExt, future::select}; + + let (exit_send, exit) = oneshot::channel(); + + let informant = informant::build(&service); + + let future = select(exit, informant) + .map(|_| Ok(())) + .compat(); + + runtime.spawn(future); + + // we eagerly drop the service so that the internal exit future is fired, + // but we need to keep holding a reference to the global telemetry guard + let _telemetry = service.telemetry(); + + let service_res = { + let exit = e.into_exit(); + let service = service + .map_err(|err| error::Error::Service(err)) + .compat(); + let select = select(service, exit) + .map(|_| Ok(())); + //.compat(); + runtime.block_on(select) }; - init_logger(args.shared_params().and_then(|p| p.log.as_ref()).map(|v| v.as_ref()).unwrap_or("")); - args + + let _ = exit_send.send(()); + + // TODO [andre]: timeout this future #1318 + + //use futures01::Future; + + //let _ = runtime.shutdown_on_idle().wait(); + + service_res } +*/ /// Returns a string displaying the node role, special casing the sentry mode /// (returning `SENTRY`), since the node technically has an `AUTHORITY` role but @@ -289,66 +402,65 @@ impl<'a> ParseAndPrepare<'a> { } } -impl<'a> ParseAndPrepare<'a> { - /// Convert ParseAndPrepare to Configuration - pub fn into_configuration( - self, - spec_factory: S, - ) -> error::Result>> - where - C: Default, - G: RuntimeGenesis, - E: ChainSpecExtension, - S: FnOnce(&str) -> Result>, String>, - { - match self { - ParseAndPrepare::Run(c) => - Some(create_run_node_config( - c.params, - spec_factory, - c.impl_name, - c.version - )).transpose(), - ParseAndPrepare::BuildSpec(c) => { - let spec = load_spec(&c.params.shared_params, spec_factory)?; - - Some(create_build_spec_config( - &spec, - &c.params.shared_params, - c.version, - )).transpose() - }, - ParseAndPrepare::ExportBlocks(c) => - Some(create_config_with_db_path( - spec_factory, - &c.params.shared_params, - c.version, - )).transpose(), - ParseAndPrepare::ImportBlocks(c) => - Some(create_config_with_db_path( - spec_factory, - &c.params.shared_params, - c.version, - )).transpose(), - ParseAndPrepare::CheckBlock(c) => - Some(create_config_with_db_path( - spec_factory, - &c.params.shared_params, - c.version, - )).transpose(), - ParseAndPrepare::PurgeChain(c) => - Some(create_config_with_db_path( - spec_factory, - &c.params.shared_params, - c.version - )).transpose(), - ParseAndPrepare::RevertChain(c) => - Some(create_config_with_db_path( - spec_factory, - &c.params.shared_params, - c.version, - )).transpose(), - } +pub fn get_config( + core_params: CoreParams, + spec_factory: F, + impl_name: &'static str, + version: &VersionInfo, +) -> error::Result> +where + C: Default, + G: RuntimeGenesis, + E: ChainSpecExtension, + F: FnOnce(&str) -> Result>, String>, +{ + match core_params { + CoreParams::Run(params) => + create_run_node_config( + params, + spec_factory, + impl_name, + version + ), + CoreParams::BuildSpec(params) => { + let spec = load_spec(¶ms.shared_params, spec_factory)?; + + create_build_spec_config( + &spec, + ¶ms.shared_params, + version, + ) + }, + CoreParams::ExportBlocks(params) => + create_config_with_db_path( + spec_factory, + ¶ms.shared_params, + version, + ), + CoreParams::ImportBlocks(params) => + create_config_with_db_path( + spec_factory, + ¶ms.shared_params, + version, + ), + CoreParams::CheckBlock(params) => + create_config_with_db_path( + spec_factory, + ¶ms.shared_params, + version, + ), + CoreParams::PurgeChain(params) => + create_config_with_db_path( + spec_factory, + ¶ms.shared_params, + version + ), + CoreParams::Revert(params) => + create_config_with_db_path( + spec_factory, + ¶ms.shared_params, + version, + ), } } @@ -364,7 +476,6 @@ impl<'a> ParseAndPrepareRun<'a> { pub fn run( self, spec_factory: S, - exit: Exit, run_service: RS, ) -> error::Result<()> where @@ -373,14 +484,13 @@ impl<'a> ParseAndPrepareRun<'a> { C: Default, G: RuntimeGenesis, CE: ChainSpecExtension, - Exit: IntoExit, - RS: FnOnce(Exit, RunCmd, Configuration) -> Result<(), E> + RS: FnOnce(RunCmd, Configuration) -> Result<(), E> { let config = create_run_node_config( self.params.clone(), spec_factory, self.impl_name, self.version, )?; - run_service(exit, self.params, config).map_err(Into::into) + run_service(self.params, config).map_err(Into::into) } } diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 327f47c850afd..21194bf3f50dc 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -17,7 +17,7 @@ use crate::traits::GetSharedParams; use std::{str::FromStr, path::PathBuf}; -use structopt::{StructOpt, StructOptInternal, clap::{arg_enum, App, AppSettings, SubCommand, Arg}}; +use structopt::{StructOpt, clap::{arg_enum, App}}; pub use crate::execution_strategy::ExecutionStrategy; @@ -854,6 +854,22 @@ pub enum CoreParams { PurgeChain(PurgeChainCmd), } +impl CoreParams { + pub fn get_shared_params(&self) -> SharedParams { + use CoreParams::*; + + match self { + Run(params) => params.shared_params, + BuildSpec(params) => params.shared_params, + ExportBlocks(params) => params.shared_params, + ImportBlocks(params) => params.shared_params, + CheckBlock(params) => params.shared_params, + Revert(params) => params.shared_params, + PurgeChain(params) => params.shared_params, + } + } +} + /// A special commandline parameter that expands to nothing. /// Should be used as custom subcommand/run arguments if no custom values are required. #[derive(Clone, Debug, Default)] From 904b29217337085e0282d05ed3cb6643f4a2f771 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 20 Jan 2020 12:23:13 +0100 Subject: [PATCH 07/77] WIP --- client/cli/src/lib.rs | 19 ++++++++++++------- client/cli/src/params.rs | 16 ++++++++-------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 689138ba28a42..39185503a9d84 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -180,16 +180,21 @@ fn is_node_name_valid(_name: &str) -> Result<(), &str> { Ok(()) } -pub fn run( +pub fn run( core_params: CoreParams, + new_light: F2, + new_full: F2, load_spec: F, impl_name: &'static str, version: &VersionInfo, ) -> error::Result<()> where F: FnOnce(&str) -> Result>, String>, + F2: FnOnce(Configuration) -> Result, G: RuntimeGenesis, E: ChainSpecExtension, + T: AbstractService + std::marker::Unpin, + C: Default { let full_version = sc_service::config::full_version_from_strs( version.version, @@ -212,7 +217,7 @@ where fdlimit::raise_fd_limit(); init_logger(core_params.get_shared_params().log.as_ref().map(|v| v.as_ref()).unwrap_or("")); - let config = get_config(core_params, load_spec, impl_name, &version)?; + let config = get_config(&core_params, load_spec, impl_name, &version)?; match core_params { CoreParams::Run(params) => { @@ -288,8 +293,8 @@ where let mut stream_int = signal(SignalKind::interrupt())?; let mut stream_term = signal(SignalKind::terminate())?; - let mut t1 = stream_int.recv().fuse(); - let mut t2 = stream_term.recv().fuse(); + let t1 = stream_int.recv().fuse(); + let t2 = stream_term.recv().fuse(); let mut t3 = self.0; pin_mut!(t1, t2); @@ -304,7 +309,7 @@ where } } -fn run_until_exit( +fn run_until_exit( service: T, ) -> error::Result<()> where @@ -403,7 +408,7 @@ impl<'a> ParseAndPrepare<'a> { } pub fn get_config( - core_params: CoreParams, + core_params: &CoreParams, spec_factory: F, impl_name: &'static str, version: &VersionInfo, @@ -417,7 +422,7 @@ where match core_params { CoreParams::Run(params) => create_run_node_config( - params, + params.clone(), spec_factory, impl_name, version diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 21194bf3f50dc..313350364f733 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -855,17 +855,17 @@ pub enum CoreParams { } impl CoreParams { - pub fn get_shared_params(&self) -> SharedParams { + pub fn get_shared_params(&self) -> &SharedParams { use CoreParams::*; match self { - Run(params) => params.shared_params, - BuildSpec(params) => params.shared_params, - ExportBlocks(params) => params.shared_params, - ImportBlocks(params) => params.shared_params, - CheckBlock(params) => params.shared_params, - Revert(params) => params.shared_params, - PurgeChain(params) => params.shared_params, + Run(params) => ¶ms.shared_params, + BuildSpec(params) => ¶ms.shared_params, + ExportBlocks(params) => ¶ms.shared_params, + ImportBlocks(params) => ¶ms.shared_params, + CheckBlock(params) => ¶ms.shared_params, + Revert(params) => ¶ms.shared_params, + PurgeChain(params) => ¶ms.shared_params, } } } From 5c684a0912b4c89acec1a081c1ec39f8aaf08a56 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 20 Jan 2020 12:29:06 +0100 Subject: [PATCH 08/77] WIP --- bin/node/cli/src/cli.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs index 2e6190e89f19d..e203ae3663772 100644 --- a/bin/node/cli/src/cli.rs +++ b/bin/node/cli/src/cli.rs @@ -21,7 +21,7 @@ use sc_cli::{IntoExit, NoCustom, SharedParams, ImportParams, error}; use sc_service::{AbstractService, Roles as ServiceRoles, Configuration}; use log::info; use structopt::StructOpt; -use sc_cli::{display_role, parse_and_prepare, GetSharedParams, ParseAndPrepare, CoreParams, run}; +use sc_cli::{display_role, CoreParams}; use crate::{service, ChainSpec, load_spec}; use crate::factory_impl::FactoryState; use node_transaction_factory::RuntimeAdapter; @@ -91,7 +91,13 @@ pub fn run(args: I, version: sc_cli::VersionInfo) -> error::Result<()> let opt = Cli::from_iter(args); match opt { - Cli::SubstrateCli(cli) => run(load_spect, &version), + Cli::SubstrateCli(cli) => sc_cli::run( + cli, + service::new_light, + service::new_full, + load_spec, "substrate-node", + &version, + ), Cli::Factory(cli_args) => { let mut config: Config<_, _> = sc_cli::create_config_with_db_path( load_spec, From 85b2d11fcf05eadbea7d867f9714a999210f1c4b Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 20 Jan 2020 12:53:21 +0100 Subject: [PATCH 09/77] WIP --- bin/node/cli/src/cli.rs | 2 +- bin/node/cli/src/service.rs | 6 +-- client/cli/src/lib.rs | 65 +++++++++++++++------------------ client/service/src/builder.rs | 58 +++++++++++++---------------- client/service/src/chain_ops.rs | 4 +- client/service/src/config.rs | 10 ++--- client/service/src/lib.rs | 4 +- 7 files changed, 67 insertions(+), 82 deletions(-) diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs index e203ae3663772..5c8d3349e4542 100644 --- a/bin/node/cli/src/cli.rs +++ b/bin/node/cli/src/cli.rs @@ -87,7 +87,7 @@ pub fn run(args: I, version: sc_cli::VersionInfo) -> error::Result<()> T: Into + Clone, E: IntoExit, { - type Config = Configuration<(), A, B>; + type Config = Configuration; let opt = Cli::from_iter(args); match opt { diff --git a/bin/node/cli/src/service.rs b/bin/node/cli/src/service.rs index 97ecb7a38f2f7..2f1a64021a2cf 100644 --- a/bin/node/cli/src/service.rs +++ b/bin/node/cli/src/service.rs @@ -283,10 +283,10 @@ type ConcreteTransactionPool = sp_transaction_pool::MaintainableTransactionPool< >; /// A specialized configuration object for setting up the node.. -pub type NodeConfiguration = Configuration; +pub type NodeConfiguration = Configuration; /// Builds a new service for a full client. -pub fn new_full(config: NodeConfiguration) +pub fn new_full(config: NodeConfiguration) -> Result< Service< ConcreteBlock, @@ -308,7 +308,7 @@ pub fn new_full(config: NodeConfiguration) } /// Builds a new service for a light client. -pub fn new_light(config: NodeConfiguration) +pub fn new_light(config: NodeConfiguration) -> Result { type RpcExtension = jsonrpc_core::IoHandler; let inherent_data_providers = InherentDataProviders::new(); diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 39185503a9d84..0715e759f3562 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -180,21 +180,22 @@ fn is_node_name_valid(_name: &str) -> Result<(), &str> { Ok(()) } -pub fn run( +pub fn run( core_params: CoreParams, new_light: F2, - new_full: F2, + new_full: F3, load_spec: F, impl_name: &'static str, version: &VersionInfo, ) -> error::Result<()> where F: FnOnce(&str) -> Result>, String>, - F2: FnOnce(Configuration) -> Result, + F2: FnOnce(Configuration) -> Result, + F3: FnOnce(Configuration) -> Result, G: RuntimeGenesis, E: ChainSpecExtension, - T: AbstractService + std::marker::Unpin, - C: Default + T1: AbstractService + std::marker::Unpin, + T2: AbstractService + std::marker::Unpin, { let full_version = sc_service::config::full_version_from_strs( version.version, @@ -365,7 +366,7 @@ where /// Returns a string displaying the node role, special casing the sentry mode /// (returning `SENTRY`), since the node technically has an `AUTHORITY` role but /// doesn't participate. -pub fn display_role(config: &Configuration) -> String { +pub fn display_role(config: &Configuration) -> String { if config.sentry_mode { "SENTRY".to_string() } else { @@ -407,14 +408,13 @@ impl<'a> ParseAndPrepare<'a> { } } -pub fn get_config( +pub fn get_config( core_params: &CoreParams, spec_factory: F, impl_name: &'static str, version: &VersionInfo, -) -> error::Result> +) -> error::Result> where - C: Default, G: RuntimeGenesis, E: ChainSpecExtension, F: FnOnce(&str) -> Result>, String>, @@ -478,7 +478,7 @@ pub struct ParseAndPrepareRun<'a> { impl<'a> ParseAndPrepareRun<'a> { /// Runs the command and runs the main client. - pub fn run( + pub fn run( self, spec_factory: S, run_service: RS, @@ -486,10 +486,9 @@ impl<'a> ParseAndPrepareRun<'a> { where S: FnOnce(&str) -> Result>, String>, E: Into, - C: Default, G: RuntimeGenesis, CE: ChainSpecExtension, - RS: FnOnce(RunCmd, Configuration) -> Result<(), E> + RS: FnOnce(RunCmd, Configuration) -> Result<(), E> { let config = create_run_node_config( self.params.clone(), spec_factory, self.impl_name, self.version, @@ -521,7 +520,7 @@ impl<'a> ParseAndPrepareBuildSpec<'a> { let mut spec = load_spec(&self.params.shared_params, spec_factory)?; if spec.boot_nodes().is_empty() && !self.params.disable_default_bootnode { - let cfg = create_build_spec_config::( + let cfg = create_build_spec_config( &spec, &self.params.shared_params, self.version, @@ -563,7 +562,7 @@ impl<'a> ParseAndPrepareExport<'a> { exit: Exit, ) -> error::Result<()> where S: FnOnce(&str) -> Result>, String>, - F: FnOnce(Configuration) -> Result, + F: FnOnce(Configuration) -> Result, B: ServiceBuilderCommand, <<<::Block as BlockT>::Header as HeaderT> ::Number as FromStr>::Err: Debug, @@ -627,7 +626,7 @@ impl<'a> ParseAndPrepareImport<'a> { exit: Exit, ) -> error::Result<()> where S: FnOnce(&str) -> Result>, String>, - F: FnOnce(Configuration) -> Result, + F: FnOnce(Configuration) -> Result, B: ServiceBuilderCommand, C: Default, G: RuntimeGenesis, @@ -686,7 +685,7 @@ impl<'a> CheckBlock<'a> { _exit: Exit, ) -> error::Result<()> where S: FnOnce(&str) -> Result>, String>, - F: FnOnce(Configuration) -> Result, + F: FnOnce(Configuration) -> Result, B: ServiceBuilderCommand, <::Block as BlockT>::Hash: FromStr, C: Default, @@ -733,7 +732,7 @@ impl<'a> ParseAndPreparePurge<'a> { G: RuntimeGenesis, E: ChainSpecExtension, { - let config = create_config_with_db_path::<(), _, _, _>( + let config = create_config_with_db_path( spec_factory, &self.params.shared_params, self.version )?; let db_path = match config.database { @@ -789,7 +788,7 @@ impl<'a> ParseAndPrepareRevert<'a> { spec_factory: S ) -> error::Result<()> where S: FnOnce(&str) -> Result>, String>, - F: FnOnce(Configuration) -> Result, + F: FnOnce(Configuration) -> Result, B: ServiceBuilderCommand, <<<::Block as BlockT>::Header as HeaderT> ::Number as FromStr>::Err: Debug, @@ -845,8 +844,8 @@ fn parse_ed25519_secret(hex: &String) -> error::Result( - options: &mut Configuration, +fn fill_transaction_pool_configuration( + options: &mut Configuration, params: TransactionPoolParams, ) -> error::Result<()> { // ready queue @@ -924,8 +923,8 @@ fn input_keystore_password() -> Result { } /// Fill the password field of the given config instance. -fn fill_config_keystore_password_and_path( - config: &mut sc_service::Configuration, +fn fill_config_keystore_password_and_path( + config: &mut sc_service::Configuration, cli: &RunCmd, ) -> Result<(), String> { let password = if cli.password_interactive { @@ -956,13 +955,12 @@ fn fill_config_keystore_password_and_path( } /// Put block import CLI params into `config` object. -pub fn fill_import_params( - config: &mut Configuration, +pub fn fill_import_params( + config: &mut Configuration, cli: &ImportParams, role: sc_service::Roles, ) -> error::Result<()> where - C: Default, G: RuntimeGenesis, E: ChainSpecExtension, { @@ -1010,11 +1008,10 @@ pub fn fill_import_params( Ok(()) } -fn create_run_node_config( +fn create_run_node_config( cli: RunCmd, spec_factory: S, impl_name: &'static str, version: &VersionInfo, -) -> error::Result> +) -> error::Result> where - C: Default, G: RuntimeGenesis, E: ChainSpecExtension, S: FnOnce(&str) -> Result>, String>, @@ -1152,11 +1149,10 @@ fn interface_str( } /// Creates a configuration including the database path. -pub fn create_config_with_db_path( +pub fn create_config_with_db_path( spec_factory: S, cli: &SharedParams, version: &VersionInfo, -) -> error::Result> +) -> error::Result> where - C: Default, G: RuntimeGenesis, E: ChainSpecExtension, S: FnOnce(&str) -> Result>, String>, @@ -1178,18 +1174,17 @@ where } /// Creates a configuration including the base path and the shared params -fn create_build_spec_config( +fn create_build_spec_config( spec: &ChainSpec, cli: &SharedParams, version: &VersionInfo, -) -> error::Result> +) -> error::Result> where - C: Default, G: RuntimeGenesis, E: ChainSpecExtension, { let base_path = base_path(&cli, version); - let cfg = sc_service::Configuration::::default_with_spec_and_base_path( + let cfg = sc_service::Configuration::default_with_spec_and_base_path( spec.clone(), Some(base_path), ); diff --git a/client/service/src/builder.rs b/client/service/src/builder.rs index 6eb0259b7928c..70e7f61ced5a3 100644 --- a/client/service/src/builder.rs +++ b/client/service/src/builder.rs @@ -72,10 +72,10 @@ use grafana_data_source::{self, record_metrics}; /// The order in which the `with_*` methods are called doesn't matter, as the correct binding of /// generics is done when you call `build`. /// -pub struct ServiceBuilder { - config: Configuration, + config: Configuration, pub (crate) client: Arc, backend: Arc, keystore: Arc>, @@ -144,8 +144,8 @@ type TFullParts = ( ); /// Creates a new full client for the given config. -pub fn new_full_client( - config: &Configuration, +pub fn new_full_client( + config: &Configuration, ) -> Result, Error> where TBl: BlockT, TExecDisp: NativeExecutionDispatch, @@ -155,8 +155,8 @@ pub fn new_full_client( new_full_parts(config).map(|parts| parts.0) } -fn new_full_parts( - config: &Configuration, +fn new_full_parts( + config: &Configuration, ) -> Result, Error> where TBl: BlockT, TExecDisp: NativeExecutionDispatch, @@ -224,15 +224,14 @@ fn new_full_parts( Ok((client, backend, keystore)) } -impl ServiceBuilder<(), (), TCfg, TGen, TCSExt, (), (), (), (), (), (), (), (), (), ()> +impl ServiceBuilder<(), (), TGen, TCSExt, (), (), (), (), (), (), (), (), (), ()> where TGen: RuntimeGenesis, TCSExt: Extension { /// Start the service builder with a configuration. pub fn new_full( - config: Configuration + config: Configuration ) -> Result, @@ -270,11 +269,10 @@ where TGen: RuntimeGenesis, TCSExt: Extension { /// Start the service builder with a configuration. pub fn new_light( - config: Configuration + config: Configuration ) -> Result, @@ -355,8 +353,8 @@ where TGen: RuntimeGenesis, TCSExt: Extension { } } -impl - ServiceBuilder + ServiceBuilder { /// Returns a reference to the client that was stored in this builder. @@ -378,9 +376,9 @@ impl( self, select_chain_builder: impl FnOnce( - &Configuration, &Arc + &Configuration, &Arc ) -> Result, Error> - ) -> Result Result, Error> { let select_chain = select_chain_builder(&self.config, &self.backend)?; @@ -405,8 +403,8 @@ impl( self, - builder: impl FnOnce(&Configuration, &Arc) -> Result - ) -> Result, &Arc) -> Result + ) -> Result, Error> { self.with_opt_select_chain(|cfg, b| builder(cfg, b).map(Option::Some)) } @@ -414,9 +412,9 @@ impl( self, - builder: impl FnOnce(&Configuration, Arc, Option, Arc) + builder: impl FnOnce(&Configuration, Arc, Option, Arc) -> Result - ) -> Result Result, Error> where TSc: Clone { let import_queue = builder( @@ -447,8 +445,8 @@ impl( self, - network_protocol_builder: impl FnOnce(&Configuration) -> Result - ) -> Result) -> Result + ) -> Result, Error> { let network_protocol = network_protocol_builder(&self.config)?; @@ -477,7 +475,6 @@ impl Result Result( self, builder: impl FnOnce( - &Configuration, + &Configuration, Arc, Arc, Option, Option, Arc, ) -> Result<(UImpQu, Option), Error> - ) -> Result Result, Error> where TSc: Clone, TFchr: Clone { let (import_queue, fprb) = builder( @@ -580,14 +576,14 @@ impl( self, builder: impl FnOnce( - &Configuration, + &Configuration, Arc, Arc, Option, Option, Arc, ) -> Result<(UImpQu, UFprb), Error> - ) -> Result Result, Error> where TSc: Clone, TFchr: Clone { self.with_import_queue_and_opt_fprb(|cfg, cl, b, f, sc, tx| @@ -604,7 +600,7 @@ impl, Option, ) -> Result - ) -> Result Result, Error> where TSc: Clone, TFchr: Clone { let transaction_pool = transaction_pool_builder( @@ -641,7 +637,7 @@ impl, Option>>, ) -> Result, - ) -> Result Result, Error> where TSc: Clone, TFchr: Clone { let rpc_extensions = rpc_ext_builder( @@ -705,11 +701,10 @@ pub trait ServiceBuilderCommand { ) -> Box + Send>; } -impl +impl ServiceBuilder< TBl, TRtApi, - TCfg, TGen, TCSExt, Client, @@ -733,7 +728,6 @@ ServiceBuilder< sp_api::ApiExt, TBl: BlockT, TRtApi: 'static + Send + Sync, - TCfg: Default, TGen: RuntimeGenesis, TCSExt: Extension, TBackend: 'static + sc_client_api::backend::Backend + Send, diff --git a/client/service/src/chain_ops.rs b/client/service/src/chain_ops.rs index 0b86fb366f0b6..fce781c61dca4 100644 --- a/client/service/src/chain_ops.rs +++ b/client/service/src/chain_ops.rs @@ -49,11 +49,11 @@ pub fn build_spec(spec: ChainSpec, raw: bool) -> error::Result ServiceBuilderCommand for ServiceBuilder< - TBl, TRtApi, TCfg, TGen, TCSExt, Client, + TBl, TRtApi, TGen, TCSExt, Client, TFchr, TSc, TImpQu, TFprb, TFpp, TNetP, TExPool, TRpc, Backend > where TBl: BlockT, diff --git a/client/service/src/config.rs b/client/service/src/config.rs index 75c626821479d..5018e5c1e46cb 100644 --- a/client/service/src/config.rs +++ b/client/service/src/config.rs @@ -30,7 +30,7 @@ use sc_telemetry::TelemetryEndpoints; /// Service configuration. #[derive(Clone)] -pub struct Configuration { +pub struct Configuration { /// Implementation name pub impl_name: &'static str, /// Implementation version @@ -57,8 +57,6 @@ pub struct Configuration { pub pruning: PruningMode, /// Chain configuration. pub chain_spec: ChainSpec, - /// Custom configuration. - pub custom: C, /// Node name. pub name: String, /// Wasm execution method. @@ -145,8 +143,7 @@ pub enum DatabaseConfig { Custom(Arc), } -impl Configuration where - C: Default, +impl Configuration where G: RuntimeGenesis, E: Extension, { @@ -169,7 +166,6 @@ impl Configuration where }, state_cache_size: Default::default(), state_cache_child_ratio: Default::default(), - custom: Default::default(), pruning: PruningMode::default(), wasm_method: WasmExecutionMethod::Interpreted, execution_strategies: Default::default(), @@ -198,7 +194,7 @@ impl Configuration where } -impl Configuration { +impl Configuration { /// Returns full version string of this configuration. pub fn full_version(&self) -> String { full_version_from_strs(self.impl_version, self.impl_commit) diff --git a/client/service/src/lib.rs b/client/service/src/lib.rs index 7a3c6fc9eaab3..78fcac575dd69 100644 --- a/client/service/src/lib.rs +++ b/client/service/src/lib.rs @@ -534,8 +534,8 @@ impl Drop for /// Starts RPC servers that run in their own thread, and returns an opaque object that keeps them alive. #[cfg(not(target_os = "unknown"))] -fn start_rpc_servers sc_rpc_server::RpcHandler>( - config: &Configuration, +fn start_rpc_servers sc_rpc_server::RpcHandler>( + config: &Configuration, mut gen_handler: H ) -> Result, error::Error> { fn maybe_start_server(address: Option, mut start: F) -> Result, io::Error> From c8581ad02a9278dfb94385c440dc04da4f697bb4 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 20 Jan 2020 14:08:56 +0100 Subject: [PATCH 10/77] WIP --- bin/node/cli/src/cli.rs | 8 +- bin/node/cli/src/service.rs | 4 +- client/cli/src/lib.rs | 310 ++++++++++++------------------------ 3 files changed, 113 insertions(+), 209 deletions(-) diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs index 5c8d3349e4542..b76b6de068046 100644 --- a/bin/node/cli/src/cli.rs +++ b/bin/node/cli/src/cli.rs @@ -82,10 +82,10 @@ pub struct FactoryCmd { } /// Parse command line arguments into service configuration. -pub fn run(args: I, version: sc_cli::VersionInfo) -> error::Result<()> where +pub fn run(args: I, version: sc_cli::VersionInfo) -> error::Result<()> +where I: IntoIterator, T: Into + Clone, - E: IntoExit, { type Config = Configuration; @@ -95,7 +95,9 @@ pub fn run(args: I, version: sc_cli::VersionInfo) -> error::Result<()> cli, service::new_light, service::new_full, - load_spec, "substrate-node", + load_spec, + |config: Config<_, _>| Ok(new_full_start!(config).0), + "substrate-node", &version, ), Cli::Factory(cli_args) => { diff --git a/bin/node/cli/src/service.rs b/bin/node/cli/src/service.rs index 2f1a64021a2cf..14f087b93516b 100644 --- a/bin/node/cli/src/service.rs +++ b/bin/node/cli/src/service.rs @@ -286,7 +286,7 @@ type ConcreteTransactionPool = sp_transaction_pool::MaintainableTransactionPool< pub type NodeConfiguration = Configuration; /// Builds a new service for a full client. -pub fn new_full(config: NodeConfiguration) +pub fn new_full(config: NodeConfiguration) -> Result< Service< ConcreteBlock, @@ -308,7 +308,7 @@ pub fn new_full(config: NodeConfiguration) } /// Builds a new service for a light client. -pub fn new_light(config: NodeConfiguration) +pub fn new_light(config: NodeConfiguration) -> Result { type RpcExtension = jsonrpc_core::IoHandler; let inherent_data_providers = InherentDataProviders::new(); diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 0715e759f3562..bedc1062bc79d 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -180,11 +180,12 @@ fn is_node_name_valid(_name: &str) -> Result<(), &str> { Ok(()) } -pub fn run( +pub fn run( core_params: CoreParams, new_light: F2, new_full: F3, - load_spec: F, + spec_factory: F, + builder: F4, impl_name: &'static str, version: &VersionInfo, ) -> error::Result<()> @@ -192,10 +193,15 @@ where F: FnOnce(&str) -> Result>, String>, F2: FnOnce(Configuration) -> Result, F3: FnOnce(Configuration) -> Result, + F4: FnOnce(Configuration) -> Result, G: RuntimeGenesis, E: ChainSpecExtension, T1: AbstractService + std::marker::Unpin, T2: AbstractService + std::marker::Unpin, + T3: ServiceBuilderCommand + std::marker::Unpin, + T5: sp_runtime::traits::Block + Debug, + <<::Header as sp_runtime::traits::Header>::Number as + std::str::FromStr>::Err: std::fmt::Debug, { let full_version = sc_service::config::full_version_from_strs( version.version, @@ -218,11 +224,10 @@ where fdlimit::raise_fd_limit(); init_logger(core_params.get_shared_params().log.as_ref().map(|v| v.as_ref()).unwrap_or("")); - let config = get_config(&core_params, load_spec, impl_name, &version)?; + match &core_params { + CoreParams::Run(_params) => { + let config = get_config(&core_params, spec_factory, impl_name, &version)?; - match core_params { - CoreParams::Run(params) => { - //ParseAndPrepare::Run( info!("{}", version.name); info!(" version {}", config.full_version()); info!(" by {}, 2017, 2018", version.author); @@ -230,34 +235,94 @@ where info!("Node name: {}", config.name); info!("Roles: {}", display_role(&config)); match config.roles { - ServiceRoles::LIGHT => run_until_exit( + ServiceRoles::LIGHT => run_service_until_exit( new_light(config)?, ), - _ => run_until_exit( + _ => run_service_until_exit( new_full(config)?, ), } }, + CoreParams::BuildSpec(params) => { + info!("Building chain spec"); + let raw_output = params.raw; + let mut spec = load_spec(¶ms.shared_params, spec_factory)?; + + if spec.boot_nodes().is_empty() && !params.disable_default_bootnode { + let cfg = create_build_spec_config( + &spec, + ¶ms.shared_params, + version, + )?; + let node_key = node_key_config( + params.node_key_params.clone(), + &Some(cfg.in_chain_config_dir(DEFAULT_NETWORK_CONFIG_PATH).expect("We provided a base_path")) + )?; + let keys = node_key.into_keypair()?; + let peer_id = keys.public().into_peer_id(); + let addr = build_multiaddr![ + Ip4([127, 0, 0, 1]), + Tcp(30333u16), + P2p(peer_id) + ]; + spec.add_boot_node(addr) + } + + let json = sc_service::chain_ops::build_spec(spec, raw_output)?; + + print!("{}", json); + + Ok(()) + }, + CoreParams::ExportBlocks(params) => { + let config = get_config(&core_params, spec_factory, impl_name, &version)?; + + if let DatabaseConfig::Path { ref path, .. } = &config.database { + info!("DB path: {}", path.display()); + } + let from = params.from.as_ref().and_then(|f| f.parse().ok()).unwrap_or(1); + let to = params.to.as_ref().and_then(|t| t.parse().ok()); + + let json = params.json; + + let file: Box = match ¶ms.output { + Some(filename) => Box::new(File::create(filename)?), + None => Box::new(stdout()), + }; + + let f = builder(config)? + .export_blocks(file, from.into(), to, json) + .compat(); + let f = f.fuse(); + pin_mut!(f); + + run_until_exit(f) + }, + CoreParams::ImportBlocks(params) => { + let mut config = get_config(&core_params, spec_factory, impl_name, &version)?; + fill_import_params(&mut config, ¶ms.import_params, sc_service::Roles::FULL)?; + + let file: Box = match ¶ms.input { + Some(filename) => Box::new(File::open(filename)?), + None => { + let mut buffer = Vec::new(); + stdin().read_to_end(&mut buffer)?; + Box::new(Cursor::new(buffer)) + }, + }; + + let f = builder(config)? + .import_blocks(file, false) + .compat(); + let f = f.fuse(); + pin_mut!(f); + + run_until_exit(f) + }, /* - CoreParams::BuildSpec(params) => ParseAndPrepare::BuildSpec( - ParseAndPrepareBuildSpec { params, version } - ParseAndPrepare::BuildSpec(cmd) => cmd.run::(load_spec), - ), - CoreParams::ExportBlocks(params) => ParseAndPrepare::ExportBlocks( - ParseAndPrepareExport { params, version } - ), - CoreParams::ImportBlocks(params) => ParseAndPrepare::ImportBlocks( - ParseAndPrepareImport { params, version } - ), - CoreParams::CheckBlock(params) => ParseAndPrepare::CheckBlock( - CheckBlock { params, version } - ), - CoreParams::PurgeChain(params) => ParseAndPrepare::PurgeChain( - ParseAndPreparePurge { params, version } - ), - CoreParams::Revert(params) => ParseAndPrepare::RevertChain( - ParseAndPrepareRevert { params, version } - ), + CoreParams::CheckBlock(params) => + CoreParams::PurgeChain(params) => + CoreParams::Revert(params) => */ /* ParseAndPrepare::ExportBlocks(cmd) => cmd.run_with_builder(|config: Configuration<_, G, E>| @@ -310,7 +375,7 @@ where } } -fn run_until_exit( +fn run_service_until_exit( service: T, ) -> error::Result<()> where @@ -322,6 +387,19 @@ where Ok(()) } +fn run_until_exit( + future: F, +) -> error::Result<()> +where + F: Future> + future::FusedFuture + Unpin, + E: std::error::Error +{ + let runtime = Runtime(future); + runtime.run().map_err(|e| e.to_string())?; + + Ok(()) +} + /* //use futures::Stream; use futures::{TryFutureExt, future::select}; @@ -476,200 +554,24 @@ pub struct ParseAndPrepareRun<'a> { version: &'a VersionInfo, } -impl<'a> ParseAndPrepareRun<'a> { - /// Runs the command and runs the main client. - pub fn run( - self, - spec_factory: S, - run_service: RS, - ) -> error::Result<()> - where - S: FnOnce(&str) -> Result>, String>, - E: Into, - G: RuntimeGenesis, - CE: ChainSpecExtension, - RS: FnOnce(RunCmd, Configuration) -> Result<(), E> - { - let config = create_run_node_config( - self.params.clone(), spec_factory, self.impl_name, self.version, - )?; - - run_service(self.params, config).map_err(Into::into) - } -} - /// Command ready to build chain specs. pub struct ParseAndPrepareBuildSpec<'a> { params: BuildSpecCmd, version: &'a VersionInfo, } -impl<'a> ParseAndPrepareBuildSpec<'a> { - /// Runs the command and build the chain specs. - pub fn run( - self, - spec_factory: S - ) -> error::Result<()> where - S: FnOnce(&str) -> Result>, String>, - C: Default, - G: RuntimeGenesis, - E: ChainSpecExtension, - { - info!("Building chain spec"); - let raw_output = self.params.raw; - let mut spec = load_spec(&self.params.shared_params, spec_factory)?; - - if spec.boot_nodes().is_empty() && !self.params.disable_default_bootnode { - let cfg = create_build_spec_config( - &spec, - &self.params.shared_params, - self.version, - )?; - let node_key = node_key_config( - self.params.node_key_params, - &Some(cfg.in_chain_config_dir(DEFAULT_NETWORK_CONFIG_PATH).expect("We provided a base_path")) - )?; - let keys = node_key.into_keypair()?; - let peer_id = keys.public().into_peer_id(); - let addr = build_multiaddr![ - Ip4([127, 0, 0, 1]), - Tcp(30333u16), - P2p(peer_id) - ]; - spec.add_boot_node(addr) - } - - let json = sc_service::chain_ops::build_spec(spec, raw_output)?; - - print!("{}", json); - - Ok(()) - } -} - /// Command ready to export the chain. pub struct ParseAndPrepareExport<'a> { params: ExportBlocksCmd, version: &'a VersionInfo, } -impl<'a> ParseAndPrepareExport<'a> { - /// Runs the command and exports from the chain. - pub fn run_with_builder( - self, - builder: F, - spec_factory: S, - exit: Exit, - ) -> error::Result<()> - where S: FnOnce(&str) -> Result>, String>, - F: FnOnce(Configuration) -> Result, - B: ServiceBuilderCommand, - <<<::Block as BlockT>::Header as HeaderT> - ::Number as FromStr>::Err: Debug, - C: Default, - G: RuntimeGenesis, - E: ChainSpecExtension, - Exit: IntoExit - { - let config = create_config_with_db_path(spec_factory, &self.params.shared_params, self.version)?; - - if let DatabaseConfig::Path { ref path, .. } = &config.database { - info!("DB path: {}", path.display()); - } - let from = self.params.from.and_then(|f| f.parse().ok()).unwrap_or(1); - let to = self.params.to.and_then(|t| t.parse().ok()); - - let json = self.params.json; - - let file: Box = match self.params.output { - Some(filename) => Box::new(File::create(filename)?), - None => Box::new(stdout()), - }; - - // Note: while we would like the user to handle the exit themselves, we handle it here - // for backwards compatibility reasons. - let (exit_send, exit_recv) = std::sync::mpsc::channel(); - let exit = exit.into_exit(); - std::thread::spawn(move || { - block_on(exit); - let _ = exit_send.send(()); - }); - - let mut export_fut = builder(config)? - .export_blocks(file, from.into(), to, json) - .compat(); - let fut = futures::future::poll_fn(|cx| { - if exit_recv.try_recv().is_ok() { - return Poll::Ready(Ok(())); - } - Pin::new(&mut export_fut).poll(cx) - }); - - let mut runtime = tokio::runtime::Runtime::new().unwrap(); - runtime.block_on(fut)?; - Ok(()) - } -} - /// Command ready to import the chain. pub struct ParseAndPrepareImport<'a> { params: ImportBlocksCmd, version: &'a VersionInfo, } -impl<'a> ParseAndPrepareImport<'a> { - /// Runs the command and imports to the chain. - pub fn run_with_builder( - self, - builder: F, - spec_factory: S, - exit: Exit, - ) -> error::Result<()> - where S: FnOnce(&str) -> Result>, String>, - F: FnOnce(Configuration) -> Result, - B: ServiceBuilderCommand, - C: Default, - G: RuntimeGenesis, - E: ChainSpecExtension, - Exit: IntoExit - { - let mut config = create_config_with_db_path(spec_factory, &self.params.shared_params, self.version)?; - fill_import_params(&mut config, &self.params.import_params, sc_service::Roles::FULL)?; - - let file: Box = match self.params.input { - Some(filename) => Box::new(File::open(filename)?), - None => { - let mut buffer = Vec::new(); - stdin().read_to_end(&mut buffer)?; - Box::new(Cursor::new(buffer)) - }, - }; - - // Note: while we would like the user to handle the exit themselves, we handle it here - // for backwards compatibility reasons. - let (exit_send, exit_recv) = std::sync::mpsc::channel(); - let exit = exit.into_exit(); - std::thread::spawn(move || { - block_on(exit); - let _ = exit_send.send(()); - }); - - let mut import_fut = builder(config)? - .import_blocks(file, false) - .compat(); - let fut = futures::future::poll_fn(|cx| { - if exit_recv.try_recv().is_ok() { - return Poll::Ready(Ok(())); - } - Pin::new(&mut import_fut).poll(cx) - }); - - let mut runtime = tokio::runtime::Runtime::new().unwrap(); - runtime.block_on(fut)?; - Ok(()) - } -} - /// Command to check a block. pub struct CheckBlock<'a> { params: CheckBlockCmd, From 1a9c5943a1b1303fe48c6411408e772bf524782e Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 20 Jan 2020 15:24:06 +0100 Subject: [PATCH 11/77] WIP --- bin/node/cli/src/cli.rs | 3 +- client/cli/src/lib.rs | 376 ++++++++++++---------------------------- 2 files changed, 113 insertions(+), 266 deletions(-) diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs index b76b6de068046..30b943f0b65c4 100644 --- a/bin/node/cli/src/cli.rs +++ b/bin/node/cli/src/cli.rs @@ -27,6 +27,7 @@ use crate::factory_impl::FactoryState; use node_transaction_factory::RuntimeAdapter; #[derive(Clone, Debug, StructOpt)] +#[structopt(settings = &[structopt::clap::AppSettings::GlobalVersion, structopt::clap::AppSettings::ArgsNegateSubcommands, structopt::clap::AppSettings::SubcommandsNegateReqs])] enum Cli { #[structopt(flatten)] SubstrateCli(CoreParams), @@ -89,7 +90,7 @@ where { type Config = Configuration; - let opt = Cli::from_iter(args); + let opt = sc_cli::from_iter(args, &version); match opt { Cli::SubstrateCli(cli) => sc_cli::run( cli, diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index bedc1062bc79d..750c5ff2c5aa5 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -180,6 +180,40 @@ fn is_node_name_valid(_name: &str) -> Result<(), &str> { Ok(()) } +/// Gets the struct from the command line arguments. Print the +/// error message and quit the program in case of failure. +pub fn from_args(version: &VersionInfo) -> T +where + T: StructOpt + Sized, +{ + from_iter::(&mut std::env::args_os(), version) +} + +/// Gets the struct from any iterator such as a `Vec` of your making. +/// Print the error message and quit the program in case of failure. +pub fn from_iter(iter: I, version: &VersionInfo) -> T +where + T: StructOpt + Sized, + I: IntoIterator, + I::Item: Into + Clone, +{ + let app = T::clap(); + + let mut full_version = sc_service::config::full_version_from_strs( + version.version, + version.commit + ); + full_version.push_str("\n"); + + let app = app + .name(version.executable_name) + .author(version.author) + .about(version.description) + .version(full_version.as_str()); + + T::from_clap(&app.get_matches_from(iter)) +} + pub fn run( core_params: CoreParams, new_light: F2, @@ -202,25 +236,14 @@ where T5: sp_runtime::traits::Block + Debug, <<::Header as sp_runtime::traits::Header>::Number as std::str::FromStr>::Err: std::fmt::Debug, + ::Hash: std::str::FromStr, { let full_version = sc_service::config::full_version_from_strs( version.version, version.commit ); - sp_panic_handler::set(version.support_url, &full_version); - /* - let matches = CoreParams::clap() - .name(version.executable_name) - .author(version.author) - .about(version.description) - .version(&(full_version + "\n")[..]) - .setting(AppSettings::GlobalVersion) - .setting(AppSettings::ArgsNegateSubcommands) - .setting(AppSettings::SubcommandsNegateReqs) - .get_matches_from(args); - */ - //let cli_args = CoreParams::from_clap(&matches); + fdlimit::raise_fd_limit(); init_logger(core_params.get_shared_params().log.as_ref().map(|v| v.as_ref()).unwrap_or("")); @@ -319,23 +342,77 @@ where run_until_exit(f) }, - /* - CoreParams::CheckBlock(params) => - CoreParams::PurgeChain(params) => - CoreParams::Revert(params) => - */ - /* - ParseAndPrepare::ExportBlocks(cmd) => cmd.run_with_builder(|config: Configuration<_, G, E>| - Ok(new_full_start!(config).0), load_spec, exit), - ParseAndPrepare::ImportBlocks(cmd) => cmd.run_with_builder(|config: Configuration<_, G, E>| - Ok(new_full_start!(config).0), load_spec, exit), - ParseAndPrepare::CheckBlock(cmd) => cmd.run_with_builder(|config: Configuration<_, G, E>| - Ok(new_full_start!(config).0), load_spec, exit), - ParseAndPrepare::PurgeChain(cmd) => cmd.run(load_spec), - ParseAndPrepare::RevertChain(cmd) => cmd.run_with_builder(|config: Configuration<_, G, E>| - Ok(new_full_start!(config).0), load_spec), - */ - _ => todo!(), + CoreParams::CheckBlock(params) => { + let mut config = get_config(&core_params, spec_factory, impl_name, &version)?; + fill_import_params(&mut config, ¶ms.import_params, sc_service::Roles::FULL)?; + + let input = if params.input.starts_with("0x") { ¶ms.input[2..] } else { ¶ms.input[..] }; + let block_id = match FromStr::from_str(input) { + Ok(hash) => BlockId::hash(hash), + Err(_) => match params.input.parse::() { + Ok(n) => BlockId::number((n as u32).into()), + Err(_) => return Err(error::Error::Input("Invalid hash or number specified".into())), + } + }; + + let start = std::time::Instant::now(); + let check = builder(config)? + .check_block(block_id) + .compat(); + let mut runtime = tokio::runtime::Runtime::new().unwrap(); + runtime.block_on(check)?; + println!("Completed in {} ms.", start.elapsed().as_millis()); + + Ok(()) + }, + CoreParams::PurgeChain(params) => { + let config = get_config(&core_params, spec_factory, impl_name, &version)?; + + let db_path = match config.database { + DatabaseConfig::Path { path, .. } => path, + _ => { + eprintln!("Cannot purge custom database implementation"); + return Ok(()); + } + }; + + if !params.yes { + print!("Are you sure to remove {:?}? [y/N]: ", &db_path); + stdout().flush().expect("failed to flush stdout"); + + let mut input = String::new(); + stdin().read_line(&mut input)?; + let input = input.trim(); + + match input.chars().nth(0) { + Some('y') | Some('Y') => {}, + _ => { + println!("Aborted"); + return Ok(()); + }, + } + } + + match fs::remove_dir_all(&db_path) { + Result::Ok(_) => { + println!("{:?} removed.", &db_path); + Ok(()) + }, + Result::Err(ref err) if err.kind() == ErrorKind::NotFound => { + eprintln!("{:?} did not exist.", &db_path); + Ok(()) + }, + Result::Err(err) => Result::Err(err.into()) + } + }, + CoreParams::Revert(params) => { + let config = get_config(&core_params, spec_factory, impl_name, &version)?; + + let blocks = params.num.parse()?; + builder(config)?.revert_chain(blocks)?; + + Ok(()) + }, }; Ok(()) @@ -381,6 +458,10 @@ fn run_service_until_exit( where T: AbstractService + std::marker::Unpin, { + // we eagerly drop the service so that the internal exit future is fired, + // but we need to keep holding a reference to the global telemetry guard + let _telemetry = service.telemetry(); + let runtime = Runtime(service.compat().fuse()); runtime.run().map_err(|e| e.to_string())?; @@ -400,47 +481,6 @@ where Ok(()) } -/* - //use futures::Stream; - use futures::{TryFutureExt, future::select}; - - let (exit_send, exit) = oneshot::channel(); - - let informant = informant::build(&service); - - let future = select(exit, informant) - .map(|_| Ok(())) - .compat(); - - runtime.spawn(future); - - // we eagerly drop the service so that the internal exit future is fired, - // but we need to keep holding a reference to the global telemetry guard - let _telemetry = service.telemetry(); - - let service_res = { - let exit = e.into_exit(); - let service = service - .map_err(|err| error::Error::Service(err)) - .compat(); - let select = select(service, exit) - .map(|_| Ok(())); - //.compat(); - runtime.block_on(select) - }; - - let _ = exit_send.send(()); - - // TODO [andre]: timeout this future #1318 - - //use futures01::Future; - - //let _ = runtime.shutdown_on_idle().wait(); - - service_res -} -*/ - /// Returns a string displaying the node role, special casing the sentry mode /// (returning `SENTRY`), since the node technically has an `AUTHORITY` role but /// doesn't participate. @@ -452,40 +492,6 @@ pub fn display_role(config: &Configuration) -> String { } } -/// Output of calling `parse_and_prepare`. -#[must_use] -pub enum ParseAndPrepare<'a> { - /// Command ready to run the main client. - Run(ParseAndPrepareRun<'a>), - /// Command ready to build chain specs. - BuildSpec(ParseAndPrepareBuildSpec<'a>), - /// Command ready to export the chain. - ExportBlocks(ParseAndPrepareExport<'a>), - /// Command ready to import the chain. - ImportBlocks(ParseAndPrepareImport<'a>), - /// Command to check a block. - CheckBlock(CheckBlock<'a>), - /// Command ready to purge the chain. - PurgeChain(ParseAndPreparePurge<'a>), - /// Command ready to revert the chain. - RevertChain(ParseAndPrepareRevert<'a>), -} - -impl<'a> ParseAndPrepare<'a> { - /// Return common set of parameters shared by all commands. - pub fn shared_params(&self) -> Option<&SharedParams> { - match self { - ParseAndPrepare::Run(c) => Some(&c.params.shared_params), - ParseAndPrepare::BuildSpec(c) => Some(&c.params.shared_params), - ParseAndPrepare::ExportBlocks(c) => Some(&c.params.shared_params), - ParseAndPrepare::ImportBlocks(c) => Some(&c.params.shared_params), - ParseAndPrepare::CheckBlock(c) => Some(&c.params.shared_params), - ParseAndPrepare::PurgeChain(c) => Some(&c.params.shared_params), - ParseAndPrepare::RevertChain(c) => Some(&c.params.shared_params), - } - } -} - pub fn get_config( core_params: &CoreParams, spec_factory: F, @@ -547,166 +553,6 @@ where } } -/// Command ready to run the main client. -pub struct ParseAndPrepareRun<'a> { - params: RunCmd, - impl_name: &'static str, - version: &'a VersionInfo, -} - -/// Command ready to build chain specs. -pub struct ParseAndPrepareBuildSpec<'a> { - params: BuildSpecCmd, - version: &'a VersionInfo, -} - -/// Command ready to export the chain. -pub struct ParseAndPrepareExport<'a> { - params: ExportBlocksCmd, - version: &'a VersionInfo, -} - -/// Command ready to import the chain. -pub struct ParseAndPrepareImport<'a> { - params: ImportBlocksCmd, - version: &'a VersionInfo, -} - -/// Command to check a block. -pub struct CheckBlock<'a> { - params: CheckBlockCmd, - version: &'a VersionInfo, -} - -impl<'a> CheckBlock<'a> { - /// Runs the command and imports to the chain. - pub fn run_with_builder( - self, - builder: F, - spec_factory: S, - _exit: Exit, - ) -> error::Result<()> - where S: FnOnce(&str) -> Result>, String>, - F: FnOnce(Configuration) -> Result, - B: ServiceBuilderCommand, - <::Block as BlockT>::Hash: FromStr, - C: Default, - G: RuntimeGenesis, - E: ChainSpecExtension, - Exit: IntoExit - { - let mut config = create_config_with_db_path(spec_factory, &self.params.shared_params, self.version)?; - fill_import_params(&mut config, &self.params.import_params, sc_service::Roles::FULL)?; - - let input = if self.params.input.starts_with("0x") { &self.params.input[2..] } else { &self.params.input[..] }; - let block_id = match FromStr::from_str(input) { - Ok(hash) => BlockId::hash(hash), - Err(_) => match self.params.input.parse::() { - Ok(n) => BlockId::number((n as u32).into()), - Err(_) => return Err(error::Error::Input("Invalid hash or number specified".into())), - } - }; - - let start = std::time::Instant::now(); - let check = builder(config)? - .check_block(block_id) - .compat(); - let mut runtime = tokio::runtime::Runtime::new().unwrap(); - runtime.block_on(check)?; - println!("Completed in {} ms.", start.elapsed().as_millis()); - Ok(()) - } -} - -/// Command ready to purge the chain. -pub struct ParseAndPreparePurge<'a> { - params: PurgeChainCmd, - version: &'a VersionInfo, -} - -impl<'a> ParseAndPreparePurge<'a> { - /// Runs the command and purges the chain. - pub fn run( - self, - spec_factory: S - ) -> error::Result<()> where - S: FnOnce(&str) -> Result>, String>, - G: RuntimeGenesis, - E: ChainSpecExtension, - { - let config = create_config_with_db_path( - spec_factory, &self.params.shared_params, self.version - )?; - let db_path = match config.database { - DatabaseConfig::Path { path, .. } => path, - _ => { - eprintln!("Cannot purge custom database implementation"); - return Ok(()); - } - }; - - if !self.params.yes { - print!("Are you sure to remove {:?}? [y/N]: ", &db_path); - stdout().flush().expect("failed to flush stdout"); - - let mut input = String::new(); - stdin().read_line(&mut input)?; - let input = input.trim(); - - match input.chars().nth(0) { - Some('y') | Some('Y') => {}, - _ => { - println!("Aborted"); - return Ok(()); - }, - } - } - - match fs::remove_dir_all(&db_path) { - Result::Ok(_) => { - println!("{:?} removed.", &db_path); - Ok(()) - }, - Result::Err(ref err) if err.kind() == ErrorKind::NotFound => { - eprintln!("{:?} did not exist.", &db_path); - Ok(()) - }, - Result::Err(err) => Result::Err(err.into()) - } - } -} - -/// Command ready to revert the chain. -pub struct ParseAndPrepareRevert<'a> { - params: RevertCmd, - version: &'a VersionInfo, -} - -impl<'a> ParseAndPrepareRevert<'a> { - /// Runs the command and reverts the chain. - pub fn run_with_builder( - self, - builder: F, - spec_factory: S - ) -> error::Result<()> where - S: FnOnce(&str) -> Result>, String>, - F: FnOnce(Configuration) -> Result, - B: ServiceBuilderCommand, - <<<::Block as BlockT>::Header as HeaderT> - ::Number as FromStr>::Err: Debug, - C: Default, - G: RuntimeGenesis, - E: ChainSpecExtension, - { - let config = create_config_with_db_path( - spec_factory, &self.params.shared_params, self.version - )?; - let blocks = self.params.num.parse()?; - builder(config)?.revert_chain(blocks)?; - Ok(()) - } -} - /// Create a `NodeKeyConfig` from the given `NodeKeyParams` in the context /// of an optional network config storage directory. fn node_key_config

(params: NodeKeyParams, net_config_dir: &Option

) From dae1972ac67d28b9dc66608c746734e3be43e19e Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 20 Jan 2020 16:24:28 +0100 Subject: [PATCH 12/77] WIP --- bin/node/cli/src/cli.rs | 35 ++++++++++++++++++++++++++--------- client/cli/src/lib.rs | 4 ++-- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs index 30b943f0b65c4..5cd38806805be 100644 --- a/bin/node/cli/src/cli.rs +++ b/bin/node/cli/src/cli.rs @@ -15,20 +15,25 @@ // along with Substrate. If not, see . pub use sc_cli::VersionInfo; -use tokio::prelude::Future; use tokio::runtime::{Builder as RuntimeBuilder, Runtime}; use sc_cli::{IntoExit, NoCustom, SharedParams, ImportParams, error}; -use sc_service::{AbstractService, Roles as ServiceRoles, Configuration}; +use sc_service::{Roles as ServiceRoles, Configuration}; use log::info; use structopt::StructOpt; -use sc_cli::{display_role, CoreParams}; +use sc_cli::{CoreParams, RunCmd}; use crate::{service, ChainSpec, load_spec}; use crate::factory_impl::FactoryState; use node_transaction_factory::RuntimeAdapter; #[derive(Clone, Debug, StructOpt)] #[structopt(settings = &[structopt::clap::AppSettings::GlobalVersion, structopt::clap::AppSettings::ArgsNegateSubcommands, structopt::clap::AppSettings::SubcommandsNegateReqs])] -enum Cli { +struct Cli { + #[structopt(subcommand)] + subcommand: Option, +} + +#[derive(Clone, Debug, StructOpt)] +enum Subcommands { #[structopt(flatten)] SubstrateCli(CoreParams), /// The custom factory subcommmand for manufacturing transactions. @@ -85,14 +90,26 @@ pub struct FactoryCmd { /// Parse command line arguments into service configuration. pub fn run(args: I, version: sc_cli::VersionInfo) -> error::Result<()> where - I: IntoIterator, + I: Iterator, T: Into + Clone, { type Config = Configuration; - let opt = sc_cli::from_iter(args, &version); - match opt { - Cli::SubstrateCli(cli) => sc_cli::run( + let args: Vec<_> = args.collect(); + let opt = sc_cli::from_iter::(args.clone(), &version); + let subcommand = opt.subcommand.unwrap_or_else(|| { + let opt = sc_cli::from_iter::(args, &version); + + eprintln!( + "WARNING: running this command without the subcommand `run` is deprecated, please \ + use run:\n{} run [node_arguments]", + version.executable_name, + ); + Subcommands::SubstrateCli(CoreParams::Run(opt)) + }); + + match subcommand { + Subcommands::SubstrateCli(cli) => sc_cli::run( cli, service::new_light, service::new_full, @@ -101,7 +118,7 @@ where "substrate-node", &version, ), - Cli::Factory(cli_args) => { + Subcommands::Factory(cli_args) => { let mut config: Config<_, _> = sc_cli::create_config_with_db_path( load_spec, &cli_args.shared_params, diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 750c5ff2c5aa5..527bd53d75fc0 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -53,11 +53,11 @@ use structopt::{StructOpt, clap::AppSettings}; #[doc(hidden)] pub use structopt::clap::App; use params::{ - RunCmd, PurgeChainCmd, RevertCmd, ImportBlocksCmd, ExportBlocksCmd, BuildSpecCmd, + PurgeChainCmd, RevertCmd, ImportBlocksCmd, ExportBlocksCmd, BuildSpecCmd, NetworkConfigurationParams, TransactionPoolParams, NodeKeyParams, NodeKeyType, Cors, CheckBlockCmd, }; -pub use params::{NoCustom, CoreParams, SharedParams, ImportParams, ExecutionStrategy}; +pub use params::{NoCustom, CoreParams, SharedParams, ImportParams, ExecutionStrategy, RunCmd}; pub use traits::GetSharedParams; use app_dirs::{AppInfo, AppDataType}; use log::info; From 214076df2f60f3ec2ecb3577e7c349ea3c8172a4 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 20 Jan 2020 16:33:52 +0100 Subject: [PATCH 13/77] WIP --- client/cli/src/lib.rs | 45 +++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 527bd53d75fc0..8c5b4d41cfd13 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -251,20 +251,7 @@ where CoreParams::Run(_params) => { let config = get_config(&core_params, spec_factory, impl_name, &version)?; - info!("{}", version.name); - info!(" version {}", config.full_version()); - info!(" by {}, 2017, 2018", version.author); - info!("Chain specification: {}", config.chain_spec.name()); - info!("Node name: {}", config.name); - info!("Roles: {}", display_role(&config)); - match config.roles { - ServiceRoles::LIGHT => run_service_until_exit( - new_light(config)?, - ), - _ => run_service_until_exit( - new_full(config)?, - ), - } + run_node(config, new_light, new_full, &version) }, CoreParams::BuildSpec(params) => { info!("Building chain spec"); @@ -418,6 +405,36 @@ where Ok(()) } +pub fn run_node( + config: Configuration, + new_light: F2, + new_full: F3, + version: &VersionInfo, +) -> error::Result<()> +where + F2: FnOnce(Configuration) -> Result, + F3: FnOnce(Configuration) -> Result, + G: RuntimeGenesis, + E: ChainSpecExtension, + T1: AbstractService + std::marker::Unpin, + T2: AbstractService + std::marker::Unpin, +{ + info!("{}", version.name); + info!(" version {}", config.full_version()); + info!(" by {}, 2017, 2018", version.author); + info!("Chain specification: {}", config.chain_spec.name()); + info!("Node name: {}", config.name); + info!("Roles: {}", display_role(&config)); + match config.roles { + ServiceRoles::LIGHT => run_service_until_exit( + new_light(config)?, + ), + _ => run_service_until_exit( + new_full(config)?, + ), + } +} + struct Runtime(F) where F: Future> + future::FusedFuture + Unpin, From f98c3a40dd76b809364306946c1b9410ea09f01b Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 20 Jan 2020 17:21:59 +0100 Subject: [PATCH 14/77] WIP --- Cargo.lock | 1 + bin/node-template/Cargo.toml | 1 + bin/node-template/src/cli.rs | 50 +++++++++++++++++++++++--------- bin/node-template/src/main.rs | 4 +-- bin/node-template/src/service.rs | 4 +-- bin/node/cli/src/cli.rs | 1 - client/cli/src/lib.rs | 9 +++--- 7 files changed, 46 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1317241728143..3b5b52d4ea39a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3258,6 +3258,7 @@ dependencies = [ "sp-io 2.0.0", "sp-runtime 2.0.0", "sp-transaction-pool 2.0.0", + "structopt 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-build-script-utils 2.0.0", "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", "trie-root 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/bin/node-template/Cargo.toml b/bin/node-template/Cargo.toml index 88daa09ede6e0..605794cadf432 100644 --- a/bin/node-template/Cargo.toml +++ b/bin/node-template/Cargo.toml @@ -35,6 +35,7 @@ sc-client = { version = "2.0.0", path = "../../client/" } node-template-runtime = { version = "2.0.0", path = "runtime" } sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } sc-basic-authority = { path = "../../client/basic-authorship" } +structopt = "=0.3.8" [build-dependencies] vergen = "3.0.4" diff --git a/bin/node-template/src/cli.rs b/bin/node-template/src/cli.rs index 909bbc8884905..bf7c90890d637 100644 --- a/bin/node-template/src/cli.rs +++ b/bin/node-template/src/cli.rs @@ -1,27 +1,49 @@ use crate::service; -use futures::{future::{select, Map}, FutureExt, TryFutureExt, channel::oneshot, compat::Future01CompatExt}; -use std::cell::RefCell; -use tokio::runtime::Runtime; -pub use sc_cli::{VersionInfo, IntoExit, error}; -use sc_cli::{display_role, informant, parse_and_prepare, ParseAndPrepare, NoCustom, CoreParams}; +pub use sc_cli::{VersionInfo, error}; +use sc_cli::{CoreParams, RunCmd}; use sc_service::{AbstractService, Roles as ServiceRoles, Configuration}; +use structopt::StructOpt; use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair}; use crate::chain_spec; use log::info; +#[derive(Clone, Debug, StructOpt)] +#[structopt(settings = &[structopt::clap::AppSettings::GlobalVersion, structopt::clap::AppSettings::ArgsNegateSubcommands, structopt::clap::AppSettings::SubcommandsNegateReqs])] +struct Cli { + #[structopt(subcommand)] + subcommand: Option, +} + /// Parse command line arguments into service configuration. -pub fn run(args: I, version: VersionInfo) -> error::Result<()> where - I: IntoIterator, +pub fn run(args: I, version: VersionInfo) -> error::Result<()> +where + I: Iterator, T: Into + Clone, - E: IntoExit, { - let opt = CoreParams::from_iter(args); - todo!(); - /* - type Config = Configuration<(), T>; + type Config = Configuration; + + let args: Vec<_> = args.collect(); + let opt = sc_cli::from_iter::(args.clone(), &version); + let subcommand = opt.subcommand.unwrap_or_else(|| { + let opt = sc_cli::from_iter::(args, &version); + + eprintln!( + "WARNING: running this command without the subcommand `run` is deprecated, please \ + use run:\n{} run [node_arguments]", + version.executable_name, + ); + CoreParams::Run(opt) + }); - Ok(()) - */ + sc_cli::run( + subcommand, + service::new_light, + service::new_full, + load_spec, + |config: Config<_, _>| Ok(new_full_start!(config).0), + "substrate-node", + &version, + ) } fn load_spec(id: &str) -> Result, String> { diff --git a/bin/node-template/src/main.rs b/bin/node-template/src/main.rs index 2942bb68a37aa..da6a6b1bf9471 100644 --- a/bin/node-template/src/main.rs +++ b/bin/node-template/src/main.rs @@ -8,7 +8,7 @@ mod chain_spec; mod service; mod cli; -pub use sc_cli::{VersionInfo, IntoExit, error}; +pub use sc_cli::{VersionInfo, error}; fn main() -> Result<(), cli::error::Error> { let version = VersionInfo { @@ -21,5 +21,5 @@ fn main() -> Result<(), cli::error::Error> { support_url: "support.anonymous.an", }; - cli::run(std::env::args(), cli::Exit, version) + cli::run(std::env::args(), version) } diff --git a/bin/node-template/src/service.rs b/bin/node-template/src/service.rs index 92db95b5c7d89..30753b2a1506b 100644 --- a/bin/node-template/src/service.rs +++ b/bin/node-template/src/service.rs @@ -80,7 +80,7 @@ macro_rules! new_full_start { } /// Builds a new service for a full client. -pub fn new_full(config: Configuration) +pub fn new_full(config: Configuration) -> Result { let is_authority = config.roles.is_authority(); @@ -195,7 +195,7 @@ pub fn new_full(config: Configuration(config: Configuration) +pub fn new_light(config: Configuration) -> Result { let inherent_data_providers = InherentDataProviders::new(); diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs index 5cd38806805be..bb9c82d87c2b5 100644 --- a/bin/node/cli/src/cli.rs +++ b/bin/node/cli/src/cli.rs @@ -149,5 +149,4 @@ where Ok(()) }, } - } diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 8c5b4d41cfd13..eef8b814a4237 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -44,25 +44,24 @@ use sp_core::H256; use std::{ io::{Write, Read, Seek, Cursor, stdin, stdout, ErrorKind}, iter, fmt::Debug, fs::{self, File}, - net::{Ipv4Addr, SocketAddr}, path::{Path, PathBuf}, str::FromStr, pin::Pin, task::Poll + net::{Ipv4Addr, SocketAddr}, path::{Path, PathBuf}, str::FromStr }; use names::{Generator, Name}; use regex::Regex; -use structopt::{StructOpt, clap::AppSettings}; +use structopt::StructOpt; #[doc(hidden)] pub use structopt::clap::App; use params::{ - PurgeChainCmd, RevertCmd, ImportBlocksCmd, ExportBlocksCmd, BuildSpecCmd, NetworkConfigurationParams, TransactionPoolParams, - NodeKeyParams, NodeKeyType, Cors, CheckBlockCmd, + NodeKeyParams, NodeKeyType, Cors, }; pub use params::{NoCustom, CoreParams, SharedParams, ImportParams, ExecutionStrategy, RunCmd}; pub use traits::GetSharedParams; use app_dirs::{AppInfo, AppDataType}; use log::info; use lazy_static::lazy_static; -use futures::{Future, compat::Future01CompatExt, executor::block_on, future, future::FutureExt}; +use futures::{Future, compat::Future01CompatExt, future, future::FutureExt}; use sc_telemetry::TelemetryEndpoints; use sp_runtime::generic::BlockId; use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; From 963d33a6ab0e70d4e61783cccb0f0e01f8307421 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 20 Jan 2020 17:40:39 +0100 Subject: [PATCH 15/77] WIP --- primitives/keyring/src/sr25519.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/primitives/keyring/src/sr25519.rs b/primitives/keyring/src/sr25519.rs index dbc22bac97b5d..1ebe3f4e80cac 100644 --- a/primitives/keyring/src/sr25519.rs +++ b/primitives/keyring/src/sr25519.rs @@ -125,8 +125,18 @@ impl std::fmt::Display for ParseKeyringError { impl std::str::FromStr for Keyring { type Err = ParseKeyringError; - fn from_str(_: &str) -> Result::Err> { - todo!(); + fn from_str(s: &str) -> Result::Err> { + match s { + "alice" => Keyring::Alice, + "bob" => Keyring::Bob, + "charlie" => Keyring::Charlie, + "dave" => Keyring::Dave, + "eve" => Keyring::Eve, + "ferdie" => Keyring::Ferdie, + "one" => Keyring::One, + "two" => Keyring::Two, + _ => Err(ParseKeyringError) + } } } From 3a1bc54848474597246158679e63b99395c903cd Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 20 Jan 2020 17:41:43 +0100 Subject: [PATCH 16/77] WIP --- primitives/keyring/src/sr25519.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/primitives/keyring/src/sr25519.rs b/primitives/keyring/src/sr25519.rs index 1ebe3f4e80cac..d3776f40731e2 100644 --- a/primitives/keyring/src/sr25519.rs +++ b/primitives/keyring/src/sr25519.rs @@ -127,14 +127,14 @@ impl std::str::FromStr for Keyring { fn from_str(s: &str) -> Result::Err> { match s { - "alice" => Keyring::Alice, - "bob" => Keyring::Bob, - "charlie" => Keyring::Charlie, - "dave" => Keyring::Dave, - "eve" => Keyring::Eve, - "ferdie" => Keyring::Ferdie, - "one" => Keyring::One, - "two" => Keyring::Two, + "alice" => Ok(Keyring::Alice), + "bob" => Ok(Keyring::Bob), + "charlie" => Ok(Keyring::Charlie), + "dave" => Ok(Keyring::Dave), + "eve" => Ok(Keyring::Eve), + "ferdie" => Ok(Keyring::Ferdie), + "one" => Ok(Keyring::One), + "two" => Ok(Keyring::Two), _ => Err(ParseKeyringError) } } From fda5a4c2cb2005ccd00cee93e69797991817ac0f Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 20 Jan 2020 17:52:06 +0100 Subject: [PATCH 17/77] WIP --- client/cli/src/lib.rs | 10 +++++----- client/service/test/src/lib.rs | 27 +++++++++++++-------------- utils/browser/src/lib.rs | 5 ++--- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index eef8b814a4237..f533ac44e3901 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -1188,7 +1188,7 @@ mod tests { run_cmds.shared_params.base_path = Some(PathBuf::from("/test/path")); run_cmds.keystore_path = keystore_path.clone().map(PathBuf::from); - let node_config = create_run_node_config::<(), _, _, _>( + let node_config = create_run_node_config( run_cmds.clone(), |_| Ok(Some(chain_spec.clone())), "test", @@ -1228,14 +1228,14 @@ mod tests { let spec_factory = |_: &str| Ok(Some(chain_spec.clone())); let args = vec!["substrate", "run", "--dev", "--state-cache-size=42"]; - let pnp = parse_and_prepare(&version, "test", args); - let config = pnp.into_configuration::<(), _, _, _>(spec_factory).unwrap().unwrap(); + let core_params = from_iter(args, &version); + let config = get_config(&core_params, spec_factory, "substrate", &version).unwrap(); assert_eq!(config.roles, sc_service::Roles::AUTHORITY); assert_eq!(config.state_cache_size, 42); let args = vec!["substrate", "import-blocks", "--dev"]; - let pnp = parse_and_prepare(&version, "test", args); - let config = pnp.into_configuration::<(), _, _, _>(spec_factory).unwrap().unwrap(); + let core_params = from_iter(args, &version); + let config = get_config(&core_params, spec_factory, "substrate", &version).unwrap(); assert_eq!(config.roles, sc_service::Roles::FULL); } } diff --git a/client/service/test/src/lib.rs b/client/service/test/src/lib.rs index 06a1edd189a29..b63bea4872324 100644 --- a/client/service/test/src/lib.rs +++ b/client/service/test/src/lib.rs @@ -133,7 +133,7 @@ fn node_config ( key_seed: Option, base_port: u16, root: &TempDir, -) -> Configuration<(), G, E> +) -> Configuration { let root = root.path().join(format!("node-{}", index)); @@ -186,7 +186,6 @@ fn node_config ( state_cache_child_ratio: None, pruning: Default::default(), chain_spec: (*spec).clone(), - custom: Default::default(), name: format!("Node {}", index), wasm_method: sc_service::config::WasmExecutionMethod::Interpreted, execution_strategies: Default::default(), @@ -216,11 +215,11 @@ impl TestNet where fn new( temp: &TempDir, spec: ChainSpec, - full: impl Iterator) -> Result<(F, U), Error>>, - light: impl Iterator) -> Result>, + full: impl Iterator) -> Result<(F, U), Error>>, + light: impl Iterator) -> Result>, authorities: impl Iterator) -> Result<(F, U), Error> + impl FnOnce(Configuration) -> Result<(F, U), Error> )>, base_port: u16 ) -> TestNet { @@ -243,9 +242,9 @@ impl TestNet where fn insert_nodes( &mut self, temp: &TempDir, - full: impl Iterator) -> Result<(F, U), Error>>, - light: impl Iterator) -> Result>, - authorities: impl Iterator) -> Result<(F, U), Error>)> + full: impl Iterator) -> Result<(F, U), Error>>, + light: impl Iterator) -> Result>, + authorities: impl Iterator) -> Result<(F, U), Error>)> ) { let executor = self.runtime.executor(); @@ -303,9 +302,9 @@ pub fn connectivity( light_builder: Lb, ) where E: Clone, - Fb: Fn(Configuration<(), G, E>) -> Result, + Fb: Fn(Configuration) -> Result, F: AbstractService, - Lb: Fn(Configuration<(), G, E>) -> Result, + Lb: Fn(Configuration) -> Result, L: AbstractService, { const NUM_FULL_NODES: usize = 5; @@ -402,9 +401,9 @@ pub fn sync( mut make_block_and_import: B, mut extrinsic_factory: ExF ) where - Fb: Fn(Configuration<(), G, E>) -> Result<(F, U), Error>, + Fb: Fn(Configuration) -> Result<(F, U), Error>, F: AbstractService, - Lb: Fn(Configuration<(), G, E>) -> Result, + Lb: Fn(Configuration) -> Result, L: AbstractService, B: FnMut(&F, &mut U), ExF: FnMut(&F, &U) -> ::Extrinsic, @@ -471,9 +470,9 @@ pub fn consensus( light_builder: Lb, authorities: impl IntoIterator ) where - Fb: Fn(Configuration<(), G, E>) -> Result, + Fb: Fn(Configuration) -> Result, F: AbstractService, - Lb: Fn(Configuration<(), G, E>) -> Result, + Lb: Fn(Configuration) -> Result, L: AbstractService, E: Clone, { diff --git a/utils/browser/src/lib.rs b/utils/browser/src/lib.rs index e404c6612906c..dd632760d816a 100644 --- a/utils/browser/src/lib.rs +++ b/utils/browser/src/lib.rs @@ -37,12 +37,11 @@ pub use console_log::init_with_level as init_console_log; /// Create a service configuration from a chain spec and the websocket transport. /// /// This configuration contains good defaults for a browser light client. -pub async fn browser_configuration( +pub async fn browser_configuration( transport: Transport, chain_spec: ChainSpec, -) -> Result, Box> +) -> Result, Box> where - C: Default, G: RuntimeGenesis, E: Extension, { From 4eb321316357c8744053db61eb3392b6994c5f26 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Tue, 21 Jan 2020 11:19:01 +0100 Subject: [PATCH 18/77] WIP --- Cargo.lock | 50 --------------------- client/cli/Cargo.toml | 2 +- client/cli/src/lib.rs | 102 ++++++++++++++++++++++-------------------- 3 files changed, 54 insertions(+), 100 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3b5b52d4ea39a..1268ef5701aa2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2926,17 +2926,6 @@ dependencies = [ "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "mio-named-pipes" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "mio-uds" version = "0.6.7" @@ -2958,15 +2947,6 @@ dependencies = [ "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "miow" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "more-asserts" version = "0.2.1" @@ -6163,17 +6143,6 @@ dependencies = [ "subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "socket2" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "soketto" version = "0.3.1" @@ -7254,19 +7223,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "mio-named-pipes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", "pin-project-lite 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-macros 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -7338,15 +7301,6 @@ dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "tokio-macros" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "tokio-reactor" version = "0.1.11" @@ -8562,10 +8516,8 @@ dependencies = [ "checksum miniz_oxide 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6f3f74f726ae935c3f514300cc6773a0c9492abc5e972d42ba0c0ebb88757625" "checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" "checksum mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" -"checksum mio-named-pipes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f5e374eff525ce1c5b7687c4cef63943e7686524a387933ad27ca7ec43779cb3" "checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "396aa0f2003d7df8395cb93e09871561ccc3e785f0acb369170e8cc74ddf9226" "checksum more-asserts 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" "checksum multimap 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb04b9f127583ed176e163fb9ec6f3e793b87e21deedd5734a69386a18a0151" "checksum multistream-select 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f938ffe420493e77c8b6cbcc3f282283f68fc889c5dcbc8e51668d5f3a01ad94" @@ -8722,7 +8674,6 @@ dependencies = [ "checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" "checksum smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ecf3b85f68e8abaa7555aa5abdb1153079387e60b718283d732f03897fcfc86" "checksum snow 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "afb767eee7d257ba202f0b9b08673bc13b22281632ef45267b19f13100accd2f" -"checksum socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85" "checksum soketto 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3caa0ad6b765419f21e4cfa490ec7514a9fae4af986adef168a69477ba528671" "checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" "checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" @@ -8769,7 +8720,6 @@ dependencies = [ "checksum tokio-executor 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee9ceecf69145923834ea73f32ba40c790fd877b74a7817dd0b089f1eb9c7c8" "checksum tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "3fe6dc22b08d6993916647d108a1a7d15b9cd29c4f4496c62b92c45b5041b7af" "checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" -"checksum tokio-macros 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "50a61f268a3db2acee8dcab514efc813dc6dbe8a00e86076f935f94304b59a7a" "checksum tokio-reactor 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "6732fe6b53c8d11178dcb77ac6d9682af27fc6d4cb87789449152e5377377146" "checksum tokio-rustls 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1df2fa53ac211c136832f530ccb081af9af891af22d685a9493e232c7a359bc2" "checksum tokio-sync 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "d06554cce1ae4a50f42fba8023918afa931413aded705b560e29600ccf7c6d76" diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml index 50aa220d6d044..53db5e0db18b4 100644 --- a/client/cli/Cargo.toml +++ b/client/cli/Cargo.toml @@ -16,7 +16,7 @@ time = "0.1.42" ansi_term = "0.12.1" lazy_static = "1.4.0" app_dirs = "1.2.1" -tokio = { version = "0.2.9", features = [ "full" ] } +tokio = { version = "0.2.9", features = [ "signal" ] } futures = { version = "0.3.1", features = ["compat"] } fdlimit = "0.1.1" serde_json = "1.0.41" diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index f533ac44e3901..d5e03ecc0131b 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -213,29 +213,28 @@ where T::from_clap(&app.get_matches_from(iter)) } -pub fn run( +pub fn run( core_params: CoreParams, - new_light: F2, - new_full: F3, + new_light: FNL, + new_full: FNF, spec_factory: F, - builder: F4, + builder: B, impl_name: &'static str, version: &VersionInfo, ) -> error::Result<()> where F: FnOnce(&str) -> Result>, String>, - F2: FnOnce(Configuration) -> Result, - F3: FnOnce(Configuration) -> Result, - F4: FnOnce(Configuration) -> Result, + FNL: FnOnce(Configuration) -> Result, + FNF: FnOnce(Configuration) -> Result, + B: FnOnce(Configuration) -> Result, G: RuntimeGenesis, E: ChainSpecExtension, - T1: AbstractService + std::marker::Unpin, - T2: AbstractService + std::marker::Unpin, - T3: ServiceBuilderCommand + std::marker::Unpin, - T5: sp_runtime::traits::Block + Debug, - <<::Header as sp_runtime::traits::Header>::Number as - std::str::FromStr>::Err: std::fmt::Debug, - ::Hash: std::str::FromStr, + SL: AbstractService + Unpin, + SF: AbstractService + Unpin, + BC: ServiceBuilderCommand + Unpin, + BB: sp_runtime::traits::Block + Debug, + <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, + ::Hash: std::str::FromStr, { let full_version = sc_service::config::full_version_from_strs( version.version, @@ -342,11 +341,12 @@ where }; let start = std::time::Instant::now(); - let check = builder(config)? + let f = builder(config)? .check_block(block_id) .compat(); - let mut runtime = tokio::runtime::Runtime::new().unwrap(); - runtime.block_on(check)?; + let f = f.fuse(); + pin_mut!(f); + run_until_exit(f)?; println!("Completed in {} ms.", start.elapsed().as_millis()); Ok(()) @@ -415,8 +415,8 @@ where F3: FnOnce(Configuration) -> Result, G: RuntimeGenesis, E: ChainSpecExtension, - T1: AbstractService + std::marker::Unpin, - T2: AbstractService + std::marker::Unpin, + T1: AbstractService + Unpin, + T2: AbstractService + Unpin, { info!("{}", version.name); info!(" version {}", config.full_version()); @@ -441,57 +441,61 @@ where impl Runtime where - F: Future> + future::FusedFuture + Unpin, + F: Future> + future::FusedFuture + Unpin, E: std::error::Error, { - #[tokio::main] - async fn run(self) -> Result<(), Box> - { + async fn main(self) -> Result<(), Box> + { use tokio::signal::unix::{signal, SignalKind}; - let mut stream_int = signal(SignalKind::interrupt())?; - let mut stream_term = signal(SignalKind::terminate())?; + let mut stream_int = signal(SignalKind::interrupt())?; + let mut stream_term = signal(SignalKind::terminate())?; - let t1 = stream_int.recv().fuse(); - let t2 = stream_term.recv().fuse(); - let mut t3 = self.0; + let t1 = stream_int.recv().fuse(); + let t2 = stream_term.recv().fuse(); + let mut t3 = self.0; - pin_mut!(t1, t2); + pin_mut!(t1, t2); - select! { - _ = t1 => println!("Caught SIGINT"), - _ = t2 => println!("Caught SIGTERM"), - res = t3 => res?, - } + select! { + _ = t1 => println!("Caught SIGINT"), + _ = t2 => println!("Caught SIGTERM"), + res = t3 => res?, + } + + Ok(()) + } - Ok(()) - } + fn run(self) -> Result<(), Box> { + let mut r = tokio::runtime::Runtime::new()?; + r.block_on(self.main()) + } } -fn run_service_until_exit( - service: T, +pub fn run_until_exit( + future: F, ) -> error::Result<()> where - T: AbstractService + std::marker::Unpin, + F: Future> + future::FusedFuture + Unpin, + E: 'static + std::error::Error, { - // we eagerly drop the service so that the internal exit future is fired, - // but we need to keep holding a reference to the global telemetry guard - let _telemetry = service.telemetry(); - - let runtime = Runtime(service.compat().fuse()); + let runtime = Runtime(future); runtime.run().map_err(|e| e.to_string())?; Ok(()) } -fn run_until_exit( - future: F, +pub fn run_service_until_exit( + service: T, ) -> error::Result<()> where - F: Future> + future::FusedFuture + Unpin, - E: std::error::Error + T: AbstractService + Unpin, { - let runtime = Runtime(future); + // we eagerly drop the service so that the internal exit future is fired, + // but we need to keep holding a reference to the global telemetry guard + let _telemetry = service.telemetry(); + + let runtime = Runtime(service.compat().fuse()); runtime.run().map_err(|e| e.to_string())?; Ok(()) From b67f970dea550790b83eaa55c12a28b631324313 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Tue, 21 Jan 2020 11:21:40 +0100 Subject: [PATCH 19/77] WIP --- bin/node/cli/src/cli.rs | 2 +- client/cli/src/lib.rs | 10 +--------- client/cli/src/params.rs | 21 --------------------- 3 files changed, 2 insertions(+), 31 deletions(-) diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs index bb9c82d87c2b5..9e47ed35fbacc 100644 --- a/bin/node/cli/src/cli.rs +++ b/bin/node/cli/src/cli.rs @@ -16,7 +16,7 @@ pub use sc_cli::VersionInfo; use tokio::runtime::{Builder as RuntimeBuilder, Runtime}; -use sc_cli::{IntoExit, NoCustom, SharedParams, ImportParams, error}; +use sc_cli::{SharedParams, ImportParams, error}; use sc_service::{Roles as ServiceRoles, Configuration}; use log::info; use structopt::StructOpt; diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index d5e03ecc0131b..16985ac23b96e 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -56,7 +56,7 @@ use params::{ NetworkConfigurationParams, TransactionPoolParams, NodeKeyParams, NodeKeyType, Cors, }; -pub use params::{NoCustom, CoreParams, SharedParams, ImportParams, ExecutionStrategy, RunCmd}; +pub use params::{CoreParams, SharedParams, ImportParams, ExecutionStrategy, RunCmd}; pub use traits::GetSharedParams; use app_dirs::{AppInfo, AppDataType}; use log::info; @@ -102,14 +102,6 @@ pub struct VersionInfo { pub support_url: &'static str, } -/// Something that can be converted into an exit signal. -pub trait IntoExit { - /// Exit signal type. - type Exit: Future + Unpin + Send + 'static; - /// Convert into exit signal. - fn into_exit(self) -> Self::Exit; -} - fn get_chain_key(cli: &SharedParams) -> String { match cli.chain { Some(ref chain) => chain.clone(), diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 313350364f733..92c9374991838 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -869,24 +869,3 @@ impl CoreParams { } } } - -/// A special commandline parameter that expands to nothing. -/// Should be used as custom subcommand/run arguments if no custom values are required. -#[derive(Clone, Debug, Default)] -pub struct NoCustom {} - -impl StructOpt for NoCustom { - fn clap<'a, 'b>() -> App<'a, 'b> { - App::new("NoCustom") - } - - fn from_clap(_: &::structopt::clap::ArgMatches) -> Self { - NoCustom {} - } -} - -impl GetSharedParams for NoCustom { - fn shared_params(&self) -> Option<&SharedParams> { - None - } -} From ca93dc73d3c016d5cf14b302f40f713c89028710 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Tue, 21 Jan 2020 12:36:19 +0100 Subject: [PATCH 20/77] WIP --- bin/node-template/src/cli.rs | 30 ++++-------------------------- bin/node/cli/src/cli.rs | 34 ++++++++++++++-------------------- client/cli/src/lib.rs | 31 +++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 46 deletions(-) diff --git a/bin/node-template/src/cli.rs b/bin/node-template/src/cli.rs index bf7c90890d637..3ef4a547c5785 100644 --- a/bin/node-template/src/cli.rs +++ b/bin/node-template/src/cli.rs @@ -1,18 +1,8 @@ use crate::service; pub use sc_cli::{VersionInfo, error}; -use sc_cli::{CoreParams, RunCmd}; -use sc_service::{AbstractService, Roles as ServiceRoles, Configuration}; -use structopt::StructOpt; +use sc_cli::CoreParams; use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair}; use crate::chain_spec; -use log::info; - -#[derive(Clone, Debug, StructOpt)] -#[structopt(settings = &[structopt::clap::AppSettings::GlobalVersion, structopt::clap::AppSettings::ArgsNegateSubcommands, structopt::clap::AppSettings::SubcommandsNegateReqs])] -struct Cli { - #[structopt(subcommand)] - subcommand: Option, -} /// Parse command line arguments into service configuration. pub fn run(args: I, version: VersionInfo) -> error::Result<()> @@ -20,27 +10,15 @@ where I: Iterator, T: Into + Clone, { - type Config = Configuration; - let args: Vec<_> = args.collect(); - let opt = sc_cli::from_iter::(args.clone(), &version); - let subcommand = opt.subcommand.unwrap_or_else(|| { - let opt = sc_cli::from_iter::(args, &version); - - eprintln!( - "WARNING: running this command without the subcommand `run` is deprecated, please \ - use run:\n{} run [node_arguments]", - version.executable_name, - ); - CoreParams::Run(opt) - }); + let core_params = sc_cli::from_iter::(args.clone(), &version); sc_cli::run( - subcommand, + core_params, service::new_light, service::new_full, load_spec, - |config: Config<_, _>| Ok(new_full_start!(config).0), + |config: _| Ok(new_full_start!(config).0), "substrate-node", &version, ) diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs index 9e47ed35fbacc..39826e678a8e4 100644 --- a/bin/node/cli/src/cli.rs +++ b/bin/node/cli/src/cli.rs @@ -27,13 +27,7 @@ use node_transaction_factory::RuntimeAdapter; #[derive(Clone, Debug, StructOpt)] #[structopt(settings = &[structopt::clap::AppSettings::GlobalVersion, structopt::clap::AppSettings::ArgsNegateSubcommands, structopt::clap::AppSettings::SubcommandsNegateReqs])] -struct Cli { - #[structopt(subcommand)] - subcommand: Option, -} - -#[derive(Clone, Debug, StructOpt)] -enum Subcommands { +enum Cli { #[structopt(flatten)] SubstrateCli(CoreParams), /// The custom factory subcommmand for manufacturing transactions. @@ -96,20 +90,20 @@ where type Config = Configuration; let args: Vec<_> = args.collect(); - let opt = sc_cli::from_iter::(args.clone(), &version); - let subcommand = opt.subcommand.unwrap_or_else(|| { - let opt = sc_cli::from_iter::(args, &version); - - eprintln!( - "WARNING: running this command without the subcommand `run` is deprecated, please \ - use run:\n{} run [node_arguments]", - version.executable_name, - ); - Subcommands::SubstrateCli(CoreParams::Run(opt)) - }); + let subcommand = match sc_cli::try_from_iter::(args.clone(), &version) { + Ok(opt) => { + eprintln!( + "WARNING: running this command without the subcommand `run` is deprecated, please \ + use run:\n{} run [node_arguments]", + version.executable_name, + ); + Cli::SubstrateCli(CoreParams::Run(opt)) + }, + Err(_) => sc_cli::from_iter::(args.clone(), &version), + }; match subcommand { - Subcommands::SubstrateCli(cli) => sc_cli::run( + Cli::SubstrateCli(cli) => sc_cli::run( cli, service::new_light, service::new_full, @@ -118,7 +112,7 @@ where "substrate-node", &version, ), - Subcommands::Factory(cli_args) => { + Cli::Factory(cli_args) => { let mut config: Config<_, _> = sc_cli::create_config_with_db_path( load_spec, &cli_args.shared_params, diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 16985ac23b96e..8e3bc5ee025d8 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -205,6 +205,37 @@ where T::from_clap(&app.get_matches_from(iter)) } +/// Gets the struct from any iterator such as a `Vec` of your making. +/// Print the error message and quit the program in case of failure. +/// +/// **NOTE:** This method WILL NOT exit when `--help` or `--version` (or short versions) are +/// used. It will return a [`clap::Error`], where the [`kind`] is a +/// [`ErrorKind::HelpDisplayed`] or [`ErrorKind::VersionDisplayed`] respectively. You must call +/// [`Error::exit`] or perform a [`std::process::exit`]. +pub fn try_from_iter(iter: I, version: &VersionInfo) -> structopt::clap::Result +where + T: StructOpt + Sized, + I: IntoIterator, + I::Item: Into + Clone, +{ + let app = T::clap(); + + let mut full_version = sc_service::config::full_version_from_strs( + version.version, + version.commit + ); + full_version.push_str("\n"); + + let app = app + .name(version.executable_name) + .author(version.author) + .about(version.description) + .version(full_version.as_str()); + + let matches = app.get_matches_from_safe(iter)?; + + Ok(T::from_clap(&matches)) +} pub fn run( core_params: CoreParams, new_light: FNL, From 102506145b237d4a219aadb6ae4e90e74b65986b Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 22 Jan 2020 14:10:40 +0100 Subject: [PATCH 21/77] WIP --- bin/node/cli/src/cli.rs | 13 +-- client/cli/src/lib.rs | 199 ++++++++++------------------------ client/service/src/builder.rs | 18 +-- client/service/src/config.rs | 21 ++-- 4 files changed, 83 insertions(+), 168 deletions(-) diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs index 39826e678a8e4..3a98e1812d705 100644 --- a/bin/node/cli/src/cli.rs +++ b/bin/node/cli/src/cli.rs @@ -102,6 +102,9 @@ where Err(_) => sc_cli::from_iter::(args.clone(), &version), }; + let mut config = sc_service::Configuration::default(); + config.impl_name = "substrate-node"; + match subcommand { Cli::SubstrateCli(cli) => sc_cli::run( cli, @@ -109,19 +112,15 @@ where service::new_full, load_spec, |config: Config<_, _>| Ok(new_full_start!(config).0), - "substrate-node", + config, &version, ), Cli::Factory(cli_args) => { - let mut config: Config<_, _> = sc_cli::create_config_with_db_path( - load_spec, - &cli_args.shared_params, - &version, - )?; + sc_cli::init(&mut config, load_spec, &cli_args.shared_params, &version); sc_cli::fill_import_params(&mut config, &cli_args.import_params, ServiceRoles::FULL)?; - match ChainSpec::from(config.chain_spec.id()) { + match ChainSpec::from(config.expect_chain_spec().id()) { Some(ref c) if c == &ChainSpec::Development || c == &ChainSpec::LocalTestnet => {}, _ => panic!("Factory is only supported for development and local testnet."), } diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 8e3bc5ee025d8..ed5cb6ae86a6b 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -49,7 +49,7 @@ use std::{ use names::{Generator, Name}; use regex::Regex; -use structopt::StructOpt; +pub use structopt::StructOpt; #[doc(hidden)] pub use structopt::clap::App; use params::{ @@ -236,13 +236,14 @@ where Ok(T::from_clap(&matches)) } + pub fn run( core_params: CoreParams, new_light: FNL, new_full: FNF, spec_factory: F, builder: B, - impl_name: &'static str, + mut config: Configuration, version: &VersionInfo, ) -> error::Result<()> where @@ -259,35 +260,28 @@ where <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, ::Hash: std::str::FromStr, { - let full_version = sc_service::config::full_version_from_strs( - version.version, - version.commit - ); - sp_panic_handler::set(version.support_url, &full_version); + init(&mut config, spec_factory, core_params.get_shared_params(), version)?; - fdlimit::raise_fd_limit(); - init_logger(core_params.get_shared_params().log.as_ref().map(|v| v.as_ref()).unwrap_or("")); + assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing"); match &core_params { - CoreParams::Run(_params) => { - let config = get_config(&core_params, spec_factory, impl_name, &version)?; + CoreParams::Run(params) => { + update_config_for_running_node( + &mut config, + params.clone(), + )?; run_node(config, new_light, new_full, &version) }, CoreParams::BuildSpec(params) => { info!("Building chain spec"); + let mut spec = config.expect_chain_spec().clone(); let raw_output = params.raw; - let mut spec = load_spec(¶ms.shared_params, spec_factory)?; if spec.boot_nodes().is_empty() && !params.disable_default_bootnode { - let cfg = create_build_spec_config( - &spec, - ¶ms.shared_params, - version, - )?; let node_key = node_key_config( params.node_key_params.clone(), - &Some(cfg.in_chain_config_dir(DEFAULT_NETWORK_CONFIG_PATH).expect("We provided a base_path")) + &Some(config.in_chain_config_dir(DEFAULT_NETWORK_CONFIG_PATH).expect("We provided a base_path")), )?; let keys = node_key.into_keypair()?; let peer_id = keys.public().into_peer_id(); @@ -306,8 +300,6 @@ where Ok(()) }, CoreParams::ExportBlocks(params) => { - let config = get_config(&core_params, spec_factory, impl_name, &version)?; - if let DatabaseConfig::Path { ref path, .. } = &config.database { info!("DB path: {}", path.display()); } @@ -330,7 +322,6 @@ where run_until_exit(f) }, CoreParams::ImportBlocks(params) => { - let mut config = get_config(&core_params, spec_factory, impl_name, &version)?; fill_import_params(&mut config, ¶ms.import_params, sc_service::Roles::FULL)?; let file: Box = match ¶ms.input { @@ -351,7 +342,6 @@ where run_until_exit(f) }, CoreParams::CheckBlock(params) => { - let mut config = get_config(&core_params, spec_factory, impl_name, &version)?; fill_import_params(&mut config, ¶ms.import_params, sc_service::Roles::FULL)?; let input = if params.input.starts_with("0x") { ¶ms.input[2..] } else { ¶ms.input[..] }; @@ -375,8 +365,6 @@ where Ok(()) }, CoreParams::PurgeChain(params) => { - let config = get_config(&core_params, spec_factory, impl_name, &version)?; - let db_path = match config.database { DatabaseConfig::Path { path, .. } => path, _ => { @@ -415,8 +403,6 @@ where } }, CoreParams::Revert(params) => { - let config = get_config(&core_params, spec_factory, impl_name, &version)?; - let blocks = params.num.parse()?; builder(config)?.revert_chain(blocks)?; @@ -427,6 +413,44 @@ where Ok(()) } +pub fn init( + mut config: &mut Configuration, + spec_factory: F, + shared_params: &SharedParams, + version: &VersionInfo, +) -> error::Result<()> +where + G: RuntimeGenesis, + E: ChainSpecExtension, + F: FnOnce(&str) -> Result>, String>, +{ + let full_version = sc_service::config::full_version_from_strs( + version.version, + version.commit + ); + sp_panic_handler::set(version.support_url, &full_version); + + fdlimit::raise_fd_limit(); + init_logger(shared_params.log.as_ref().map(|v| v.as_ref()).unwrap_or("")); + + config.chain_spec = Some(load_spec(shared_params, spec_factory)?); + config.config_dir = Some(base_path(shared_params, version)); + config.impl_commit = version.commit; + config.impl_version = version.version; + + config.database = DatabaseConfig::Path { + path: config + .in_chain_config_dir(DEFAULT_DB_CONFIG_PATH) + .expect("We provided a base_path/config_dir."), + cache_size: None, + }; + + config.network.boot_nodes = config.expect_chain_spec().boot_nodes().to_vec(); + config.telemetry_endpoints = config.expect_chain_spec().telemetry_endpoints().clone(); + + Ok(()) +} + pub fn run_node( config: Configuration, new_light: F2, @@ -444,7 +468,7 @@ where info!("{}", version.name); info!(" version {}", config.full_version()); info!(" by {}, 2017, 2018", version.author); - info!("Chain specification: {}", config.chain_spec.name()); + info!("Chain specification: {}", config.expect_chain_spec().name()); info!("Node name: {}", config.name); info!("Roles: {}", display_role(&config)); match config.roles { @@ -535,67 +559,6 @@ pub fn display_role(config: &Configuration) -> String { } } -pub fn get_config( - core_params: &CoreParams, - spec_factory: F, - impl_name: &'static str, - version: &VersionInfo, -) -> error::Result> -where - G: RuntimeGenesis, - E: ChainSpecExtension, - F: FnOnce(&str) -> Result>, String>, -{ - match core_params { - CoreParams::Run(params) => - create_run_node_config( - params.clone(), - spec_factory, - impl_name, - version - ), - CoreParams::BuildSpec(params) => { - let spec = load_spec(¶ms.shared_params, spec_factory)?; - - create_build_spec_config( - &spec, - ¶ms.shared_params, - version, - ) - }, - CoreParams::ExportBlocks(params) => - create_config_with_db_path( - spec_factory, - ¶ms.shared_params, - version, - ), - CoreParams::ImportBlocks(params) => - create_config_with_db_path( - spec_factory, - ¶ms.shared_params, - version, - ), - CoreParams::CheckBlock(params) => - create_config_with_db_path( - spec_factory, - ¶ms.shared_params, - version, - ), - CoreParams::PurgeChain(params) => - create_config_with_db_path( - spec_factory, - ¶ms.shared_params, - version - ), - CoreParams::Revert(params) => - create_config_with_db_path( - spec_factory, - ¶ms.shared_params, - version, - ), - } -} - /// Create a `NodeKeyConfig` from the given `NodeKeyParams` in the context /// of an optional network config storage directory. fn node_key_config

(params: NodeKeyParams, net_config_dir: &Option

) @@ -799,16 +762,14 @@ pub fn fill_import_params( Ok(()) } -fn create_run_node_config( - cli: RunCmd, spec_factory: S, impl_name: &'static str, version: &VersionInfo, -) -> error::Result> +fn update_config_for_running_node( + mut config: &mut Configuration, + cli: RunCmd, +) -> error::Result<()> where G: RuntimeGenesis, E: ChainSpecExtension, - S: FnOnce(&str) -> Result>, String>, { - let mut config = create_config_with_db_path(spec_factory, &cli.shared_params, &version)?; - fill_config_keystore_password_and_path(&mut config, &cli)?; let is_dev = cli.shared_params.dev; @@ -824,10 +785,6 @@ where fill_import_params(&mut config, &cli.import_params, role)?; - config.impl_name = impl_name; - config.impl_commit = version.commit; - config.impl_version = version.version; - config.name = match cli.name.or(cli.keyring.account.map(|a| a.to_string())) { None => generate_node_name(), Some(name) => name, @@ -915,7 +872,7 @@ where // Imply forced authoring on --dev config.force_authoring = cli.shared_params.dev || cli.force_authoring; - Ok(config) + Ok(()) } fn interface_str( @@ -939,50 +896,6 @@ fn interface_str( } } -/// Creates a configuration including the database path. -pub fn create_config_with_db_path( - spec_factory: S, cli: &SharedParams, version: &VersionInfo, -) -> error::Result> -where - G: RuntimeGenesis, - E: ChainSpecExtension, - S: FnOnce(&str) -> Result>, String>, -{ - let spec = load_spec(cli, spec_factory)?; - let base_path = base_path(cli, version); - - let mut config = sc_service::Configuration::default_with_spec_and_base_path( - spec.clone(), - Some(base_path), - ); - - config.database = DatabaseConfig::Path { - path: config.in_chain_config_dir(DEFAULT_DB_CONFIG_PATH).expect("We provided a base_path."), - cache_size: None, - }; - - Ok(config) -} - -/// Creates a configuration including the base path and the shared params -fn create_build_spec_config( - spec: &ChainSpec, - cli: &SharedParams, - version: &VersionInfo, -) -> error::Result> -where - G: RuntimeGenesis, - E: ChainSpecExtension, -{ - let base_path = base_path(&cli, version); - let cfg = sc_service::Configuration::default_with_spec_and_base_path( - spec.clone(), - Some(base_path), - ); - - Ok(cfg) -} - /// Internal trait used to cast to a dynamic type that implements Read and Seek. trait ReadPlusSeek: Read + Seek {} diff --git a/client/service/src/builder.rs b/client/service/src/builder.rs index 70e7f61ced5a3..c0d7ced1cb388 100644 --- a/client/service/src/builder.rs +++ b/client/service/src/builder.rs @@ -177,13 +177,14 @@ fn new_full_parts( config.default_heap_pages, ); - let fork_blocks = config.chain_spec + let chain_spec = config.expect_chain_spec(); + let fork_blocks = chain_spec .extensions() .get::>() .cloned() .unwrap_or_default(); - let bad_blocks = config.chain_spec + let bad_blocks = chain_spec .extensions() .get::>() .cloned() @@ -214,7 +215,7 @@ fn new_full_parts( sc_client_db::new_client( db_config, executor, - &config.chain_spec, + config.expect_chain_spec(), fork_blocks, bad_blocks, extensions, @@ -330,7 +331,7 @@ where TGen: RuntimeGenesis, TCSExt: Extension { let remote_blockchain = backend.remote_blockchain(); let client = Arc::new(sc_client::light::new_light( backend.clone(), - &config.chain_spec, + config.expect_chain_spec(), executor, )?); @@ -788,6 +789,7 @@ ServiceBuilder< let import_queue = Box::new(import_queue); let chain_info = client.chain_info(); + let chain_spec = config.expect_chain_spec(); let version = config.full_version(); info!("Highest known block at #{}", chain_info.best_number); @@ -810,7 +812,7 @@ ServiceBuilder< }); let protocol_id = { - let protocol_id_full = match config.chain_spec.protocol_id() { + let protocol_id_full = match chain_spec.protocol_id() { Some(pid) => pid, None => { warn!("Using default protocol ID {:?} because none is configured in the \ @@ -999,10 +1001,10 @@ ServiceBuilder< use sc_rpc::{chain, state, author, system}; let system_info = sc_rpc::system::SystemInfo { - chain_name: config.chain_spec.name().into(), + chain_name: chain_spec.name().into(), impl_name: config.impl_name.into(), impl_version: config.impl_version.into(), - properties: config.chain_spec.properties().clone(), + properties: chain_spec.properties().clone(), }; let subscriptions = sc_rpc::Subscriptions::new(Arc::new(SpawnTaskHandle { @@ -1075,7 +1077,7 @@ ServiceBuilder< let name = config.name.clone(); let impl_name = config.impl_name.to_owned(); let version = version.clone(); - let chain_name = config.chain_spec.name().to_owned(); + let chain_name = config.expect_chain_spec().name().to_owned(); let telemetry_connection_sinks_ = telemetry_connection_sinks.clone(); let telemetry = sc_telemetry::init_telemetry(sc_telemetry::TelemetryConfig { endpoints, diff --git a/client/service/src/config.rs b/client/service/src/config.rs index 5018e5c1e46cb..df2a2cf09a724 100644 --- a/client/service/src/config.rs +++ b/client/service/src/config.rs @@ -56,7 +56,7 @@ pub struct Configuration { /// Pruning settings. pub pruning: PruningMode, /// Chain configuration. - pub chain_spec: ChainSpec, + pub chain_spec: Option>, /// Node name. pub name: String, /// Wasm execution method. @@ -143,18 +143,18 @@ pub enum DatabaseConfig { Custom(Arc), } -impl Configuration where +impl Default for Configuration where G: RuntimeGenesis, E: Extension, { - /// Create a default config for given chain spec and path to configuration dir - pub fn default_with_spec_and_base_path(chain_spec: ChainSpec, config_dir: Option) -> Self { + /// Create a default config + fn default() -> Self { let mut configuration = Configuration { impl_name: "parity-substrate", impl_version: "0.0.0", impl_commit: "", - chain_spec, - config_dir: config_dir.clone(), + chain_spec: None, + config_dir: None, name: Default::default(), roles: Roles::FULL, transaction_pool: Default::default(), @@ -185,9 +185,6 @@ impl Configuration where tracing_targets: Default::default(), tracing_receiver: Default::default(), }; - configuration.network.boot_nodes = configuration.chain_spec.boot_nodes().to_vec(); - - configuration.telemetry_endpoints = configuration.chain_spec.telemetry_endpoints().clone(); configuration } @@ -210,11 +207,15 @@ impl Configuration { pub fn in_chain_config_dir(&self, sub: &str) -> Option { self.config_dir.clone().map(|mut path| { path.push("chains"); - path.push(self.chain_spec.id()); + path.push(self.expect_chain_spec().id()); path.push(sub); path }) } + + pub fn expect_chain_spec(&self) -> &ChainSpec { + self.chain_spec.as_ref().expect("chain_spec must be specified") + } } /// Returns platform info From 6f6a8fb76e447e8ab98a00c4d35efa400426ca57 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Tue, 21 Jan 2020 13:39:40 +0100 Subject: [PATCH 22/77] Update bin/node-template/src/cli.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Bastian Köcher --- bin/node-template/src/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/node-template/src/cli.rs b/bin/node-template/src/cli.rs index 3ef4a547c5785..49df98814215a 100644 --- a/bin/node-template/src/cli.rs +++ b/bin/node-template/src/cli.rs @@ -19,7 +19,7 @@ where service::new_full, load_spec, |config: _| Ok(new_full_start!(config).0), - "substrate-node", + "node-template", &version, ) } From ef4dd6afd1e052c0441803a92d92df1cfc00c016 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 22 Jan 2020 15:50:42 +0100 Subject: [PATCH 23/77] WIP --- bin/node/cli/src/cli.rs | 2 +- client/cli/src/lib.rs | 474 +++------------------------------ client/cli/src/node_key.rs | 225 ++++++++++++++++ client/cli/src/params.rs | 335 +++++++++++++++++++++++ client/cli/src/runtime.rs | 92 +++++++ client/service/test/src/lib.rs | 2 +- 6 files changed, 693 insertions(+), 437 deletions(-) create mode 100644 client/cli/src/node_key.rs create mode 100644 client/cli/src/runtime.rs diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs index 3a98e1812d705..709a7426efadc 100644 --- a/bin/node/cli/src/cli.rs +++ b/bin/node/cli/src/cli.rs @@ -107,12 +107,12 @@ where match subcommand { Cli::SubstrateCli(cli) => sc_cli::run( + config, cli, service::new_light, service::new_full, load_spec, |config: Config<_, _>| Ok(new_full_start!(config).0), - config, &version, ), Cli::Factory(cli_args) => { diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index ed5cb6ae86a6b..054c9961b4f66 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -25,6 +25,8 @@ mod params; mod execution_strategy; pub mod error; pub mod informant; +mod runtime; +mod node_key; use sc_client_api::execution_extensions::ExecutionStrategies; use sc_service::{ @@ -37,36 +39,34 @@ use sc_network::{ self, multiaddr::Protocol, config::{ - NetworkConfiguration, TransportConfig, NonReservedPeerMode, NodeKeyConfig, build_multiaddr + NetworkConfiguration, TransportConfig, NonReservedPeerMode, }, }; -use sp_core::H256; use std::{ io::{Write, Read, Seek, Cursor, stdin, stdout, ErrorKind}, iter, fmt::Debug, fs::{self, File}, net::{Ipv4Addr, SocketAddr}, path::{Path, PathBuf}, str::FromStr }; -use names::{Generator, Name}; use regex::Regex; pub use structopt::StructOpt; #[doc(hidden)] pub use structopt::clap::App; use params::{ - NetworkConfigurationParams, TransactionPoolParams, - NodeKeyParams, NodeKeyType, Cors, + NetworkConfigurationParams, TransactionPoolParams, Cors, +}; +pub use params::{ + CoreParams, SharedParams, ImportParams, ExecutionStrategy, + RunCmd, BuildSpecCmd, ExportBlocksCmd, ImportBlocksCmd, CheckBlockCmd, PurgeChainCmd, RevertCmd, }; -pub use params::{CoreParams, SharedParams, ImportParams, ExecutionStrategy, RunCmd}; pub use traits::GetSharedParams; use app_dirs::{AppInfo, AppDataType}; use log::info; use lazy_static::lazy_static; -use futures::{Future, compat::Future01CompatExt, future, future::FutureExt}; use sc_telemetry::TelemetryEndpoints; use sp_runtime::generic::BlockId; use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; -use futures::select; -use futures::pin_mut; +pub use crate::runtime::{run_until_exit, run_service_until_exit}; /// default sub directory to store network config const DEFAULT_NETWORK_CONFIG_PATH : &'static str = "network"; @@ -75,14 +75,6 @@ const DEFAULT_DB_CONFIG_PATH : &'static str = "db"; /// default sub directory for the key store const DEFAULT_KEYSTORE_CONFIG_PATH : &'static str = "keystore"; -/// The maximum number of characters for a node name. -const NODE_NAME_MAX_LENGTH: usize = 32; - -/// The file name of the node's Ed25519 secret key inside the chain-specific -/// network config directory, if neither `--node-key` nor `--node-key-file` -/// is specified in combination with `--node-key-type=ed25519`. -const NODE_KEY_ED25519_FILE: &str = "secret_ed25519"; - /// Executable version. Used to pass version information from the root crate. #[derive(Clone)] pub struct VersionInfo { @@ -109,19 +101,6 @@ fn get_chain_key(cli: &SharedParams) -> String { } } -fn generate_node_name() -> String { - let result = loop { - let node_name = Generator::with_naming(Name::Numbered).next().unwrap(); - let count = node_name.chars().count(); - - if count < NODE_NAME_MAX_LENGTH { - break node_name - } - }; - - result -} - /// Load spec give shared params and spec factory. pub fn load_spec(cli: &SharedParams, factory: F) -> error::Result> where G: RuntimeGenesis, @@ -149,28 +128,6 @@ fn base_path(cli: &SharedParams, version: &VersionInfo) -> PathBuf { ) } -/// Check whether a node name is considered as valid -fn is_node_name_valid(_name: &str) -> Result<(), &str> { - let name = _name.to_string(); - if name.chars().count() >= NODE_NAME_MAX_LENGTH { - return Err("Node name too long"); - } - - let invalid_chars = r"[\\.@]"; - let re = Regex::new(invalid_chars).unwrap(); - if re.is_match(&name) { - return Err("Node name should not contain invalid chars such as '.' and '@'"); - } - - let invalid_patterns = r"(https?:\\/+)?(www)+"; - let re = Regex::new(invalid_patterns).unwrap(); - if re.is_match(&name) { - return Err("Node name should not contain urls"); - } - - Ok(()) -} - /// Gets the struct from the command line arguments. Print the /// error message and quit the program in case of failure. pub fn from_args(version: &VersionInfo) -> T @@ -237,13 +194,16 @@ where Ok(T::from_clap(&matches)) } +/// A helper function that: +/// 1. initialize +/// 2. runs any of the command variant of `CoreParams` pub fn run( + mut config: Configuration, core_params: CoreParams, new_light: FNL, new_full: FNF, spec_factory: F, builder: B, - mut config: Configuration, version: &VersionInfo, ) -> error::Result<()> where @@ -262,157 +222,18 @@ where { init(&mut config, spec_factory, core_params.get_shared_params(), version)?; - assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing"); - - match &core_params { - CoreParams::Run(params) => { - update_config_for_running_node( - &mut config, - params.clone(), - )?; - - run_node(config, new_light, new_full, &version) - }, - CoreParams::BuildSpec(params) => { - info!("Building chain spec"); - let mut spec = config.expect_chain_spec().clone(); - let raw_output = params.raw; - - if spec.boot_nodes().is_empty() && !params.disable_default_bootnode { - let node_key = node_key_config( - params.node_key_params.clone(), - &Some(config.in_chain_config_dir(DEFAULT_NETWORK_CONFIG_PATH).expect("We provided a base_path")), - )?; - let keys = node_key.into_keypair()?; - let peer_id = keys.public().into_peer_id(); - let addr = build_multiaddr![ - Ip4([127, 0, 0, 1]), - Tcp(30333u16), - P2p(peer_id) - ]; - spec.add_boot_node(addr) - } - - let json = sc_service::chain_ops::build_spec(spec, raw_output)?; - - print!("{}", json); - - Ok(()) - }, - CoreParams::ExportBlocks(params) => { - if let DatabaseConfig::Path { ref path, .. } = &config.database { - info!("DB path: {}", path.display()); - } - let from = params.from.as_ref().and_then(|f| f.parse().ok()).unwrap_or(1); - let to = params.to.as_ref().and_then(|t| t.parse().ok()); - - let json = params.json; - - let file: Box = match ¶ms.output { - Some(filename) => Box::new(File::create(filename)?), - None => Box::new(stdout()), - }; - - let f = builder(config)? - .export_blocks(file, from.into(), to, json) - .compat(); - let f = f.fuse(); - pin_mut!(f); - - run_until_exit(f) - }, - CoreParams::ImportBlocks(params) => { - fill_import_params(&mut config, ¶ms.import_params, sc_service::Roles::FULL)?; - - let file: Box = match ¶ms.input { - Some(filename) => Box::new(File::open(filename)?), - None => { - let mut buffer = Vec::new(); - stdin().read_to_end(&mut buffer)?; - Box::new(Cursor::new(buffer)) - }, - }; - - let f = builder(config)? - .import_blocks(file, false) - .compat(); - let f = f.fuse(); - pin_mut!(f); - - run_until_exit(f) - }, - CoreParams::CheckBlock(params) => { - fill_import_params(&mut config, ¶ms.import_params, sc_service::Roles::FULL)?; - - let input = if params.input.starts_with("0x") { ¶ms.input[2..] } else { ¶ms.input[..] }; - let block_id = match FromStr::from_str(input) { - Ok(hash) => BlockId::hash(hash), - Err(_) => match params.input.parse::() { - Ok(n) => BlockId::number((n as u32).into()), - Err(_) => return Err(error::Error::Input("Invalid hash or number specified".into())), - } - }; - - let start = std::time::Instant::now(); - let f = builder(config)? - .check_block(block_id) - .compat(); - let f = f.fuse(); - pin_mut!(f); - run_until_exit(f)?; - println!("Completed in {} ms.", start.elapsed().as_millis()); - - Ok(()) - }, - CoreParams::PurgeChain(params) => { - let db_path = match config.database { - DatabaseConfig::Path { path, .. } => path, - _ => { - eprintln!("Cannot purge custom database implementation"); - return Ok(()); - } - }; - - if !params.yes { - print!("Are you sure to remove {:?}? [y/N]: ", &db_path); - stdout().flush().expect("failed to flush stdout"); - - let mut input = String::new(); - stdin().read_line(&mut input)?; - let input = input.trim(); - - match input.chars().nth(0) { - Some('y') | Some('Y') => {}, - _ => { - println!("Aborted"); - return Ok(()); - }, - } - } - - match fs::remove_dir_all(&db_path) { - Result::Ok(_) => { - println!("{:?} removed.", &db_path); - Ok(()) - }, - Result::Err(ref err) if err.kind() == ErrorKind::NotFound => { - eprintln!("{:?} did not exist.", &db_path); - Ok(()) - }, - Result::Err(err) => Result::Err(err.into()) - } - }, - CoreParams::Revert(params) => { - let blocks = params.num.parse()?; - builder(config)?.revert_chain(blocks)?; - - Ok(()) - }, - }; - - Ok(()) + core_params.run(config, new_light, new_full, builder, version) } +/// Initialize substrate and its configuration +/// +/// This method: +/// +/// 1. set the panic handler +/// 2. raise the FD limit +/// 3. initialize the logger +/// 4. update the configuration provided with the chain specification, config directory, +/// information (version, commit), database's path, boot nodes and telemetry endpoints pub fn init( mut config: &mut Configuration, spec_factory: F, @@ -451,19 +272,22 @@ where Ok(()) } -pub fn run_node( +/// Run the node +/// +/// Run the light node if the role is "light", otherwise run the full node. +pub fn run_node( config: Configuration, - new_light: F2, - new_full: F3, + new_light: FNL, + new_full: FNF, version: &VersionInfo, ) -> error::Result<()> where - F2: FnOnce(Configuration) -> Result, - F3: FnOnce(Configuration) -> Result, + FNL: FnOnce(Configuration) -> Result, + FNF: FnOnce(Configuration) -> Result, G: RuntimeGenesis, E: ChainSpecExtension, - T1: AbstractService + Unpin, - T2: AbstractService + Unpin, + SL: AbstractService + Unpin, + SF: AbstractService + Unpin, { info!("{}", version.name); info!(" version {}", config.full_version()); @@ -471,6 +295,7 @@ where info!("Chain specification: {}", config.expect_chain_spec().name()); info!("Node name: {}", config.name); info!("Roles: {}", display_role(&config)); + match config.roles { ServiceRoles::LIGHT => run_service_until_exit( new_light(config)?, @@ -481,73 +306,6 @@ where } } -struct Runtime(F) -where - F: Future> + future::FusedFuture + Unpin, - E: std::error::Error; - -impl Runtime -where - F: Future> + future::FusedFuture + Unpin, - E: std::error::Error, -{ - async fn main(self) -> Result<(), Box> - { - use tokio::signal::unix::{signal, SignalKind}; - - let mut stream_int = signal(SignalKind::interrupt())?; - let mut stream_term = signal(SignalKind::terminate())?; - - let t1 = stream_int.recv().fuse(); - let t2 = stream_term.recv().fuse(); - let mut t3 = self.0; - - pin_mut!(t1, t2); - - select! { - _ = t1 => println!("Caught SIGINT"), - _ = t2 => println!("Caught SIGTERM"), - res = t3 => res?, - } - - Ok(()) - } - - fn run(self) -> Result<(), Box> { - let mut r = tokio::runtime::Runtime::new()?; - r.block_on(self.main()) - } -} - -pub fn run_until_exit( - future: F, -) -> error::Result<()> -where - F: Future> + future::FusedFuture + Unpin, - E: 'static + std::error::Error, -{ - let runtime = Runtime(future); - runtime.run().map_err(|e| e.to_string())?; - - Ok(()) -} - -pub fn run_service_until_exit( - service: T, -) -> error::Result<()> -where - T: AbstractService + Unpin, -{ - // we eagerly drop the service so that the internal exit future is fired, - // but we need to keep holding a reference to the global telemetry guard - let _telemetry = service.telemetry(); - - let runtime = Runtime(service.compat().fuse()); - runtime.run().map_err(|e| e.to_string())?; - - Ok(()) -} - /// Returns a string displaying the node role, special casing the sentry mode /// (returning `SENTRY`), since the node technically has an `AUTHORITY` role but /// doesn't participate. @@ -559,44 +317,6 @@ pub fn display_role(config: &Configuration) -> String { } } -/// Create a `NodeKeyConfig` from the given `NodeKeyParams` in the context -/// of an optional network config storage directory. -fn node_key_config

(params: NodeKeyParams, net_config_dir: &Option

) - -> error::Result -where - P: AsRef -{ - match params.node_key_type { - NodeKeyType::Ed25519 => - params.node_key.as_ref().map(parse_ed25519_secret).unwrap_or_else(|| - Ok(params.node_key_file - .or_else(|| net_config_file(net_config_dir, NODE_KEY_ED25519_FILE)) - .map(sc_network::config::Secret::File) - .unwrap_or(sc_network::config::Secret::New))) - .map(NodeKeyConfig::Ed25519) - } -} - -fn net_config_file

(net_config_dir: &Option

, name: &str) -> Option -where - P: AsRef -{ - net_config_dir.as_ref().map(|d| d.as_ref().join(name)) -} - -/// Create an error caused by an invalid node key argument. -fn invalid_node_key(e: impl std::fmt::Display) -> error::Error { - error::Error::Input(format!("Invalid node key: {}", e)) -} - -/// Parse a Ed25519 secret key from a hex string into a `sc_network::Secret`. -fn parse_ed25519_secret(hex: &String) -> error::Result { - H256::from_str(&hex).map_err(invalid_node_key).and_then(|bytes| - sc_network::config::identity::ed25519::SecretKey::from_bytes(bytes) - .map(sc_network::config::Secret::Input) - .map_err(invalid_node_key)) -} - /// Fill the given `PoolConfiguration` by looking at the cli parameters. fn fill_transaction_pool_configuration( options: &mut Configuration, @@ -654,7 +374,7 @@ fn fill_network_configuration( config.public_addresses = Vec::new(); config.client_version = client_id; - config.node_key = node_key_config(cli.node_key_params, &config.net_config_path)?; + config.node_key = node_key::node_key_config(cli.node_key_params, &config.net_config_path)?; config.in_peers = cli.in_peers; config.out_peers = cli.out_peers; @@ -762,7 +482,8 @@ pub fn fill_import_params( Ok(()) } -fn update_config_for_running_node( +/// Update and prepare a `Configuration` with command line parameters of `RunCmd` +pub fn update_config_for_running_node( mut config: &mut Configuration, cli: RunCmd, ) -> error::Result<()> @@ -786,10 +507,10 @@ where fill_import_params(&mut config, &cli.import_params, role)?; config.name = match cli.name.or(cli.keyring.account.map(|a| a.to_string())) { - None => generate_node_name(), + None => node_key::generate_node_name(), Some(name) => name, }; - match is_node_name_valid(&config.name) { + match node_key::is_node_name_valid(&config.name) { Ok(_) => (), Err(msg) => Err( error::Error::Input( @@ -896,11 +617,6 @@ fn interface_str( } } -/// Internal trait used to cast to a dynamic type that implements Read and Seek. -trait ReadPlusSeek: Read + Seek {} - -impl ReadPlusSeek for T {} - fn parse_address( address: &str, port: Option, @@ -987,118 +703,6 @@ fn kill_color(s: &str) -> String { #[cfg(test)] mod tests { use super::*; - use sc_network::config::identity::ed25519; - - #[test] - fn tests_node_name_good() { - assert!(is_node_name_valid("short name").is_ok()); - } - - #[test] - fn tests_node_name_bad() { - assert!(is_node_name_valid("long names are not very cool for the ui").is_err()); - assert!(is_node_name_valid("Dots.not.Ok").is_err()); - assert!(is_node_name_valid("http://visit.me").is_err()); - assert!(is_node_name_valid("https://visit.me").is_err()); - assert!(is_node_name_valid("www.visit.me").is_err()); - assert!(is_node_name_valid("email@domain").is_err()); - } - - #[test] - fn test_node_key_config_input() { - fn secret_input(net_config_dir: Option) -> error::Result<()> { - NodeKeyType::variants().into_iter().try_for_each(|t| { - let node_key_type = NodeKeyType::from_str(t).unwrap(); - let sk = match node_key_type { - NodeKeyType::Ed25519 => ed25519::SecretKey::generate().as_ref().to_vec() - }; - let params = NodeKeyParams { - node_key_type, - node_key: Some(format!("{:x}", H256::from_slice(sk.as_ref()))), - node_key_file: None - }; - node_key_config(params, &net_config_dir).and_then(|c| match c { - NodeKeyConfig::Ed25519(sc_network::config::Secret::Input(ref ski)) - if node_key_type == NodeKeyType::Ed25519 && - &sk[..] == ski.as_ref() => Ok(()), - _ => Err(error::Error::Input("Unexpected node key config".into())) - }) - }) - } - - assert!(secret_input(None).is_ok()); - assert!(secret_input(Some("x".to_string())).is_ok()); - } - - #[test] - fn test_node_key_config_file() { - fn secret_file(net_config_dir: Option) -> error::Result<()> { - NodeKeyType::variants().into_iter().try_for_each(|t| { - let node_key_type = NodeKeyType::from_str(t).unwrap(); - let tmp = tempfile::Builder::new().prefix("alice").tempdir()?; - let file = tmp.path().join(format!("{}_mysecret", t)).to_path_buf(); - let params = NodeKeyParams { - node_key_type, - node_key: None, - node_key_file: Some(file.clone()) - }; - node_key_config(params, &net_config_dir).and_then(|c| match c { - NodeKeyConfig::Ed25519(sc_network::config::Secret::File(ref f)) - if node_key_type == NodeKeyType::Ed25519 && f == &file => Ok(()), - _ => Err(error::Error::Input("Unexpected node key config".into())) - }) - }) - } - - assert!(secret_file(None).is_ok()); - assert!(secret_file(Some("x".to_string())).is_ok()); - } - - #[test] - fn test_node_key_config_default() { - fn with_def_params(f: F) -> error::Result<()> - where - F: Fn(NodeKeyParams) -> error::Result<()> - { - NodeKeyType::variants().into_iter().try_for_each(|t| { - let node_key_type = NodeKeyType::from_str(t).unwrap(); - f(NodeKeyParams { - node_key_type, - node_key: None, - node_key_file: None - }) - }) - } - - fn no_config_dir() -> error::Result<()> { - with_def_params(|params| { - let typ = params.node_key_type; - node_key_config::(params, &None) - .and_then(|c| match c { - NodeKeyConfig::Ed25519(sc_network::config::Secret::New) - if typ == NodeKeyType::Ed25519 => Ok(()), - _ => Err(error::Error::Input("Unexpected node key config".into())) - }) - }) - } - - fn some_config_dir(net_config_dir: String) -> error::Result<()> { - with_def_params(|params| { - let dir = PathBuf::from(net_config_dir.clone()); - let typ = params.node_key_type; - node_key_config(params, &Some(net_config_dir.clone())) - .and_then(move |c| match c { - NodeKeyConfig::Ed25519(sc_network::config::Secret::File(ref f)) - if typ == NodeKeyType::Ed25519 && - f == &dir.join(NODE_KEY_ED25519_FILE) => Ok(()), - _ => Err(error::Error::Input("Unexpected node key config".into())) - }) - }) - } - - assert!(no_config_dir().is_ok()); - assert!(some_config_dir("x".to_string()).is_ok()); - } #[test] fn keystore_path_is_generated_correctly() { diff --git a/client/cli/src/node_key.rs b/client/cli/src/node_key.rs new file mode 100644 index 0000000000000..7db9b899fb65f --- /dev/null +++ b/client/cli/src/node_key.rs @@ -0,0 +1,225 @@ +// Copyright 2017-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use sc_network::{ + self, + config::{ + NodeKeyConfig, build_multiaddr, + }, +}; +use sp_core::H256; +use names::{Generator, Name}; +use regex::Regex; +use std::{path::{Path, PathBuf}, str::FromStr}; +use crate::error; +use crate::params::{NodeKeyParams, NodeKeyType}; + +/// The maximum number of characters for a node name. +const NODE_NAME_MAX_LENGTH: usize = 32; + +/// The file name of the node's Ed25519 secret key inside the chain-specific +/// network config directory, if neither `--node-key` nor `--node-key-file` +/// is specified in combination with `--node-key-type=ed25519`. +const NODE_KEY_ED25519_FILE: &str = "secret_ed25519"; + +pub fn generate_node_name() -> String { + let result = loop { + let node_name = Generator::with_naming(Name::Numbered).next().unwrap(); + let count = node_name.chars().count(); + + if count < NODE_NAME_MAX_LENGTH { + break node_name + } + }; + + result +} + +/// Check whether a node name is considered as valid +pub fn is_node_name_valid(_name: &str) -> Result<(), &str> { + let name = _name.to_string(); + if name.chars().count() >= NODE_NAME_MAX_LENGTH { + return Err("Node name too long"); + } + + let invalid_chars = r"[\\.@]"; + let re = Regex::new(invalid_chars).unwrap(); + if re.is_match(&name) { + return Err("Node name should not contain invalid chars such as '.' and '@'"); + } + + let invalid_patterns = r"(https?:\\/+)?(www)+"; + let re = Regex::new(invalid_patterns).unwrap(); + if re.is_match(&name) { + return Err("Node name should not contain urls"); + } + + Ok(()) +} + +/// Create a `NodeKeyConfig` from the given `NodeKeyParams` in the context +/// of an optional network config storage directory. +pub fn node_key_config

(params: NodeKeyParams, net_config_dir: &Option

) + -> error::Result +where + P: AsRef +{ + match params.node_key_type { + NodeKeyType::Ed25519 => + params.node_key.as_ref().map(parse_ed25519_secret).unwrap_or_else(|| + Ok(params.node_key_file + .or_else(|| net_config_file(net_config_dir, NODE_KEY_ED25519_FILE)) + .map(sc_network::config::Secret::File) + .unwrap_or(sc_network::config::Secret::New))) + .map(NodeKeyConfig::Ed25519) + } +} + +/// Create an error caused by an invalid node key argument. +fn invalid_node_key(e: impl std::fmt::Display) -> error::Error { + error::Error::Input(format!("Invalid node key: {}", e)) +} + +/// Parse a Ed25519 secret key from a hex string into a `sc_network::Secret`. +fn parse_ed25519_secret(hex: &String) -> error::Result { + H256::from_str(&hex).map_err(invalid_node_key).and_then(|bytes| + sc_network::config::identity::ed25519::SecretKey::from_bytes(bytes) + .map(sc_network::config::Secret::Input) + .map_err(invalid_node_key)) +} + +fn net_config_file

(net_config_dir: &Option

, name: &str) -> Option +where + P: AsRef +{ + net_config_dir.as_ref().map(|d| d.as_ref().join(name)) +} + +mod tests { + use super::*; + use sc_network::config::identity::ed25519; + + #[test] + fn tests_node_name_good() { + assert!(is_node_name_valid("short name").is_ok()); + } + + #[test] + fn tests_node_name_bad() { + assert!(is_node_name_valid("long names are not very cool for the ui").is_err()); + assert!(is_node_name_valid("Dots.not.Ok").is_err()); + assert!(is_node_name_valid("http://visit.me").is_err()); + assert!(is_node_name_valid("https://visit.me").is_err()); + assert!(is_node_name_valid("www.visit.me").is_err()); + assert!(is_node_name_valid("email@domain").is_err()); + } + + #[test] + fn test_node_key_config_input() { + fn secret_input(net_config_dir: Option) -> error::Result<()> { + NodeKeyType::variants().into_iter().try_for_each(|t| { + let node_key_type = NodeKeyType::from_str(t).unwrap(); + let sk = match node_key_type { + NodeKeyType::Ed25519 => ed25519::SecretKey::generate().as_ref().to_vec() + }; + let params = NodeKeyParams { + node_key_type, + node_key: Some(format!("{:x}", H256::from_slice(sk.as_ref()))), + node_key_file: None + }; + node_key_config(params, &net_config_dir).and_then(|c| match c { + NodeKeyConfig::Ed25519(sc_network::config::Secret::Input(ref ski)) + if node_key_type == NodeKeyType::Ed25519 && + &sk[..] == ski.as_ref() => Ok(()), + _ => Err(error::Error::Input("Unexpected node key config".into())) + }) + }) + } + + assert!(secret_input(None).is_ok()); + assert!(secret_input(Some("x".to_string())).is_ok()); + } + + #[test] + fn test_node_key_config_file() { + fn secret_file(net_config_dir: Option) -> error::Result<()> { + NodeKeyType::variants().into_iter().try_for_each(|t| { + let node_key_type = NodeKeyType::from_str(t).unwrap(); + let tmp = tempfile::Builder::new().prefix("alice").tempdir()?; + let file = tmp.path().join(format!("{}_mysecret", t)).to_path_buf(); + let params = NodeKeyParams { + node_key_type, + node_key: None, + node_key_file: Some(file.clone()) + }; + node_key_config(params, &net_config_dir).and_then(|c| match c { + NodeKeyConfig::Ed25519(sc_network::config::Secret::File(ref f)) + if node_key_type == NodeKeyType::Ed25519 && f == &file => Ok(()), + _ => Err(error::Error::Input("Unexpected node key config".into())) + }) + }) + } + + assert!(secret_file(None).is_ok()); + assert!(secret_file(Some("x".to_string())).is_ok()); + } + + #[test] + fn test_node_key_config_default() { + fn with_def_params(f: F) -> error::Result<()> + where + F: Fn(NodeKeyParams) -> error::Result<()> + { + NodeKeyType::variants().into_iter().try_for_each(|t| { + let node_key_type = NodeKeyType::from_str(t).unwrap(); + f(NodeKeyParams { + node_key_type, + node_key: None, + node_key_file: None + }) + }) + } + + fn no_config_dir() -> error::Result<()> { + with_def_params(|params| { + let typ = params.node_key_type; + node_key_config::(params, &None) + .and_then(|c| match c { + NodeKeyConfig::Ed25519(sc_network::config::Secret::New) + if typ == NodeKeyType::Ed25519 => Ok(()), + _ => Err(error::Error::Input("Unexpected node key config".into())) + }) + }) + } + + fn some_config_dir(net_config_dir: String) -> error::Result<()> { + with_def_params(|params| { + let dir = PathBuf::from(net_config_dir.clone()); + let typ = params.node_key_type; + node_key_config(params, &Some(net_config_dir.clone())) + .and_then(move |c| match c { + NodeKeyConfig::Ed25519(sc_network::config::Secret::File(ref f)) + if typ == NodeKeyType::Ed25519 && + f == &dir.join(NODE_KEY_ED25519_FILE) => Ok(()), + _ => Err(error::Error::Input("Unexpected node key config".into())) + }) + }) + } + + assert!(no_config_dir().is_ok()); + assert!(some_config_dir("x".to_string()).is_ok()); + } +} diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 92c9374991838..16e0a460c7bd5 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -18,6 +18,24 @@ use crate::traits::GetSharedParams; use std::{str::FromStr, path::PathBuf}; use structopt::{StructOpt, clap::{arg_enum, App}}; +use sc_service::{ + AbstractService, Configuration, ChainSpecExtension, RuntimeGenesis, ServiceBuilderCommand, + ChainSpec, config::DatabaseConfig, +}; +use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; +use crate::VersionInfo; +use crate::error; +use std::fmt::Debug; +use log::info; +use sc_network::config::build_multiaddr; +use futures::pin_mut; +use futures::{future::FutureExt, compat::Future01CompatExt}; +use std::io; +use std::fs; +use std::io::{Read, Write, Seek}; +use sp_runtime::generic::BlockId; +use crate::runtime::run_until_exit; +use crate::node_key::node_key_config; pub use crate::execution_strategy::ExecutionStrategy; @@ -855,6 +873,7 @@ pub enum CoreParams { } impl CoreParams { + /// Get the shared parameters of a `CoreParams` command pub fn get_shared_params(&self) -> &SharedParams { use CoreParams::*; @@ -868,4 +887,320 @@ impl CoreParams { PurgeChain(params) => ¶ms.shared_params, } } + + /// Run any `CoreParams` command + pub fn run( + self, + config: Configuration, + new_light: FNL, + new_full: FNF, + builder: B, + version: &VersionInfo, + ) -> error::Result<()> + where + FNL: FnOnce(Configuration) -> Result, + FNF: FnOnce(Configuration) -> Result, + B: FnOnce(Configuration) -> Result, + G: RuntimeGenesis, + E: ChainSpecExtension, + SL: AbstractService + Unpin, + SF: AbstractService + Unpin, + BC: ServiceBuilderCommand + Unpin, + BB: sp_runtime::traits::Block + Debug, + <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, + ::Hash: std::str::FromStr, + { + assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing"); + + match self { + CoreParams::Run(cmd) => cmd.run(config, new_light, new_full, version), + CoreParams::BuildSpec(cmd) => cmd.run(config, builder), + CoreParams::ExportBlocks(cmd) => cmd.run(config, builder), + CoreParams::ImportBlocks(cmd) => cmd.run(config, builder), + CoreParams::CheckBlock(cmd) => cmd.run(config, builder), + CoreParams::PurgeChain(cmd) => cmd.run(config, builder), + CoreParams::Revert(cmd) => cmd.run(config, builder), + } + } +} + +impl RunCmd { + pub fn run( + self, + mut config: Configuration, + new_light: FNL, + new_full: FNF, + version: &VersionInfo, + ) -> error::Result<()> + where + G: RuntimeGenesis, + E: ChainSpecExtension, + FNL: FnOnce(Configuration) -> Result, + FNF: FnOnce(Configuration) -> Result, + SL: AbstractService + Unpin, + SF: AbstractService + Unpin, + { + assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing"); + + crate::update_config_for_running_node( + &mut config, + self, + )?; + + crate::run_node(config, new_light, new_full, &version) + } +} + +impl BuildSpecCmd { + /// Run the build-spec command + pub fn run( + self, + config: Configuration, + builder: B, + ) -> error::Result<()> + where + B: FnOnce(Configuration) -> Result, + G: RuntimeGenesis, + E: ChainSpecExtension, + BC: ServiceBuilderCommand + Unpin, + BB: sp_runtime::traits::Block + Debug, + <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, + ::Hash: std::str::FromStr, + { + assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing"); + + info!("Building chain spec"); + let mut spec = config.expect_chain_spec().clone(); + let raw_output = self.raw; + + if spec.boot_nodes().is_empty() && !self.disable_default_bootnode { + let node_key = node_key_config( + self.node_key_params.clone(), + &Some(config + .in_chain_config_dir(crate::DEFAULT_NETWORK_CONFIG_PATH) + .expect("We provided a base_path")), + )?; + let keys = node_key.into_keypair()?; + let peer_id = keys.public().into_peer_id(); + let addr = build_multiaddr![ + Ip4([127, 0, 0, 1]), + Tcp(30333u16), + P2p(peer_id) + ]; + spec.add_boot_node(addr) + } + + let json = sc_service::chain_ops::build_spec(spec, raw_output)?; + + print!("{}", json); + + Ok(()) + } +} + +impl ExportBlocksCmd { + /// Run the export-blocks command + pub fn run( + self, + config: Configuration, + builder: B, + ) -> error::Result<()> + where + B: FnOnce(Configuration) -> Result, + G: RuntimeGenesis, + E: ChainSpecExtension, + BC: ServiceBuilderCommand + Unpin, + BB: sp_runtime::traits::Block + Debug, + <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, + ::Hash: std::str::FromStr, + { + assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing"); + + if let DatabaseConfig::Path { ref path, .. } = &config.database { + info!("DB path: {}", path.display()); + } + let from = self.from.as_ref().and_then(|f| f.parse().ok()).unwrap_or(1); + let to = self.to.as_ref().and_then(|t| t.parse().ok()); + + let json = self.json; + + let file: Box = match &self.output { + Some(filename) => Box::new(fs::File::create(filename)?), + None => Box::new(io::stdout()), + }; + + let f = builder(config)? + .export_blocks(file, from.into(), to, json) + .compat(); + let f = f.fuse(); + pin_mut!(f); + + run_until_exit(f) + } +} + +/// Internal trait used to cast to a dynamic type that implements Read and Seek. +trait ReadPlusSeek: Read + Seek {} + +impl ReadPlusSeek for T {} + +impl ImportBlocksCmd { + /// Run the import-blocks command + pub fn run( + self, + mut config: Configuration, + builder: B, + ) -> error::Result<()> + where + B: FnOnce(Configuration) -> Result, + G: RuntimeGenesis, + E: ChainSpecExtension, + BC: ServiceBuilderCommand + Unpin, + BB: sp_runtime::traits::Block + Debug, + <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, + ::Hash: std::str::FromStr, + { + crate::fill_import_params(&mut config, &self.import_params, sc_service::Roles::FULL)?; + + let file: Box = match &self.input { + Some(filename) => Box::new(fs::File::open(filename)?), + None => { + let mut buffer = Vec::new(); + io::stdin().read_to_end(&mut buffer)?; + Box::new(io::Cursor::new(buffer)) + }, + }; + + let f = builder(config)? + .import_blocks(file, false) + .compat(); + let f = f.fuse(); + pin_mut!(f); + + run_until_exit(f) + } +} + +impl CheckBlockCmd { + /// Run the check-block command + pub fn run( + self, + mut config: Configuration, + builder: B, + ) -> error::Result<()> + where + B: FnOnce(Configuration) -> Result, + G: RuntimeGenesis, + E: ChainSpecExtension, + BC: ServiceBuilderCommand + Unpin, + BB: sp_runtime::traits::Block + Debug, + <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, + ::Hash: std::str::FromStr, + { + assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing"); + + crate::fill_import_params(&mut config, &self.import_params, sc_service::Roles::FULL)?; + + let input = if self.input.starts_with("0x") { &self.input[2..] } else { &self.input[..] }; + let block_id = match FromStr::from_str(input) { + Ok(hash) => BlockId::hash(hash), + Err(_) => match self.input.parse::() { + Ok(n) => BlockId::number((n as u32).into()), + Err(_) => return Err(error::Error::Input("Invalid hash or number specified".into())), + } + }; + + let start = std::time::Instant::now(); + let f = builder(config)? + .check_block(block_id) + .compat(); + let f = f.fuse(); + pin_mut!(f); + run_until_exit(f)?; + println!("Completed in {} ms.", start.elapsed().as_millis()); + + Ok(()) + } +} + +impl PurgeChainCmd { + /// Run the purge command + pub fn run( + self, + config: Configuration, + builder: B, + ) -> error::Result<()> + where + B: FnOnce(Configuration) -> Result, + G: RuntimeGenesis, + E: ChainSpecExtension, + BC: ServiceBuilderCommand + Unpin, + BB: sp_runtime::traits::Block + Debug, + <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, + ::Hash: std::str::FromStr, + { + assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing"); + + let db_path = match config.database { + DatabaseConfig::Path { path, .. } => path, + _ => { + eprintln!("Cannot purge custom database implementation"); + return Ok(()); + } + }; + + if !self.yes { + print!("Are you sure to remove {:?}? [y/N]: ", &db_path); + io::stdout().flush().expect("failed to flush stdout"); + + let mut input = String::new(); + io::stdin().read_line(&mut input)?; + let input = input.trim(); + + match input.chars().nth(0) { + Some('y') | Some('Y') => {}, + _ => { + println!("Aborted"); + return Ok(()); + }, + } + } + + match fs::remove_dir_all(&db_path) { + Result::Ok(_) => { + println!("{:?} removed.", &db_path); + Ok(()) + }, + Result::Err(ref err) if err.kind() == io::ErrorKind::NotFound => { + eprintln!("{:?} did not exist.", &db_path); + Ok(()) + }, + Result::Err(err) => Result::Err(err.into()) + } + } +} + +impl RevertCmd { + /// Run the revert command + pub fn run( + self, + config: Configuration, + builder: B, + ) -> error::Result<()> + where + B: FnOnce(Configuration) -> Result, + G: RuntimeGenesis, + E: ChainSpecExtension, + BC: ServiceBuilderCommand + Unpin, + BB: sp_runtime::traits::Block + Debug, + <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, + ::Hash: std::str::FromStr, + { + assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing"); + + let blocks = self.num.parse()?; + builder(config)?.revert_chain(blocks)?; + + Ok(()) + } } diff --git a/client/cli/src/runtime.rs b/client/cli/src/runtime.rs new file mode 100644 index 0000000000000..4ace901b53fc0 --- /dev/null +++ b/client/cli/src/runtime.rs @@ -0,0 +1,92 @@ +// Copyright 2017-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + +use futures::{Future, compat::Future01CompatExt, future, future::FutureExt}; +use futures::select; +use futures::pin_mut; +use sc_service::{AbstractService, Configuration, ChainSpecExtension, RuntimeGenesis, ServiceBuilderCommand, ChainSpec}; +use crate::error; + +struct Runtime(F) +where + F: Future> + future::FusedFuture + Unpin, + E: std::error::Error; + +impl Runtime +where + F: Future> + future::FusedFuture + Unpin, + E: std::error::Error, +{ + async fn main(self) -> Result<(), Box> + { + use tokio::signal::unix::{signal, SignalKind}; + + let mut stream_int = signal(SignalKind::interrupt())?; + let mut stream_term = signal(SignalKind::terminate())?; + + let t1 = stream_int.recv().fuse(); + let t2 = stream_term.recv().fuse(); + let mut t3 = self.0; + + pin_mut!(t1, t2); + + select! { + _ = t1 => println!("Caught SIGINT"), + _ = t2 => println!("Caught SIGTERM"), + res = t3 => res?, + } + + Ok(()) + } + + fn run(self) -> Result<(), Box> { + let mut r = tokio::runtime::Runtime::new()?; + r.block_on(self.main()) + } +} + +/// A helper function that runs a future with tokio and stops if the process receives the signal +/// SIGTERM or SIGINT +pub fn run_until_exit( + future: F, +) -> error::Result<()> +where + F: Future> + future::FusedFuture + Unpin, + E: 'static + std::error::Error, +{ + let runtime = Runtime(future); + runtime.run().map_err(|e| e.to_string())?; + + Ok(()) +} + +/// A helper function that runs an `AbstractService` with tokio and stops if the process receives +/// the signal SIGTERM or SIGINT +pub fn run_service_until_exit( + service: T, +) -> error::Result<()> +where + T: AbstractService + Unpin, +{ + // we eagerly drop the service so that the internal exit future is fired, + // but we need to keep holding a reference to the global telemetry guard + let _telemetry = service.telemetry(); + + let runtime = Runtime(service.compat().fuse()); + runtime.run().map_err(|e| e.to_string())?; + + Ok(()) +} diff --git a/client/service/test/src/lib.rs b/client/service/test/src/lib.rs index b63bea4872324..405ad9bbff3a3 100644 --- a/client/service/test/src/lib.rs +++ b/client/service/test/src/lib.rs @@ -185,7 +185,7 @@ fn node_config ( state_cache_size: 16777216, state_cache_child_ratio: None, pruning: Default::default(), - chain_spec: (*spec).clone(), + chain_spec: Some((*spec).clone()), name: format!("Node {}", index), wasm_method: sc_service::config::WasmExecutionMethod::Interpreted, execution_strategies: Default::default(), From cd4fbb58ae1a71f6553d9aba9ba9b5e825a18959 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 22 Jan 2020 16:19:38 +0100 Subject: [PATCH 24/77] WIP --- Cargo.lock | 1 - bin/node/cli/Cargo.toml | 2 -- bin/node/cli/bin/main.rs | 2 -- bin/node/cli/src/cli.rs | 19 +++++------ client/cli/src/lib.rs | 5 ++- client/cli/src/node_key.rs | 2 +- client/cli/src/params.rs | 61 +++++------------------------------- client/cli/src/runtime.rs | 2 +- client/service/src/config.rs | 7 ++++- 9 files changed, 24 insertions(+), 77 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1268ef5701aa2..db146e00a5f1c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3076,7 +3076,6 @@ dependencies = [ "structopt 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-build-script-utils 2.0.0", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", "vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-futures 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml index a953a862186c8..7e39e01478e18 100644 --- a/bin/node/cli/Cargo.toml +++ b/bin/node/cli/Cargo.toml @@ -81,7 +81,6 @@ node-primitives = { version = "2.0.0", path = "../primitives" } node-executor = { version = "2.0.0", path = "../executor" } # CLI-specific dependencies -tokio = { version = "0.1.22", optional = true } sc-cli = { version = "2.0.0", optional = true, path = "../../../client/cli" } node-transaction-factory = { version = "2.0.0", optional = true, path = "../transaction-factory" } @@ -113,7 +112,6 @@ browser = [ cli = [ "sc-cli", "node-transaction-factory", - "tokio", "sc-service/rocksdb", "node-executor/wasmi-errno", ] diff --git a/bin/node/cli/bin/main.rs b/bin/node/cli/bin/main.rs index 80cfbec95ad32..319d4d3c7228e 100644 --- a/bin/node/cli/bin/main.rs +++ b/bin/node/cli/bin/main.rs @@ -18,8 +18,6 @@ #![warn(missing_docs)] -use futures::channel::oneshot; -use futures::{future, FutureExt}; use sc_cli::VersionInfo; fn main() -> Result<(), sc_cli::error::Error> { diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs index 709a7426efadc..a9ce7313f9d0e 100644 --- a/bin/node/cli/src/cli.rs +++ b/bin/node/cli/src/cli.rs @@ -15,10 +15,8 @@ // along with Substrate. If not, see . pub use sc_cli::VersionInfo; -use tokio::runtime::{Builder as RuntimeBuilder, Runtime}; use sc_cli::{SharedParams, ImportParams, error}; use sc_service::{Roles as ServiceRoles, Configuration}; -use log::info; use structopt::StructOpt; use sc_cli::{CoreParams, RunCmd}; use crate::{service, ChainSpec, load_spec}; @@ -26,7 +24,11 @@ use crate::factory_impl::FactoryState; use node_transaction_factory::RuntimeAdapter; #[derive(Clone, Debug, StructOpt)] -#[structopt(settings = &[structopt::clap::AppSettings::GlobalVersion, structopt::clap::AppSettings::ArgsNegateSubcommands, structopt::clap::AppSettings::SubcommandsNegateReqs])] +#[structopt(settings = &[ + structopt::clap::AppSettings::GlobalVersion, + structopt::clap::AppSettings::ArgsNegateSubcommands, + structopt::clap::AppSettings::SubcommandsNegateReqs, +])] enum Cli { #[structopt(flatten)] SubstrateCli(CoreParams), @@ -91,14 +93,7 @@ where let args: Vec<_> = args.collect(); let subcommand = match sc_cli::try_from_iter::(args.clone(), &version) { - Ok(opt) => { - eprintln!( - "WARNING: running this command without the subcommand `run` is deprecated, please \ - use run:\n{} run [node_arguments]", - version.executable_name, - ); - Cli::SubstrateCli(CoreParams::Run(opt)) - }, + Ok(opt) => Cli::SubstrateCli(CoreParams::Run(opt)), Err(_) => sc_cli::from_iter::(args.clone(), &version), }; @@ -116,7 +111,7 @@ where &version, ), Cli::Factory(cli_args) => { - sc_cli::init(&mut config, load_spec, &cli_args.shared_params, &version); + sc_cli::init(&mut config, load_spec, &cli_args.shared_params, &version)?; sc_cli::fill_import_params(&mut config, &cli_args.import_params, ServiceRoles::FULL)?; diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 054c9961b4f66..3841748bf6697 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -44,8 +44,8 @@ use sc_network::{ }; use std::{ - io::{Write, Read, Seek, Cursor, stdin, stdout, ErrorKind}, iter, fmt::Debug, fs::{self, File}, - net::{Ipv4Addr, SocketAddr}, path::{Path, PathBuf}, str::FromStr + io::{Write}, iter, fmt::Debug, fs, + net::{Ipv4Addr, SocketAddr}, path::PathBuf, }; use regex::Regex; @@ -64,7 +64,6 @@ use app_dirs::{AppInfo, AppDataType}; use log::info; use lazy_static::lazy_static; use sc_telemetry::TelemetryEndpoints; -use sp_runtime::generic::BlockId; use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; pub use crate::runtime::{run_until_exit, run_service_until_exit}; diff --git a/client/cli/src/node_key.rs b/client/cli/src/node_key.rs index 7db9b899fb65f..d93c97cff125b 100644 --- a/client/cli/src/node_key.rs +++ b/client/cli/src/node_key.rs @@ -17,7 +17,7 @@ use sc_network::{ self, config::{ - NodeKeyConfig, build_multiaddr, + NodeKeyConfig, }, }; use sp_core::H256; diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 16e0a460c7bd5..5c2fc72d6bbc0 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -14,13 +14,11 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -use crate::traits::GetSharedParams; - use std::{str::FromStr, path::PathBuf}; -use structopt::{StructOpt, clap::{arg_enum, App}}; +use structopt::{StructOpt, clap::arg_enum}; use sc_service::{ AbstractService, Configuration, ChainSpecExtension, RuntimeGenesis, ServiceBuilderCommand, - ChainSpec, config::DatabaseConfig, + config::DatabaseConfig, }; use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; use crate::VersionInfo; @@ -596,40 +594,6 @@ pub struct RunCmd { pub password_filename: Option } -/// Stores all required Cli values for a keyring test account. -struct KeyringTestAccountCliValues { - help: String, - conflicts_with: Vec, - name: String, - variant: sp_keyring::Sr25519Keyring, -} - -lazy_static::lazy_static! { - /// The Cli values for all test accounts. - static ref TEST_ACCOUNTS_CLI_VALUES: Vec = { - sp_keyring::Sr25519Keyring::iter().map(|a| { - let help = format!( - "Shortcut for `--name {} --validator` with session keys for `{}` added to keystore.", - a, - a, - ); - let conflicts_with = sp_keyring::Sr25519Keyring::iter() - .filter(|b| a != *b) - .map(|b| b.to_string().to_lowercase()) - .chain(std::iter::once("name".to_string())) - .collect::>(); - let name = a.to_string().to_lowercase(); - - KeyringTestAccountCliValues { - help, - conflicts_with, - name, - variant: a, - } - }).collect() - }; -} - /// Wrapper for exposing the keyring test accounts into the Cli. #[derive(Debug, Clone, StructOpt)] pub struct Keyring { @@ -914,17 +878,18 @@ impl CoreParams { match self { CoreParams::Run(cmd) => cmd.run(config, new_light, new_full, version), - CoreParams::BuildSpec(cmd) => cmd.run(config, builder), + CoreParams::BuildSpec(cmd) => cmd.run(config), CoreParams::ExportBlocks(cmd) => cmd.run(config, builder), CoreParams::ImportBlocks(cmd) => cmd.run(config, builder), CoreParams::CheckBlock(cmd) => cmd.run(config, builder), - CoreParams::PurgeChain(cmd) => cmd.run(config, builder), + CoreParams::PurgeChain(cmd) => cmd.run(config), CoreParams::Revert(cmd) => cmd.run(config, builder), } } } impl RunCmd { + /// Run the command that runs the node pub fn run( self, mut config: Configuration, @@ -953,19 +918,13 @@ impl RunCmd { impl BuildSpecCmd { /// Run the build-spec command - pub fn run( + pub fn run( self, config: Configuration, - builder: B, ) -> error::Result<()> where - B: FnOnce(Configuration) -> Result, G: RuntimeGenesis, E: ChainSpecExtension, - BC: ServiceBuilderCommand + Unpin, - BB: sp_runtime::traits::Block + Debug, - <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, - ::Hash: std::str::FromStr, { assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing"); @@ -1125,19 +1084,13 @@ impl CheckBlockCmd { impl PurgeChainCmd { /// Run the purge command - pub fn run( + pub fn run( self, config: Configuration, - builder: B, ) -> error::Result<()> where - B: FnOnce(Configuration) -> Result, G: RuntimeGenesis, E: ChainSpecExtension, - BC: ServiceBuilderCommand + Unpin, - BB: sp_runtime::traits::Block + Debug, - <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, - ::Hash: std::str::FromStr, { assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing"); diff --git a/client/cli/src/runtime.rs b/client/cli/src/runtime.rs index 4ace901b53fc0..164fa4a4a416f 100644 --- a/client/cli/src/runtime.rs +++ b/client/cli/src/runtime.rs @@ -17,7 +17,7 @@ use futures::{Future, compat::Future01CompatExt, future, future::FutureExt}; use futures::select; use futures::pin_mut; -use sc_service::{AbstractService, Configuration, ChainSpecExtension, RuntimeGenesis, ServiceBuilderCommand, ChainSpec}; +use sc_service::AbstractService; use crate::error; struct Runtime(F) diff --git a/client/service/src/config.rs b/client/service/src/config.rs index df2a2cf09a724..4e8cb62ed18e0 100644 --- a/client/service/src/config.rs +++ b/client/service/src/config.rs @@ -149,7 +149,7 @@ impl Default for Configuration where { /// Create a default config fn default() -> Self { - let mut configuration = Configuration { + let configuration = Configuration { impl_name: "parity-substrate", impl_version: "0.0.0", impl_commit: "", @@ -213,6 +213,11 @@ impl Configuration { }) } + /// Return a reference to the `ChainSpec` of this `Configuration`. + /// + /// ### Panics + /// + /// This method panic if the `chain_spec` is `None` pub fn expect_chain_spec(&self) -> &ChainSpec { self.chain_spec.as_ref().expect("chain_spec must be specified") } From a7d14f454dbb1ba670c01657bbb46ea9522a7138 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 22 Jan 2020 17:08:34 +0100 Subject: [PATCH 25/77] WIP --- client/cli/src/lib.rs | 66 ++++++------------------------------ client/service/src/config.rs | 4 +-- 2 files changed, 11 insertions(+), 59 deletions(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 3841748bf6697..197e6e659bc0f 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -433,9 +433,8 @@ pub fn fill_import_params( cli: &ImportParams, role: sc_service::Roles, ) -> error::Result<()> - where - G: RuntimeGenesis, - E: ChainSpecExtension, +where + G: RuntimeGenesis, { match config.database { DatabaseConfig::Path { ref mut cache_size, .. } => @@ -488,7 +487,6 @@ pub fn update_config_for_running_node( ) -> error::Result<()> where G: RuntimeGenesis, - E: ChainSpecExtension, { fill_config_keystore_password_and_path(&mut config, &cli)?; @@ -713,29 +711,20 @@ mod tests { None, None, None, - None, + None::<()>, ); - let version_info = VersionInfo { - name: "test", - version: "42", - commit: "234234", - executable_name: "test", - description: "cool test", - author: "universe", - support_url: "com", - }; - for keystore_path in vec![None, Some("/keystore/path")] { - let mut run_cmds = RunCmd::from_args(); - run_cmds.shared_params.base_path = Some(PathBuf::from("/test/path")); + let args: Vec<&str> = vec![]; + let mut run_cmds = RunCmd::from_iter(args); run_cmds.keystore_path = keystore_path.clone().map(PathBuf::from); - let node_config = create_run_node_config( + let mut node_config = Configuration::default(); + node_config.config_dir = Some(PathBuf::from("/test/path")); + node_config.chain_spec = Some(chain_spec.clone()); + update_config_for_running_node( + &mut node_config, run_cmds.clone(), - |_| Ok(Some(chain_spec.clone())), - "test", - &version_info, ).unwrap(); let expected_path = match keystore_path { @@ -746,39 +735,4 @@ mod tests { assert_eq!(expected_path, node_config.keystore.path().unwrap().to_owned()); } } - - #[test] - fn parse_and_prepare_into_configuration() { - let chain_spec = ChainSpec::from_genesis( - "test", - "test-id", - || (), - Vec::new(), - None, - None, - None, - None, - ); - let version = VersionInfo { - name: "test", - version: "42", - commit: "234234", - executable_name: "test", - description: "cool test", - author: "universe", - support_url: "com", - }; - let spec_factory = |_: &str| Ok(Some(chain_spec.clone())); - - let args = vec!["substrate", "run", "--dev", "--state-cache-size=42"]; - let core_params = from_iter(args, &version); - let config = get_config(&core_params, spec_factory, "substrate", &version).unwrap(); - assert_eq!(config.roles, sc_service::Roles::AUTHORITY); - assert_eq!(config.state_cache_size, 42); - - let args = vec!["substrate", "import-blocks", "--dev"]; - let core_params = from_iter(args, &version); - let config = get_config(&core_params, spec_factory, "substrate", &version).unwrap(); - assert_eq!(config.roles, sc_service::Roles::FULL); - } } diff --git a/client/service/src/config.rs b/client/service/src/config.rs index 4e8cb62ed18e0..50547636e86cd 100644 --- a/client/service/src/config.rs +++ b/client/service/src/config.rs @@ -143,9 +143,7 @@ pub enum DatabaseConfig { Custom(Arc), } -impl Default for Configuration where - G: RuntimeGenesis, - E: Extension, +impl Default for Configuration { /// Create a default config fn default() -> Self { From 165631c0bf353c94a8f95317bb4a5517fc41c12f Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 22 Jan 2020 17:23:46 +0100 Subject: [PATCH 26/77] WIP --- utils/browser/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/browser/src/lib.rs b/utils/browser/src/lib.rs index dd632760d816a..cd9019f3220ae 100644 --- a/utils/browser/src/lib.rs +++ b/utils/browser/src/lib.rs @@ -48,7 +48,7 @@ where let name = chain_spec.name().to_string(); let transport = ExtTransport::new(transport); - let mut config = Configuration::default_with_spec_and_base_path(chain_spec, None); + let mut config = Configuration::default(); config.network.transport = network::config::TransportConfig::Normal { wasm_external_transport: Some(transport.clone()), allow_private_ipv4: true, From d17ed47f0b97fcbbd1c7011129240912ff311aa2 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 22 Jan 2020 17:24:11 +0100 Subject: [PATCH 27/77] WIP --- client/service/src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/service/src/config.rs b/client/service/src/config.rs index 50547636e86cd..358acba6d5a0b 100644 --- a/client/service/src/config.rs +++ b/client/service/src/config.rs @@ -23,7 +23,7 @@ pub use sc_executor::WasmExecutionMethod; use std::{path::{PathBuf, Path}, net::SocketAddr, sync::Arc}; pub use sc_transaction_pool::txpool::Options as TransactionPoolOptions; -use sc_chain_spec::{ChainSpec, RuntimeGenesis, Extension, NoExtension}; +use sc_chain_spec::{ChainSpec, NoExtension}; use sp_core::crypto::Protected; use target_info::Target; use sc_telemetry::TelemetryEndpoints; From 33e93140feb62c8c71fd82284aa9627c8df0afb0 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Thu, 23 Jan 2020 11:58:15 +0100 Subject: [PATCH 28/77] fixed node-template --- bin/node-template/src/cli.rs | 5 ++++- client/cli/src/runtime.rs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/node-template/src/cli.rs b/bin/node-template/src/cli.rs index 49df98814215a..8bc1e061a5c6c 100644 --- a/bin/node-template/src/cli.rs +++ b/bin/node-template/src/cli.rs @@ -13,13 +13,16 @@ where let args: Vec<_> = args.collect(); let core_params = sc_cli::from_iter::(args.clone(), &version); + let mut config = sc_service::Configuration::default(); + config.impl_name = "node-template"; + sc_cli::run( + config, core_params, service::new_light, service::new_full, load_spec, |config: _| Ok(new_full_start!(config).0), - "node-template", &version, ) } diff --git a/client/cli/src/runtime.rs b/client/cli/src/runtime.rs index aaadff6a42036..733251e64b394 100644 --- a/client/cli/src/runtime.rs +++ b/client/cli/src/runtime.rs @@ -90,7 +90,7 @@ where service.await?; - handle.await; + handle.await?; Ok(()) } From c1dd237190cbf59d1ef23b5499aff87646d6c2b9 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Thu, 23 Jan 2020 12:02:51 +0100 Subject: [PATCH 29/77] WIP --- client/cli/src/runtime.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/runtime.rs b/client/cli/src/runtime.rs index 733251e64b394..c549cb42ad681 100644 --- a/client/cli/src/runtime.rs +++ b/client/cli/src/runtime.rs @@ -90,7 +90,7 @@ where service.await?; - handle.await?; + handle.await.map_err(|e| e.to_string())?; Ok(()) } From 7c14ccfd216cbd0cb96d496834a6b7b3b1346dad Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Thu, 23 Jan 2020 12:03:33 +0100 Subject: [PATCH 30/77] WIP --- Cargo.lock | 1 - bin/node-template/Cargo.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 10cd27f56ab65..a9d3410d89820 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3236,7 +3236,6 @@ dependencies = [ "sp-inherents 2.0.0", "sp-runtime 2.0.0", "sp-transaction-pool 2.0.0", - "structopt 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-build-script-utils 2.0.0", "vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/bin/node-template/Cargo.toml b/bin/node-template/Cargo.toml index 0195e5b33ddd2..e377d5a4e14fd 100644 --- a/bin/node-template/Cargo.toml +++ b/bin/node-template/Cargo.toml @@ -30,7 +30,6 @@ sc-client = { version = "0.8", path = "../../client/" } node-template-runtime = { version = "2.0.0", path = "runtime" } sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } sc-basic-authorship = { path = "../../client/basic-authorship" } -structopt = "=0.3.8" [build-dependencies] vergen = "3.0.4" From fee08c4f1f7fb7c96f1471ee8d5b5c2689eef163 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Thu, 23 Jan 2020 12:46:22 +0100 Subject: [PATCH 31/77] WIP --- client/cli/src/lib.rs | 12 ++++++---- client/cli/src/params.rs | 50 +++++++++++++++++++++++++++++++++++----- 2 files changed, 51 insertions(+), 11 deletions(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 72b40a8101acd..84c1c2de29e63 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -513,8 +513,9 @@ where { fill_config_keystore_password_and_path(&mut config, &cli)?; + let keyring = cli.get_keyring(); let is_dev = cli.shared_params.dev; - let is_authority = cli.validator || cli.sentry || is_dev || cli.keyring.account.is_some(); + let is_authority = cli.validator || cli.sentry || is_dev || keyring.is_some(); let role = if cli.light { sc_service::Roles::LIGHT @@ -526,9 +527,10 @@ where fill_import_params(&mut config, &cli.import_params, role, is_dev)?; - config.name = match cli.name.or(cli.keyring.account.map(|a| a.to_string())) { - None => node_key::generate_node_name(), - Some(name) => name, + config.name = match (cli.name.as_ref(), keyring) { + (Some(name), _) => name.to_string(), + (_, Some(keyring)) => keyring.to_string(), + (None, None) => node_key::generate_node_name(), }; match node_key::is_node_name_valid(&config.name) { Ok(_) => (), @@ -566,7 +568,7 @@ where fill_transaction_pool_configuration(&mut config, cli.pool_config)?; - config.dev_key_seed = cli.keyring.account + config.dev_key_seed = keyring .map(|a| format!("//{}", a)).or_else(|| { if is_dev { Some("//Alice".into()) diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index a2a24642d589b..956196f71b99f 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -544,8 +544,36 @@ pub struct RunCmd { pub pool_config: TransactionPoolParams, #[allow(missing_docs)] - #[structopt(flatten)] - pub keyring: Keyring, + #[structopt(long, conflicts_with_all = &["bob", "charlie", "dave", "eve", "ferdie", "one", "two"])] + pub alice: bool, + + #[allow(missing_docs)] + #[structopt(long, conflicts_with_all = &["alice", "charlie", "dave", "eve", "ferdie", "one", "two"])] + pub bob: bool, + + #[allow(missing_docs)] + #[structopt(long, conflicts_with_all = &["alice", "bob", "dave", "eve", "ferdie", "one", "two"])] + pub charlie: bool, + + #[allow(missing_docs)] + #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "eve", "ferdie", "one", "two"])] + pub dave: bool, + + #[allow(missing_docs)] + #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "ferdie", "one", "two"])] + pub eve: bool, + + #[allow(missing_docs)] + #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "one", "two"])] + pub ferdie: bool, + + #[allow(missing_docs)] + #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "two"])] + pub one: bool, + + #[allow(missing_docs)] + #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "one"])] + pub two: bool, /// Enable authoring even when offline. #[structopt(long = "force-authoring")] @@ -593,10 +621,20 @@ pub struct RunCmd { pub password_filename: Option } -/// Wrapper for exposing the keyring test accounts into the Cli. -#[derive(Debug, Clone, StructOpt)] -pub struct Keyring { - pub account: Option, +impl RunCmd { + pub fn get_keyring(&self) -> Option { + use sp_keyring::Sr25519Keyring::*; + + if self.alice { Some(Alice) } + else if self.bob { Some(Bob) } + else if self.charlie { Some(Charlie) } + else if self.dave { Some(Dave) } + else if self.eve { Some(Eve) } + else if self.ferdie { Some(Ferdie) } + else if self.one { Some(One) } + else if self.two { Some(Two) } + else { None } + } } /// Default to verbosity level 0, if none is provided. From 4bf2cfb9a73cea3c5d9f35d46f06df5d9da0d749 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Thu, 23 Jan 2020 13:36:07 +0100 Subject: [PATCH 32/77] WIP --- Cargo.lock | 25 ------------------------- bin/node/cli/Cargo.toml | 4 +--- bin/node/cli/build.rs | 3 +-- bin/utils/chain-spec-builder/Cargo.toml | 2 +- client/cli/Cargo.toml | 5 ++--- client/cli/src/lib.rs | 7 +++---- 6 files changed, 8 insertions(+), 38 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b630d6d03b6d0..590ff1b15d3d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -924,15 +924,6 @@ dependencies = [ "stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "ctrlc" -version = "3.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "cuckoofilter" version = "0.3.2" @@ -3006,18 +2997,6 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "nix" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "node-cli" version = "2.0.0" @@ -3025,7 +3004,6 @@ dependencies = [ "browser-utils 0.8.0", "frame-support 2.0.0", "frame-system 2.0.0", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5115,7 +5093,6 @@ dependencies = [ "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ctrlc 3.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -8387,7 +8364,6 @@ dependencies = [ "checksum ct-logs 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4d3686f5fa27dbc1d76c751300376e167c5a43387f44bb451fd1c24776e49113" "checksum ctor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8ce37ad4184ab2ce004c33bf6379185d3b1c95801cab51026bd271bf68eedc" "checksum ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "022cd691704491df67d25d006fe8eca083098253c4d43516c2206479c58c6736" -"checksum ctrlc 3.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c7dfd2d8b4c82121dfdff120f818e09fc4380b0b7e17a742081a89b94853e87f" "checksum cuckoofilter 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8dd43f7cfaffe0a386636a10baea2ee05cc50df3b77bea4a456c9572a939bf1f" "checksum curve25519-dalek 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8b7dcd30ba50cdf88b55b033456138b7c0ac4afdc436d82e1b79f370f24cc66d" "checksum curve25519-dalek 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "26778518a7f6cffa1d25a44b602b62b979bd88adb9e99ffec546998cf3404839" @@ -8575,7 +8551,6 @@ dependencies = [ "checksum names 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef320dab323286b50fb5cdda23f61c796a72a89998ab565ca32525c5c556f2da" "checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" -"checksum nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce" "checksum nodrop 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" "checksum nohash-hasher 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4e657a6ec97f9a3ba46f6f7034ea6db9fcd5b71d25ef1074b7bc03da49be0e8e" "checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml index 4d52f3b7c626e..a8f0c654f1202 100644 --- a/bin/node/cli/Cargo.toml +++ b/bin/node/cli/Cargo.toml @@ -25,13 +25,12 @@ crate-type = ["cdylib", "rlib"] # third-party dependencies codec = { package = "parity-scale-codec", version = "1.0.6" } serde = { version = "1.0.102", features = ["derive"] } -futures01 = { package = "futures", version = "0.1.29" } futures = { version = "0.3.1", features = ["compat"] } hex-literal = "0.2.1" jsonrpc-core = "14.0.3" log = "0.4.8" rand = "0.7.2" -structopt = "=0.3.8" +structopt = "0.3.8" # primitives sp-authority-discovery = { version = "2.0.0", path = "../../../primitives/authority-discovery" } @@ -99,7 +98,6 @@ tempfile = "3.1.0" [build-dependencies] sc-cli = { version = "0.8.0", package = "sc-cli", path = "../../../client/cli" } build-script-utils = { version = "2.0.0", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" } -structopt = "=0.3.8" vergen = "3.0.4" [features] diff --git a/bin/node/cli/build.rs b/bin/node/cli/build.rs index 1efeff0c83cb9..58f10f617acac 100644 --- a/bin/node/cli/build.rs +++ b/bin/node/cli/build.rs @@ -15,8 +15,7 @@ // along with Substrate. If not, see . use std::{fs, env, path::Path}; -use structopt::{StructOpt, clap::Shell}; -use sc_cli::CoreParams; +use sc_cli::{CoreParams, structopt::{StructOpt, clap::Shell}}; use vergen::{ConstantsFlags, generate_cargo_keys}; fn main() { diff --git a/bin/utils/chain-spec-builder/Cargo.toml b/bin/utils/chain-spec-builder/Cargo.toml index 9095d181a7aaf..62f398d41e0d6 100644 --- a/bin/utils/chain-spec-builder/Cargo.toml +++ b/bin/utils/chain-spec-builder/Cargo.toml @@ -11,4 +11,4 @@ sc-keystore = { version = "2.0.0", path = "../../../client/keystore" } node-cli = { version = "2.0.0", path = "../../node/cli" } sp-core = { version = "2.0.0", path = "../../../primitives/core" } rand = "0.7.2" -structopt = "=0.3.8" +structopt = "0.3.8" diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml index 86648e86cb9a9..2e16f82edb10d 100644 --- a/client/cli/Cargo.toml +++ b/client/cli/Cargo.toml @@ -17,7 +17,7 @@ ansi_term = "0.12.1" lazy_static = "1.4.0" app_dirs = "1.2.1" tokio = { version = "0.2.9", features = [ "signal", "rt-core", "rt-threaded" ] } -futures = { version = "0.3.1", features = ["compat"] } +futures = "0.3.1" fdlimit = "0.1.1" serde_json = "1.0.41" sp-panic-handler = { version = "2.0.0", path = "../../primitives/panic-handler" } @@ -31,9 +31,8 @@ sp-state-machine = { version = "0.8", path = "../../primitives/state-machine" } sc-telemetry = { version = "2.0.0", path = "../telemetry" } sp-keyring = { version = "2.0.0", path = "../../primitives/keyring" } names = "0.11.0" -structopt = "=0.3.8" +structopt = "0.3.8" sc-tracing = { version = "2.0.0", path = "../tracing" } -ctrlc = { version = "3.1.3", features = ["termination"] } [target.'cfg(not(target_os = "unknown"))'.dependencies] rpassword = "4.0.1" diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 84c1c2de29e63..567e29bcddd29 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -49,9 +49,8 @@ use std::{ }; use regex::Regex; -pub use structopt::StructOpt; -#[doc(hidden)] -pub use structopt::clap::App; +use structopt::{StructOpt, clap}; +pub use structopt; use params::{ NetworkConfigurationParams, TransactionPoolParams, Cors, }; @@ -169,7 +168,7 @@ where /// used. It will return a [`clap::Error`], where the [`kind`] is a /// [`ErrorKind::HelpDisplayed`] or [`ErrorKind::VersionDisplayed`] respectively. You must call /// [`Error::exit`] or perform a [`std::process::exit`]. -pub fn try_from_iter(iter: I, version: &VersionInfo) -> structopt::clap::Result +pub fn try_from_iter(iter: I, version: &VersionInfo) -> clap::Result where T: StructOpt + Sized, I: IntoIterator, From 8c85245d53ac2ece04e52ff97a825eae9825fefc Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Thu, 23 Jan 2020 13:38:44 +0100 Subject: [PATCH 33/77] WIP --- Cargo.lock | 1 - bin/node-template/Cargo.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 590ff1b15d3d8..3ccdc7058970c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3194,7 +3194,6 @@ dependencies = [ name = "node-template" version = "2.0.0" dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "node-template-runtime 2.0.0", diff --git a/bin/node-template/Cargo.toml b/bin/node-template/Cargo.toml index e377d5a4e14fd..02ab9e6fd25ed 100644 --- a/bin/node-template/Cargo.toml +++ b/bin/node-template/Cargo.toml @@ -11,7 +11,6 @@ path = "src/main.rs" [dependencies] futures = "0.3.1" -futures01 = { package = "futures", version = "0.1.29" } log = "0.4.8" sc-cli = { version = "0.8.0", path = "../../client/cli" } sp-core = { version = "2.0.0", path = "../../primitives/core" } From 5ee61976fdd8beee41b073910fe3cf86f5b544f7 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Thu, 23 Jan 2020 14:19:26 +0100 Subject: [PATCH 34/77] WIP --- bin/node/cli/src/browser.rs | 4 ++-- client/service/src/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/node/cli/src/browser.rs b/bin/node/cli/src/browser.rs index 9747a583c7808..6b5751e1164c2 100644 --- a/bin/node/cli/src/browser.rs +++ b/bin/node/cli/src/browser.rs @@ -38,13 +38,13 @@ async fn start_inner(wasm_ext: Transport) -> Result = browser_configuration(wasm_ext, chain_spec) + let config: Configuration<_, _> = browser_configuration(wasm_ext, chain_spec) .await?; info!("Substrate browser node"); info!(" version {}", config.full_version()); info!(" by Parity Technologies, 2017-2019"); - info!("Chain specification: {}", config.chain_spec.name()); + info!("Chain specification: {}", config.expect_chain_spec().name()); info!("Node name: {}", config.name); info!("Roles: {:?}", config.roles); diff --git a/client/service/src/lib.rs b/client/service/src/lib.rs index 5d63c8b0f0de8..c5ff713f00ba0 100644 --- a/client/service/src/lib.rs +++ b/client/service/src/lib.rs @@ -544,8 +544,8 @@ fn start_rpc_servers sc_rpc_server::RpcHandler sc_rpc_server::RpcHandler>( - _: &Configuration, +fn start_rpc_servers sc_rpc_server::RpcHandler>( + _: &Configuration, _: H ) -> Result, error::Error> { Ok(Box::new(())) From c69956e48389467e6263f9120675808c007b6f67 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Thu, 23 Jan 2020 14:34:54 +0100 Subject: [PATCH 35/77] WIP --- bin/node/cli/Cargo.toml | 13 ++++++-- bin/node/cli/build.rs | 66 +++++++++++++++++++++++------------------ 2 files changed, 48 insertions(+), 31 deletions(-) diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml index a8f0c654f1202..bf52a5e3c3785 100644 --- a/bin/node/cli/Cargo.toml +++ b/bin/node/cli/Cargo.toml @@ -96,9 +96,17 @@ futures = "0.3.1" tempfile = "3.1.0" [build-dependencies] -sc-cli = { version = "0.8.0", package = "sc-cli", path = "../../../client/cli" } build-script-utils = { version = "2.0.0", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" } -vergen = "3.0.4" + +[build-dependencies.sc-cli] +version = "0.8.0" +package = "sc-cli" +path = "../../../client/cli" +optional = true + +[build-dependencies.vergen] +version = "3.0.4" +optional = true [features] default = ["cli", "wasmtime"] @@ -112,6 +120,7 @@ cli = [ "node-transaction-factory", "sc-service/rocksdb", "node-executor/wasmi-errno", + "vergen", ] wasmtime = [ "cli", diff --git a/bin/node/cli/build.rs b/bin/node/cli/build.rs index 58f10f617acac..1d4a8774f73f6 100644 --- a/bin/node/cli/build.rs +++ b/bin/node/cli/build.rs @@ -14,38 +14,46 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -use std::{fs, env, path::Path}; -use sc_cli::{CoreParams, structopt::{StructOpt, clap::Shell}}; -use vergen::{ConstantsFlags, generate_cargo_keys}; - fn main() { - build_shell_completion(); - generate_cargo_keys(ConstantsFlags::all()).expect("Failed to generate metadata files"); - - build_script_utils::rerun_if_git_head_changed(); + #[cfg(feature = "cli")] + cli::main(); } -/// Build shell completion scripts for all known shells -/// Full list in https://github.com/kbknapp/clap-rs/blob/e9d0562a1dc5dfe731ed7c767e6cee0af08f0cf9/src/app/parser.rs#L123 -fn build_shell_completion() { - for shell in &[Shell::Bash, Shell::Fish, Shell::Zsh, Shell::Elvish, Shell::PowerShell] { - build_completion(shell); +#[cfg(feature = "cli")] +mod cli { + use std::{fs, env, path::Path}; + use sc_cli::{CoreParams, structopt::{StructOpt, clap::Shell}}; + use vergen::{ConstantsFlags, generate_cargo_keys}; + + pub fn main() { + build_shell_completion(); + generate_cargo_keys(ConstantsFlags::all()).expect("Failed to generate metadata files"); + + build_script_utils::rerun_if_git_head_changed(); + } + + /// Build shell completion scripts for all known shells + /// Full list in https://github.com/kbknapp/clap-rs/blob/e9d0562a1dc5dfe731ed7c767e6cee0af08f0cf9/src/app/parser.rs#L123 + fn build_shell_completion() { + for shell in &[Shell::Bash, Shell::Fish, Shell::Zsh, Shell::Elvish, Shell::PowerShell] { + build_completion(shell); + } } -} -/// Build the shell auto-completion for a given Shell -fn build_completion(shell: &Shell) { - let outdir = match env::var_os("OUT_DIR") { - None => return, - Some(dir) => dir, - }; - let path = Path::new(&outdir) - .parent().unwrap() - .parent().unwrap() - .parent().unwrap() - .join("completion-scripts"); - - fs::create_dir(&path).ok(); - - CoreParams::clap().gen_completions("substrate-node", *shell, &path); + /// Build the shell auto-completion for a given Shell + fn build_completion(shell: &Shell) { + let outdir = match env::var_os("OUT_DIR") { + None => return, + Some(dir) => dir, + }; + let path = Path::new(&outdir) + .parent().unwrap() + .parent().unwrap() + .parent().unwrap() + .join("completion-scripts"); + + fs::create_dir(&path).ok(); + + CoreParams::clap().gen_completions("substrate-node", *shell, &path); + } } From 93fd4ceb542ed010b62e3927466191d9e2377f7b Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Thu, 23 Jan 2020 15:46:02 +0100 Subject: [PATCH 36/77] WIP --- client/cli/src/lib.rs | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 567e29bcddd29..2cbe99ee0f413 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -576,15 +576,21 @@ where } }); - let rpc_interface: &str = interface_str(cli.rpc_external, cli.unsafe_rpc_external, cli.validator)?; - let ws_interface: &str = interface_str(cli.ws_external, cli.unsafe_ws_external, cli.validator)?; - let grafana_interface: &str = if cli.grafana_external { "0.0.0.0" } else { "127.0.0.1" }; - - config.rpc_http = Some(parse_address(&format!("{}:{}", rpc_interface, 9933), cli.rpc_port)?); - config.rpc_ws = Some(parse_address(&format!("{}:{}", ws_interface, 9944), cli.ws_port)?); - config.grafana_port = Some( - parse_address(&format!("{}:{}", grafana_interface, 9955), cli.grafana_port)? - ); + if config.rpc_http.is_none() { + let rpc_interface: &str = interface_str(cli.rpc_external, cli.unsafe_rpc_external, cli.validator)?; + config.rpc_http = Some(parse_address(&format!("{}:{}", rpc_interface, 9933), cli.rpc_port)?); + } + if config.rpc_ws.is_none() { + let ws_interface: &str = interface_str(cli.ws_external, cli.unsafe_ws_external, cli.validator)?; + config.rpc_ws = Some(parse_address(&format!("{}:{}", ws_interface, 9944), cli.ws_port)?); + } + + if config.grafana_port.is_none() { + let grafana_interface: &str = if cli.grafana_external { "0.0.0.0" } else { "127.0.0.1" }; + config.grafana_port = Some( + parse_address(&format!("{}:{}", grafana_interface, 9955), cli.grafana_port)? + ); + } config.rpc_ws_max_connections = cli.ws_max_connections; config.rpc_cors = cli.rpc_cors.unwrap_or_else(|| if is_dev { From 58b8db28493fe033d5962a820262fc9f22c89292 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 27 Jan 2020 13:32:49 +0100 Subject: [PATCH 37/77] Update client/cli/src/lib.rs Co-Authored-By: Pierre Krieger --- client/cli/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 2cbe99ee0f413..35b91b6a75b22 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -44,7 +44,7 @@ use sc_network::{ }; use std::{ - io::{Write}, iter, fmt::Debug, fs, + io::Write, iter, fmt::Debug, fs, net::{Ipv4Addr, SocketAddr}, path::PathBuf, }; From 4ab4bf270247ab2d1cd17b8e847a92e0830ef000 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 27 Jan 2020 13:38:00 +0100 Subject: [PATCH 38/77] WIP --- client/cli/src/lib.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 35b91b6a75b22..4f65b8e503d3d 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -127,7 +127,11 @@ fn base_path(cli: &SharedParams, version: &VersionInfo) -> PathBuf { ) } -/// Gets the struct from the command line arguments. Print the +/// Helper function used to parse the command line arguments. This is the equivalent of +/// `structopt`'s `from_args()` except that it takes a `VersionInfo` argument to provide the name of +/// the application, author, "about" and version. +/// +/// Gets the struct from the command line arguments. Print the /// error message and quit the program in case of failure. pub fn from_args(version: &VersionInfo) -> T where @@ -136,6 +140,10 @@ where from_iter::(&mut std::env::args_os(), version) } +/// Helper function used to parse the command line arguments. This is the equivalent of +/// `structopt`'s `from_iter()` except that it takes a `VersionInfo` argument to provide the name of +/// the application, author, "about" and version. +/// /// Gets the struct from any iterator such as a `Vec` of your making. /// Print the error message and quit the program in case of failure. pub fn from_iter(iter: I, version: &VersionInfo) -> T @@ -161,6 +169,10 @@ where T::from_clap(&app.get_matches_from(iter)) } +/// Helper function used to parse the command line arguments. This is the equivalent of +/// `structopt`'s `try_from_iter()` except that it takes a `VersionInfo` argument to provide the +/// name of the application, author, "about" and version. +/// /// Gets the struct from any iterator such as a `Vec` of your making. /// Print the error message and quit the program in case of failure. /// From cc7e6847989376e7c863cb4822129c99fd08b34b Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 27 Jan 2020 13:38:55 +0100 Subject: [PATCH 39/77] Update client/cli/src/lib.rs Co-Authored-By: Pierre Krieger --- client/cli/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 4f65b8e503d3d..a0be81db20899 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -205,7 +205,7 @@ where Ok(T::from_clap(&matches)) } -/// A helper function that: +/// A helper function that initializes and runs any of the command variants of `CoreParams`. /// 1. initialize /// 2. runs any of the command variant of `CoreParams` pub fn run( From 7ffc8e563d7ebda2965e9c4f5c991919597016a2 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 27 Jan 2020 13:39:23 +0100 Subject: [PATCH 40/77] WIP --- client/cli/src/lib.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index a0be81db20899..dc414c70b1f3c 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -206,8 +206,6 @@ where } /// A helper function that initializes and runs any of the command variants of `CoreParams`. -/// 1. initialize -/// 2. runs any of the command variant of `CoreParams` pub fn run( mut config: Configuration, core_params: CoreParams, From 63b7735494d326817fafa92d21573cbf84cc5361 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 27 Jan 2020 13:49:22 +0100 Subject: [PATCH 41/77] WIP --- client/cli/src/lib.rs | 17 +++++++++++++++++ client/cli/src/node_key.rs | 17 ----------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index dc414c70b1f3c..8e27dcbd1c36c 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -66,6 +66,7 @@ use sc_telemetry::TelemetryEndpoints; use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; pub use crate::runtime::{run_until_exit, run_service_until_exit}; use execution_strategy::*; +use names::{Generator, Name}; /// default sub directory to store network config const DEFAULT_NETWORK_CONFIG_PATH : &'static str = "network"; @@ -74,6 +75,9 @@ const DEFAULT_DB_CONFIG_PATH : &'static str = "db"; /// default sub directory for the key store const DEFAULT_KEYSTORE_CONFIG_PATH : &'static str = "keystore"; +/// The maximum number of characters for a node name. +const NODE_NAME_MAX_LENGTH: usize = 32; + /// Executable version. Used to pass version information from the root crate. #[derive(Clone)] pub struct VersionInfo { @@ -100,6 +104,19 @@ fn get_chain_key(cli: &SharedParams) -> String { } } +fn generate_node_name() -> String { + let result = loop { + let node_name = Generator::with_naming(Name::Numbered).next().unwrap(); + let count = node_name.chars().count(); + + if count < NODE_NAME_MAX_LENGTH { + break node_name + } + }; + + result +} + /// Load spec give shared params and spec factory. pub fn load_spec(cli: &SharedParams, factory: F) -> error::Result> where G: RuntimeGenesis, diff --git a/client/cli/src/node_key.rs b/client/cli/src/node_key.rs index d93c97cff125b..376b459bfeb71 100644 --- a/client/cli/src/node_key.rs +++ b/client/cli/src/node_key.rs @@ -21,33 +21,16 @@ use sc_network::{ }, }; use sp_core::H256; -use names::{Generator, Name}; use regex::Regex; use std::{path::{Path, PathBuf}, str::FromStr}; use crate::error; use crate::params::{NodeKeyParams, NodeKeyType}; -/// The maximum number of characters for a node name. -const NODE_NAME_MAX_LENGTH: usize = 32; - /// The file name of the node's Ed25519 secret key inside the chain-specific /// network config directory, if neither `--node-key` nor `--node-key-file` /// is specified in combination with `--node-key-type=ed25519`. const NODE_KEY_ED25519_FILE: &str = "secret_ed25519"; -pub fn generate_node_name() -> String { - let result = loop { - let node_name = Generator::with_naming(Name::Numbered).next().unwrap(); - let count = node_name.chars().count(); - - if count < NODE_NAME_MAX_LENGTH { - break node_name - } - }; - - result -} - /// Check whether a node name is considered as valid pub fn is_node_name_valid(_name: &str) -> Result<(), &str> { let name = _name.to_string(); From bc288877eaa1234a787435f705d93e55ba601960 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 27 Jan 2020 13:54:03 +0100 Subject: [PATCH 42/77] WIP --- client/cli/src/lib.rs | 2 +- client/cli/src/node_key.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 8e27dcbd1c36c..7a038a2f8a01f 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -556,7 +556,7 @@ where config.name = match (cli.name.as_ref(), keyring) { (Some(name), _) => name.to_string(), (_, Some(keyring)) => keyring.to_string(), - (None, None) => node_key::generate_node_name(), + (None, None) => generate_node_name(), }; match node_key::is_node_name_valid(&config.name) { Ok(_) => (), diff --git a/client/cli/src/node_key.rs b/client/cli/src/node_key.rs index 376b459bfeb71..4df3b8e9d514b 100644 --- a/client/cli/src/node_key.rs +++ b/client/cli/src/node_key.rs @@ -34,7 +34,7 @@ const NODE_KEY_ED25519_FILE: &str = "secret_ed25519"; /// Check whether a node name is considered as valid pub fn is_node_name_valid(_name: &str) -> Result<(), &str> { let name = _name.to_string(); - if name.chars().count() >= NODE_NAME_MAX_LENGTH { + if name.chars().count() >= crate::NODE_NAME_MAX_LENGTH { return Err("Node name too long"); } From 891eb191ce82738c7a676e5f1cb5a8aef0e2be75 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 27 Jan 2020 13:54:31 +0100 Subject: [PATCH 43/77] WIP --- client/cli/src/runtime.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/runtime.rs b/client/cli/src/runtime.rs index c549cb42ad681..fd81088bc833a 100644 --- a/client/cli/src/runtime.rs +++ b/client/cli/src/runtime.rs @@ -35,7 +35,7 @@ where let t2 = stream_term.recv().fuse(); let mut t3 = func; - pin_mut!(t1, t2); + pin_mut!(t1, t2, t3); select! { _ = t1 => println!("Caught SIGINT"), From f75e03ba08bf241c5a8ca814cdf2abf3091e7546 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 27 Jan 2020 13:54:49 +0100 Subject: [PATCH 44/77] WIP --- client/cli/src/runtime.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/runtime.rs b/client/cli/src/runtime.rs index fd81088bc833a..8af7d5e4576db 100644 --- a/client/cli/src/runtime.rs +++ b/client/cli/src/runtime.rs @@ -23,7 +23,7 @@ use crate::informant; async fn main(func: F) -> Result<(), Box> where - F: Future> + future::FusedFuture + Unpin, + F: Future> + future::FusedFuture, E: 'static + std::error::Error, { use tokio::signal::unix::{signal, SignalKind}; From bd596dfc7ba76f80cb98612b2db74bc13984166b Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 27 Jan 2020 13:55:24 +0100 Subject: [PATCH 45/77] WIP --- client/service/src/config.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/service/src/config.rs b/client/service/src/config.rs index 14f51b33b3a48..629662a812dd6 100644 --- a/client/service/src/config.rs +++ b/client/service/src/config.rs @@ -144,8 +144,7 @@ pub enum DatabaseConfig { Custom(Arc), } -impl Default for Configuration -{ +impl Default for Configuration { /// Create a default config fn default() -> Self { let configuration = Configuration { From 6dacdbfce85ce4f4e34fb2f6447d3ee98eda1fa2 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 27 Jan 2020 15:01:35 +0100 Subject: [PATCH 46/77] WIP --- client/cli/src/runtime.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/cli/src/runtime.rs b/client/cli/src/runtime.rs index 8af7d5e4576db..28576cb982d45 100644 --- a/client/cli/src/runtime.rs +++ b/client/cli/src/runtime.rs @@ -33,7 +33,7 @@ where let t1 = stream_int.recv().fuse(); let t2 = stream_term.recv().fuse(); - let mut t3 = func; + let t3 = func; pin_mut!(t1, t2, t3); @@ -86,12 +86,10 @@ where T: AbstractService + Unpin, { let informant_future = informant::build(&service); - let handle = tokio::spawn(informant_future); + let handle = async { informant_future.await }; service.await?; - handle.await.map_err(|e| e.to_string())?; - Ok(()) } From d2564b7e68c78f97bf012e562353717986269675 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 27 Jan 2020 15:11:50 +0100 Subject: [PATCH 47/77] Rename tasks_executor to task_executor --- client/cli/src/runtime.rs | 4 ++-- client/service/src/builder.rs | 2 +- client/service/src/config.rs | 4 ++-- client/service/src/lib.rs | 4 ++-- client/service/test/src/lib.rs | 16 ++++++++-------- utils/browser/src/lib.rs | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/client/cli/src/runtime.rs b/client/cli/src/runtime.rs index 28576cb982d45..72ab7d3e01a8e 100644 --- a/client/cli/src/runtime.rs +++ b/client/cli/src/runtime.rs @@ -67,7 +67,7 @@ where { let mut runtime = build_runtime()?; - config.tasks_executor = { + config.task_executor = { let runtime_handle = runtime.handle().clone(); Some(Box::new(move |fut| { runtime_handle.spawn(fut); })) }; @@ -105,7 +105,7 @@ where { let mut runtime = build_runtime()?; - config.tasks_executor = { + config.task_executor = { let runtime_handle = runtime.handle().clone(); Some(Box::new(move |fut| { runtime_handle.spawn(fut); })) }; diff --git a/client/service/src/builder.rs b/client/service/src/builder.rs index 098655afe518c..9fb88c8e8a673 100644 --- a/client/service/src/builder.rs +++ b/client/service/src/builder.rs @@ -1141,7 +1141,7 @@ ServiceBuilder< essential_failed_rx, to_spawn_tx, to_spawn_rx, - tasks_executor: if let Some(exec) = config.tasks_executor { + task_executor: if let Some(exec) = config.task_executor { exec } else { return Err(Error::TasksExecutorRequired); diff --git a/client/service/src/config.rs b/client/service/src/config.rs index 629662a812dd6..cb8170f7f4966 100644 --- a/client/service/src/config.rs +++ b/client/service/src/config.rs @@ -39,7 +39,7 @@ pub struct Configuration { /// Node roles. pub roles: Roles, /// How to spawn background tasks. Mandatory, otherwise creating a `Service` will error. - pub tasks_executor: Option + Send>>) + Send>>, + pub task_executor: Option + Send>>) + Send>>, /// Extrinsic pool configuration. pub transaction_pool: TransactionPoolOptions, /// Network configuration. @@ -155,7 +155,7 @@ impl Default for Configuration { config_dir: None, name: Default::default(), roles: Roles::FULL, - tasks_executor: None, + task_executor: None, transaction_pool: Default::default(), network: Default::default(), keystore: KeystoreConfig::None, diff --git a/client/service/src/lib.rs b/client/service/src/lib.rs index d7ce6f20d558b..b3ea9f2e505b1 100644 --- a/client/service/src/lib.rs +++ b/client/service/src/lib.rs @@ -96,7 +96,7 @@ pub struct Service { /// Receiver for futures that must be spawned as background tasks. to_spawn_rx: mpsc::UnboundedReceiver + Send>>>, /// How to spawn background tasks. - tasks_executor: Box + Send>>) + Send>, + task_executor: Box + Send>>) + Send>, rpc_handlers: sc_rpc_server::RpcHandler, _rpc: Box, _telemetry: Option, @@ -318,7 +318,7 @@ impl Future for } while let Poll::Ready(Some(task_to_spawn)) = Pin::new(&mut this.to_spawn_rx).poll_next(cx) { - (this.tasks_executor)(task_to_spawn); + (this.task_executor)(task_to_spawn); } // The service future never ends. diff --git a/client/service/test/src/lib.rs b/client/service/test/src/lib.rs index 9698f073c12ff..cb458d533fdf1 100644 --- a/client/service/test/src/lib.rs +++ b/client/service/test/src/lib.rs @@ -133,7 +133,7 @@ fn node_config ( index: usize, spec: &ChainSpec, role: Roles, - tasks_executor: Box + Send>>) + Send>, + task_executor: Box + Send>>) + Send>, key_seed: Option, base_port: u16, root: &TempDir, @@ -175,7 +175,7 @@ fn node_config ( impl_version: "0.1", impl_commit: "", roles: role, - tasks_executor: Some(tasks_executor), + task_executor: Some(task_executor), transaction_pool: Default::default(), network: network_config, keystore: KeystoreConfig::Path { @@ -254,7 +254,7 @@ impl TestNet where let executor = self.runtime.executor(); for (key, authority) in authorities { - let tasks_executor = { + let task_executor = { let executor = executor.clone(); Box::new(move |fut: Pin + Send>>| executor.spawn(fut.unit_error().compat())) }; @@ -262,7 +262,7 @@ impl TestNet where self.nodes, &self.chain_spec, Roles::AUTHORITY, - tasks_executor, + task_executor, Some(key), self.base_port, &temp, @@ -278,11 +278,11 @@ impl TestNet where } for full in full { - let tasks_executor = { + let task_executor = { let executor = executor.clone(); Box::new(move |fut: Pin + Send>>| executor.spawn(fut.unit_error().compat())) }; - let node_config = node_config(self.nodes, &self.chain_spec, Roles::FULL, tasks_executor, None, self.base_port, &temp); + let node_config = node_config(self.nodes, &self.chain_spec, Roles::FULL, task_executor, None, self.base_port, &temp); let addr = node_config.network.listen_addresses.iter().next().unwrap().clone(); let (service, user_data) = full(node_config).expect("Error creating test node service"); let service = SyncService::from(service); @@ -294,11 +294,11 @@ impl TestNet where } for light in light { - let tasks_executor = { + let task_executor = { let executor = executor.clone(); Box::new(move |fut: Pin + Send>>| executor.spawn(fut.unit_error().compat())) }; - let node_config = node_config(self.nodes, &self.chain_spec, Roles::LIGHT, tasks_executor, None, self.base_port, &temp); + let node_config = node_config(self.nodes, &self.chain_spec, Roles::LIGHT, task_executor, None, self.base_port, &temp); let addr = node_config.network.listen_addresses.iter().next().unwrap().clone(); let service = SyncService::from(light(node_config).expect("Error creating test node service")); diff --git a/utils/browser/src/lib.rs b/utils/browser/src/lib.rs index f65d64e2aa1c6..4f985871f5a22 100644 --- a/utils/browser/src/lib.rs +++ b/utils/browser/src/lib.rs @@ -51,7 +51,7 @@ where allow_private_ipv4: true, enable_mdns: false, }; - config.tasks_executor = Some(Box::new(move |fut| { + config.task_executor = Some(Box::new(move |fut| { wasm_bindgen_futures::spawn_local(fut) })); config.telemetry_external_transport = Some(transport); From 77f3db8e2336bd9662712f459e62bd9acbddc361 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 27 Jan 2020 16:34:02 +0100 Subject: [PATCH 48/77] WIP --- client/cli/src/params.rs | 1 + client/cli/src/runtime.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 956196f71b99f..ec70a05127fb3 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -622,6 +622,7 @@ pub struct RunCmd { } impl RunCmd { + /// Get the `Sr25519Keyring` matching one of the flag pub fn get_keyring(&self) -> Option { use sp_keyring::Sr25519Keyring::*; diff --git a/client/cli/src/runtime.rs b/client/cli/src/runtime.rs index 72ab7d3e01a8e..931a9add309b7 100644 --- a/client/cli/src/runtime.rs +++ b/client/cli/src/runtime.rs @@ -86,7 +86,7 @@ where T: AbstractService + Unpin, { let informant_future = informant::build(&service); - let handle = async { informant_future.await }; + async { informant_future.await }; service.await?; From 8bc1914cfa5abb2ffcac747beac9ae3646e66e48 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Mon, 27 Jan 2020 18:14:10 +0100 Subject: [PATCH 49/77] WIP --- client/cli/src/runtime.rs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/client/cli/src/runtime.rs b/client/cli/src/runtime.rs index 931a9add309b7..a8c2b1f670c93 100644 --- a/client/cli/src/runtime.rs +++ b/client/cli/src/runtime.rs @@ -81,18 +81,6 @@ where Ok(()) } -async fn run_service_with_informant(service: T) -> error::Result<()> -where - T: AbstractService + Unpin, -{ - let informant_future = informant::build(&service); - async { informant_future.await }; - - service.await?; - - Ok(()) -} - /// A helper function that runs an `AbstractService` with tokio and stops if the process receives /// the signal SIGTERM or SIGINT pub fn run_service_until_exit( @@ -112,11 +100,14 @@ where let service = service_builder(config)?; + let informant_future = informant::build(&service); + let _informant_handle = runtime.spawn(informant_future); + // we eagerly drop the service so that the internal exit future is fired, // but we need to keep holding a reference to the global telemetry guard let _telemetry = service.telemetry(); - let f = run_service_with_informant(service).fuse(); + let f = service.fuse(); pin_mut!(f); runtime.block_on(main(f)).map_err(|e| e.to_string())?; From 1ad686cd4b5d77b903c87f5ead9ebf0fe32b3302 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Tue, 28 Jan 2020 09:00:52 +0100 Subject: [PATCH 50/77] Added conflict between --sentry and --light --- client/cli/src/params.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index ec70a05127fb3..3f53180caaaea 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -422,7 +422,7 @@ pub struct RunCmd { /// available to relay to private nodes. #[structopt( long = "sentry", - conflicts_with_all = &[ "validator" ] + conflicts_with_all = &[ "validator", "light" ] )] pub sentry: bool, @@ -431,7 +431,7 @@ pub struct RunCmd { pub no_grandpa: bool, /// Experimental: Run in light client mode. - #[structopt(long = "light")] + #[structopt(long = "light", conflicts_with = "sentry")] pub light: bool, /// Listen to all RPC interfaces. From 69072bab6f22f55ae18890eb6002284075c687b7 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Tue, 28 Jan 2020 14:26:41 +0100 Subject: [PATCH 51/77] WIP --- client/cli/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index ddae82e26cc8f..13978bf6096a7 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -685,7 +685,8 @@ fn parse_address( Ok(address) } -fn init_logger(pattern: &str) { +/// Initialized the logger +pub fn init_logger(pattern: &str) { use ansi_term::Colour; let mut builder = env_logger::Builder::new(); From f1eae7d417739fb95f1c13e5ac8c49d6da88a16a Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Tue, 28 Jan 2020 15:17:54 +0100 Subject: [PATCH 52/77] WIP --- client/cli/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 13978bf6096a7..4754f6ead94e4 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -685,7 +685,7 @@ fn parse_address( Ok(address) } -/// Initialized the logger +/// Initialize the logger pub fn init_logger(pattern: &str) { use ansi_term::Colour; From bea809d4c14a2ede953227ac885e3b3f9771c548 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Tue, 28 Jan 2020 17:29:27 +0100 Subject: [PATCH 53/77] WIP --- Cargo.lock | 1421 +++++++++++++-------------- bin/node-template/Cargo.toml | 1 + bin/node-template/src/chain_spec.rs | 7 + bin/node-template/src/cli.rs | 40 +- bin/node-template/src/command.rs | 32 + bin/node-template/src/main.rs | 5 +- bin/node-template/src/service.rs | 1 - bin/node/cli/Cargo.toml | 5 +- bin/node/cli/build.rs | 6 +- bin/node/cli/src/cli.rs | 81 +- bin/node/cli/src/command.rs | 67 ++ bin/node/cli/src/lib.rs | 4 + client/cli/src/lib.rs | 35 +- client/cli/src/params.rs | 31 +- 14 files changed, 883 insertions(+), 853 deletions(-) create mode 100644 bin/node-template/src/command.rs create mode 100644 bin/node/cli/src/command.rs diff --git a/Cargo.lock b/Cargo.lock index eb01720bfae80..1cba2173fc280 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6,7 +6,7 @@ version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -50,7 +50,7 @@ name = "ahash" version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "const-random 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "const-random 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -58,7 +58,7 @@ name = "aho-corasick" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -79,7 +79,7 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -100,7 +100,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "arrayref" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -130,7 +130,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -138,22 +138,12 @@ name = "assert_matches" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "async-macros" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "async-std" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "async-macros 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "async-task 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "async-task 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "broadcaster 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -163,22 +153,23 @@ dependencies = [ "futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "kv-log-macro 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", - "once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "once_cell 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "async-task" -version = "1.0.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -194,9 +185,10 @@ dependencies = [ [[package]] name = "atty" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -206,9 +198,14 @@ name = "autocfg" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "autocfg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "backtrace" -version = "0.3.40" +version = "0.3.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", @@ -222,7 +219,7 @@ name = "backtrace-sys" version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -259,7 +256,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -279,7 +276,7 @@ dependencies = [ "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "which 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -316,17 +313,17 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "constant_time_eq 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "blake2b_simd" -version = "0.5.9" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "constant_time_eq 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -378,7 +375,7 @@ dependencies = [ "console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb-web 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -387,8 +384,8 @@ dependencies = [ "sc-chain-spec 2.0.0", "sc-network 0.8.0", "sc-service 0.8.0", - "wasm-bindgen 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-futures 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -403,13 +400,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bstr" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -422,12 +419,12 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.1.1" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "byte-slice-cast" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -479,9 +476,9 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -494,11 +491,10 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.48" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "jobserver 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jobserver 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -531,9 +527,9 @@ name = "chrono" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -553,7 +549,7 @@ version = "2.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -566,7 +562,7 @@ name = "clear_on_drop" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -582,7 +578,7 @@ name = "cmake" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -591,7 +587,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -600,30 +596,30 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "const-random" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "const-random-macro 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "const-random-macro 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "const-random-macro" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "constant_time_eq" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -659,7 +655,7 @@ dependencies = [ "cranelift-codegen-shared 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", "cranelift-entity 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "target-lexicon 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -684,7 +680,7 @@ name = "cranelift-entity" version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -717,7 +713,7 @@ dependencies = [ "cranelift-entity 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", "cranelift-frontend 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "wasmparser 0.39.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -735,49 +731,49 @@ name = "criterion" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "criterion-plot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "csv 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "csv 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xoshiro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon-core 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", - "tinytemplate 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", + "tinytemplate 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "criterion" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "criterion-plot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "csv 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion-plot 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "csv 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_xoshiro 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", - "tinytemplate 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "oorandom 11.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "plotters 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", + "tinytemplate 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -792,7 +788,7 @@ dependencies = [ [[package]] name = "criterion-plot" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -839,9 +835,10 @@ dependencies = [ [[package]] name = "crossbeam-queue" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -880,14 +877,14 @@ dependencies = [ [[package]] name = "csv" -version = "1.1.1" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "bstr 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "csv-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -895,7 +892,7 @@ name = "csv-core" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -912,7 +909,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -967,9 +964,9 @@ name = "derive_more" version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1001,7 +998,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_users 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_users 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1011,7 +1008,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1048,9 +1045,9 @@ name = "enumflags2_derive" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1058,11 +1055,11 @@ name = "env_logger" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1070,11 +1067,11 @@ name = "env_logger" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1084,10 +1081,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "erased-serde" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1117,9 +1114,9 @@ dependencies = [ "evm-core 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "evm-gasometer 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "evm-runtime 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", - "primitive-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1128,7 +1125,7 @@ name = "evm-core" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "primitive-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1138,7 +1135,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "evm-core 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "evm-runtime 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", - "primitive-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1147,7 +1144,7 @@ version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "evm-core 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", - "primitive-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1164,9 +1161,9 @@ name = "faerie" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "anyhow 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "goblin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "goblin 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "scroll 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "string-interner 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1179,7 +1176,7 @@ name = "failure" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.42 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1188,9 +1185,9 @@ name = "failure_derive" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1206,7 +1203,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "fdlimit" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1229,7 +1226,7 @@ dependencies = [ "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1237,7 +1234,7 @@ dependencies = [ [[package]] name = "fixed-hash" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1305,7 +1302,7 @@ dependencies = [ "pallet-indices 2.0.0", "pallet-transaction-payment 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", @@ -1317,7 +1314,7 @@ name = "frame-metadata" version = "10.0.0" dependencies = [ "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-std 2.0.0", ] @@ -1336,7 +1333,7 @@ dependencies = [ "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-arithmetic 2.0.0", "sp-core 2.0.0", "sp-inherents 2.0.0", @@ -1344,7 +1341,7 @@ dependencies = [ "sp-runtime 2.0.0", "sp-state-machine 0.8.0", "sp-std 2.0.0", - "tracing 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1352,9 +1349,9 @@ name = "frame-support-procedural" version = "2.0.0" dependencies = [ "frame-support-procedural-tools 2.0.0", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1363,18 +1360,18 @@ version = "2.0.0" dependencies = [ "frame-support-procedural-tools-derive 2.0.0", "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "frame-support-procedural-tools-derive" version = "2.0.0" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1384,13 +1381,13 @@ dependencies = [ "frame-support 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-inherents 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", "sp-state-machine 0.8.0", - "trybuild 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", + "trybuild 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1401,7 +1398,7 @@ dependencies = [ "frame-support 2.0.0", "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-externalities 0.8.0", "sp-io 2.0.0", @@ -1511,7 +1508,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1522,7 +1519,7 @@ dependencies = [ "futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures-task 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1536,9 +1533,9 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1583,7 +1580,7 @@ dependencies = [ "futures-macro 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures-sink 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures-task 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1610,8 +1607,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1657,13 +1654,13 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", + "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1674,7 +1671,7 @@ dependencies = [ "arrayvec 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1694,15 +1691,15 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "bstr 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "goblin" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1714,7 +1711,7 @@ dependencies = [ name = "grafana-data-source" version = "0.8.0" dependencies = [ - "async-std 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "async-std 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1723,9 +1720,9 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1748,7 +1745,7 @@ dependencies = [ "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1766,10 +1763,10 @@ dependencies = [ "futures-sink 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1819,7 +1816,7 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1873,7 +1870,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1883,7 +1880,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1916,7 +1913,7 @@ name = "humantime" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1929,7 +1926,7 @@ dependencies = [ "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1950,7 +1947,7 @@ dependencies = [ "http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1979,11 +1976,11 @@ dependencies = [ "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1999,7 +1996,7 @@ dependencies = [ "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-rustls 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-rustls 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)", "webpki 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", "webpki-roots 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2023,7 +2020,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2033,7 +2030,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2057,7 +2054,15 @@ name = "impl-serde" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "impl-serde" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2065,22 +2070,22 @@ name = "impl-trait-for-tuples" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "indexmap" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "integer-sqrt" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2111,25 +2116,23 @@ dependencies = [ [[package]] name = "itoa" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "jobserver" -version = "0.1.17" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "js-sys" -version = "0.3.34" +version = "0.3.35" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "wasm-bindgen 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2144,8 +2147,8 @@ dependencies = [ "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-pubsub 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "websocket 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2158,9 +2161,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2177,9 +2180,9 @@ version = "14.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2204,7 +2207,7 @@ dependencies = [ "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2296,11 +2299,11 @@ dependencies = [ "interleaved-ordered 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-util-mem 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "rocksdb 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2311,14 +2314,14 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "kvdb-memorydb 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-util-mem 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "send_wrapper 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2330,9 +2333,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "lazycell" @@ -2349,7 +2349,7 @@ name = "libloading" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2381,10 +2381,10 @@ dependencies = [ "libp2p-wasm-ext 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-websocket 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-yamux 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2404,15 +2404,15 @@ dependencies = [ "libsecp256k1 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "multistream-select 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-multiaddr 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parity-multiaddr 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.16.9 (registry+https://github.com/rust-lang/crates.io-index)", - "rw-stream-sink 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rw-stream-sink 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2428,7 +2428,7 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2539,7 +2539,7 @@ name = "libp2p-mdns" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "async-std 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "async-std 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "dns-parser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2615,7 +2615,7 @@ dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rw-stream-sink 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rw-stream-sink 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2629,24 +2629,24 @@ dependencies = [ "ctr 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-send-wrapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "prost-build 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "quicksink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.16.9 (registry+https://github.com/rust-lang/crates.io-index)", - "rw-stream-sink 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rw-stream-sink 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-futures 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2667,7 +2667,7 @@ name = "libp2p-tcp" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "async-std 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "async-std 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures-timer 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "get_if_addrs 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2681,7 +2681,7 @@ name = "libp2p-uds" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "async-std 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "async-std 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2693,11 +2693,11 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", "libp2p-core 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-send-wrapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-futures 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2713,9 +2713,9 @@ dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "quicksink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rw-stream-sink 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rw-stream-sink 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "soketto 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "webpki 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)", "webpki-roots 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2730,7 +2730,7 @@ dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "yamux 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "yamux 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2739,7 +2739,7 @@ version = "6.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bindgen 0.49.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2749,7 +2749,7 @@ name = "libsecp256k1" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "hmac-drbg 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2764,7 +2764,7 @@ name = "libz-sys" version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2793,7 +2793,7 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2844,8 +2844,8 @@ name = "malloc_size_of_derive" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2861,7 +2861,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "memchr" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3073,7 +3073,7 @@ dependencies = [ "sc-service-test 2.0.0", "sc-telemetry 2.0.0", "sc-transaction-pool 2.0.0", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-authority-discovery 2.0.0", "sp-consensus 0.8.0", "sp-consensus-babe 0.8.0", @@ -3090,15 +3090,15 @@ dependencies = [ "substrate-build-script-utils 2.0.0", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-futures 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "node-executor" version = "2.0.0" dependencies = [ - "criterion 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "frame-support 2.0.0", "frame-system 2.0.0", "node-primitives 2.0.0", @@ -3173,7 +3173,7 @@ dependencies = [ "frame-support 2.0.0", "frame-system 2.0.0", "frame-system-rpc-runtime-api 2.0.0", - "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "integer-sqrt 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "node-primitives 2.0.0", "pallet-authority-discovery 2.0.0", "pallet-authorship 2.0.0", @@ -3205,7 +3205,7 @@ dependencies = [ "pallet-utility 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-api 2.0.0", "sp-authority-discovery 2.0.0", "sp-block-builder 2.0.0", @@ -3247,6 +3247,7 @@ dependencies = [ "sp-inherents 2.0.0", "sp-runtime 2.0.0", "sp-transaction-pool 2.0.0", + "structopt 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "substrate-build-script-utils 2.0.0", "vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3267,7 +3268,7 @@ dependencies = [ "pallet-timestamp 2.0.0", "pallet-transaction-payment 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-api 2.0.0", "sp-block-builder 2.0.0", "sp-consensus-aura 0.8.0", @@ -3338,7 +3339,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "nohash-hasher" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -3346,54 +3347,54 @@ name = "nom" version = "4.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-bigint" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-integer" -version = "0.1.41" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-rational" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "num-bigint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-traits" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num_cpus" -version = "1.11.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3421,7 +3422,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "once_cell" -version = "1.2.0" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "oorandom" +version = "11.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -3453,7 +3459,7 @@ version = "0.9.53" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3482,7 +3488,7 @@ dependencies = [ "frame-support 2.0.0", "frame-system 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", @@ -3500,7 +3506,7 @@ dependencies = [ "pallet-timestamp 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-application-crypto 2.0.0", "sp-consensus-aura 0.8.0", "sp-core 2.0.0", @@ -3519,7 +3525,7 @@ dependencies = [ "frame-system 2.0.0", "pallet-session 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-application-crypto 2.0.0", "sp-authority-discovery 2.0.0", "sp-core 2.0.0", @@ -3557,7 +3563,7 @@ dependencies = [ "pallet-timestamp 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-consensus-babe 0.8.0", "sp-core 2.0.0", "sp-inherents 2.0.0", @@ -3578,7 +3584,7 @@ dependencies = [ "frame-system 2.0.0", "pallet-transaction-payment 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", @@ -3594,7 +3600,7 @@ dependencies = [ "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "pallet-balances 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", @@ -3615,7 +3621,7 @@ dependencies = [ "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", "pwasm-utils 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", @@ -3634,8 +3640,8 @@ dependencies = [ "jsonrpc-derive 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "pallet-contracts-rpc-runtime-api 0.8.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "sp-api 2.0.0", "sp-blockchain 2.0.0", "sp-core 2.0.0", @@ -3661,7 +3667,7 @@ dependencies = [ "frame-system 2.0.0", "pallet-balances 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", @@ -3677,7 +3683,7 @@ dependencies = [ "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "pallet-balances 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", @@ -3693,7 +3699,7 @@ dependencies = [ "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "pallet-balances 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-phragmen 2.0.0", @@ -3712,9 +3718,9 @@ dependencies = [ "pallet-balances 2.0.0", "pallet-timestamp 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "primitive-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", @@ -3730,7 +3736,7 @@ dependencies = [ "frame-system 2.0.0", "pallet-balances 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", @@ -3745,7 +3751,7 @@ dependencies = [ "frame-system 2.0.0", "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-finality-tracker 2.0.0", "sp-inherents 2.0.0", @@ -3761,7 +3767,7 @@ dependencies = [ "frame-support 2.0.0", "frame-system 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", @@ -3777,7 +3783,7 @@ dependencies = [ "pallet-finality-tracker 2.0.0", "pallet-session 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-finality-grandpa 2.0.0", "sp-io 2.0.0", @@ -3795,7 +3801,7 @@ dependencies = [ "frame-system 2.0.0", "pallet-balances 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", @@ -3811,7 +3817,7 @@ dependencies = [ "pallet-authorship 2.0.0", "pallet-session 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-application-crypto 2.0.0", "sp-core 2.0.0", "sp-io 2.0.0", @@ -3827,7 +3833,7 @@ dependencies = [ "frame-support 2.0.0", "frame-system 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-keyring 2.0.0", @@ -3842,7 +3848,7 @@ dependencies = [ "frame-support 2.0.0", "frame-system 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", @@ -3857,7 +3863,7 @@ dependencies = [ "frame-system 2.0.0", "pallet-balances 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", @@ -3872,7 +3878,7 @@ dependencies = [ "frame-system 2.0.0", "pallet-balances 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", @@ -3903,7 +3909,7 @@ dependencies = [ "frame-system 2.0.0", "pallet-balances 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", @@ -3918,7 +3924,7 @@ dependencies = [ "frame-system 2.0.0", "pallet-balances 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", @@ -3935,7 +3941,7 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "pallet-timestamp 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-application-crypto 2.0.0", "sp-core 2.0.0", "sp-io 2.0.0", @@ -3954,7 +3960,7 @@ dependencies = [ "pallet-balances 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", @@ -3973,7 +3979,7 @@ dependencies = [ "pallet-staking-reward-curve 2.0.0", "pallet-timestamp 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-keyring 2.0.0", @@ -3989,10 +3995,10 @@ name = "pallet-staking-reward-curve" version = "2.0.0" dependencies = [ "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "sp-runtime 2.0.0", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4002,7 +4008,7 @@ dependencies = [ "frame-support 2.0.0", "frame-system 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", @@ -4017,7 +4023,7 @@ dependencies = [ "frame-system 2.0.0", "impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-inherents 2.0.0", "sp-io 2.0.0", @@ -4050,7 +4056,7 @@ dependencies = [ "jsonrpc-derive 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "pallet-transaction-payment-rpc-runtime-api 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-api 2.0.0", "sp-blockchain 2.0.0", "sp-core 2.0.0", @@ -4064,8 +4070,8 @@ version = "2.0.0" dependencies = [ "frame-support 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "sp-api 2.0.0", "sp-runtime 2.0.0", "sp-std 2.0.0", @@ -4079,7 +4085,7 @@ dependencies = [ "frame-system 2.0.0", "pallet-balances 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", @@ -4094,7 +4100,7 @@ dependencies = [ "frame-system 2.0.0", "pallet-balances 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-runtime 2.0.0", @@ -4111,33 +4117,33 @@ name = "parity-multiaddr" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parity-multiaddr" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "bs58 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-multihash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4148,7 +4154,7 @@ dependencies = [ "blake2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4162,7 +4168,7 @@ dependencies = [ "blake2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4175,9 +4181,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "bitvec 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-slice-cast 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "byte-slice-cast 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec-derive 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4186,9 +4192,9 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4224,8 +4230,8 @@ name = "parity-util-mem-derive" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4256,7 +4262,7 @@ name = "parking_lot" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lock_api 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4266,7 +4272,7 @@ name = "parking_lot" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lock_api 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot_core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4324,9 +4330,9 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4372,30 +4378,30 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fixedbitset 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pin-project" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "pin-project-internal 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pin-project-internal" -version = "0.4.6" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pin-project-lite" -version = "0.1.1" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -4413,6 +4419,17 @@ name = "plain" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "plotters" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ppv-lite86" version = "0.2.6" @@ -4431,13 +4448,13 @@ dependencies = [ [[package]] name = "primitive-types" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "fixed-hash 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fixed-hash 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "impl-codec 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "impl-rlp 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "impl-serde 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "impl-serde 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "uint 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4446,30 +4463,30 @@ name = "proc-macro-crate" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "toml 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "proc-macro-error" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro-error-attr 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-error-attr 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "proc-macro-error-attr" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", "syn-mid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4478,9 +4495,9 @@ name = "proc-macro-hack" version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4498,7 +4515,7 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4574,11 +4591,11 @@ name = "prost-derive" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "anyhow 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4611,15 +4628,15 @@ dependencies = [ [[package]] name = "quick-error" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "quickcheck" -version = "0.9.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4632,7 +4649,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures-sink 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4648,7 +4665,7 @@ name = "quote" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4695,7 +4712,7 @@ name = "rand" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4738,7 +4755,7 @@ name = "rand_core" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4785,19 +4802,10 @@ dependencies = [ "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rand_os" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rand_pcg" version = "0.1.2" @@ -4824,44 +4832,36 @@ dependencies = [ "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rand_xoshiro" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "raw-cpuid" version = "7.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rayon" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon-core 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rayon-core" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-queue 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4879,24 +4879,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "redox_users" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-argon2 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rust-argon2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex" -version = "1.3.1" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4909,7 +4908,7 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.12" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -4936,12 +4935,12 @@ name = "ring" version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -4964,7 +4963,7 @@ dependencies = [ [[package]] name = "rpassword" -version = "4.0.3" +version = "4.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", @@ -4973,12 +4972,13 @@ dependencies = [ [[package]] name = "rust-argon2" -version = "0.5.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "blake2b_simd 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)", + "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5013,20 +5013,21 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rw-stream-sink" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -5050,10 +5051,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "same-file" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5070,13 +5071,13 @@ dependencies = [ "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "prost-build 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "quickcheck 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quickcheck 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "sc-client-api 2.0.0", "sc-keystore 2.0.0", "sc-network 0.8.0", "sc-peerset 2.0.0", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "sp-api 2.0.0", "sp-authority-discovery 2.0.0", "sp-blockchain 2.0.0", @@ -5132,8 +5133,8 @@ dependencies = [ "sc-chain-spec-derive 2.0.0", "sc-network 0.8.0", "sc-telemetry 2.0.0", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-runtime 2.0.0", ] @@ -5143,9 +5144,9 @@ name = "sc-chain-spec-derive" version = "2.0.0" dependencies = [ "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5154,23 +5155,23 @@ version = "0.8.0" dependencies = [ "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fdlimit 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "names 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rpassword 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rpassword 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "sc-client-api 2.0.0", "sc-network 0.8.0", "sc-service 0.8.0", "sc-telemetry 2.0.0", "sc-tracing 2.0.0", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "sp-blockchain 2.0.0", "sp-core 2.0.0", "sp-keyring 2.0.0", @@ -5180,7 +5181,7 @@ dependencies = [ "structopt 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5217,7 +5218,7 @@ dependencies = [ "sp-version 2.0.0", "substrate-test-runtime-client 2.0.0", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5265,7 +5266,7 @@ dependencies = [ "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parity-util-mem 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "quickcheck 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quickcheck 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", "sc-client 0.8.0", "sc-client-api 2.0.0", "sc-executor 0.8.0", @@ -5332,9 +5333,9 @@ dependencies = [ "futures-timer 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "merlin 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-bigint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-rational 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "num-rational 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "pdqselect 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5385,7 +5386,7 @@ dependencies = [ "sc-client 0.8.0", "sc-client-api 2.0.0", "sc-transaction-pool 2.0.0", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-blockchain 2.0.0", "sp-consensus 0.8.0", "sp-inherents 2.0.0", @@ -5393,7 +5394,7 @@ dependencies = [ "sp-transaction-pool 2.0.0", "substrate-test-runtime-client 2.0.0", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5550,7 +5551,7 @@ dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "sc-client 0.8.0", "sc-client-api 2.0.0", @@ -5559,7 +5560,7 @@ dependencies = [ "sc-network-gossip 0.8.0", "sc-network-test 0.8.0", "sc-telemetry 2.0.0", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "sp-api 2.0.0", "sp-arithmetic 2.0.0", "sp-blockchain 2.0.0", @@ -5585,7 +5586,7 @@ dependencies = [ "hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "sp-application-crypto 2.0.0", "sp-core 2.0.0", "subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5601,7 +5602,7 @@ dependencies = [ "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "erased-serde 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "fork-tree 2.0.0", "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5614,15 +5615,15 @@ dependencies = [ "lru 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "quickcheck 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "quickcheck 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "sc-block-builder 0.8.0", "sc-client 0.8.0", "sc-client-api 2.0.0", "sc-peerset 2.0.0", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "slog_derive 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5697,7 +5698,7 @@ dependencies = [ "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-rustls 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5724,7 +5725,7 @@ dependencies = [ "libp2p 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5748,7 +5749,7 @@ dependencies = [ "sc-network 0.8.0", "sc-rpc-api 0.8.0", "sc-transaction-pool 2.0.0", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "sp-api 2.0.0", "sp-blockchain 2.0.0", "sp-core 2.0.0", @@ -5776,8 +5777,8 @@ dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-rpc 2.0.0", "sp-transaction-pool 2.0.0", @@ -5793,8 +5794,8 @@ dependencies = [ "jsonrpc-pubsub 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-ws-server 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "sp-runtime 2.0.0", ] @@ -5840,8 +5841,8 @@ dependencies = [ "sc-telemetry 2.0.0", "sc-tracing 2.0.0", "sc-transaction-pool 2.0.0", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "sp-api 2.0.0", "sp-application-crypto 2.0.0", @@ -5857,9 +5858,9 @@ dependencies = [ "substrate-test-runtime-client 2.0.0", "sysinfo 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)", "target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5867,7 +5868,7 @@ name = "sc-service-test" version = "2.0.0" dependencies = [ "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fdlimit 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5903,9 +5904,9 @@ dependencies = [ "libp2p 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "slog-json 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "slog-scope 4.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -5917,16 +5918,16 @@ dependencies = [ name = "sc-tracing" version = "2.0.0" dependencies = [ - "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "erased-serde 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", "grafana-data-source 0.8.0", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "sc-telemetry 2.0.0", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing-core 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5934,13 +5935,13 @@ name = "sc-transaction-graph" version = "2.0.0" dependencies = [ "assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "criterion 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-runtime 2.0.0", "sp-transaction-pool 2.0.0", @@ -6015,9 +6016,9 @@ name = "scroll_derive" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -6062,7 +6063,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -6082,35 +6083,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.103" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive" -version = "1.0.103" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.44" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sha-1" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -6180,7 +6181,7 @@ name = "slog" version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "erased-serde 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -6189,9 +6190,9 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "erased-serde 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -6210,9 +6211,9 @@ name = "slog_derive" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -6233,7 +6234,7 @@ name = "snow" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.16.9 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -6296,18 +6297,18 @@ version = "2.0.0" dependencies = [ "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-api-test" version = "2.0.0" dependencies = [ - "criterion 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "sp-api 2.0.0", "sp-blockchain 2.0.0", "sp-consensus 0.8.0", @@ -6315,7 +6316,7 @@ dependencies = [ "sp-state-machine 0.8.0", "sp-version 2.0.0", "substrate-test-runtime-client 2.0.0", - "trybuild 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", + "trybuild 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -6323,7 +6324,7 @@ name = "sp-application-crypto" version = "2.0.0" dependencies = [ "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-io 2.0.0", "sp-std 2.0.0", @@ -6344,13 +6345,13 @@ dependencies = [ name = "sp-arithmetic" version = "2.0.0" dependencies = [ - "criterion 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "integer-sqrt 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "primitive-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-debug-derive 2.0.0", "sp-std 2.0.0", ] @@ -6413,7 +6414,7 @@ dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-inherents 2.0.0", "sp-runtime 2.0.0", @@ -6479,17 +6480,17 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libsecp256k1 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "primitive-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "sp-debug-derive 2.0.0", "sp-externalities 0.8.0", @@ -6509,9 +6510,9 @@ dependencies = [ name = "sp-debug-derive" version = "2.0.0" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -6528,7 +6529,7 @@ name = "sp-finality-grandpa" version = "2.0.0" dependencies = [ "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-api 2.0.0", "sp-application-crypto 2.0.0", "sp-runtime 2.0.0", @@ -6593,7 +6594,7 @@ dependencies = [ name = "sp-panic-handler" version = "2.0.0" dependencies = [ - "backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.42 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -6602,7 +6603,7 @@ name = "sp-phragmen" version = "2.0.0" dependencies = [ "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-io 2.0.0", "sp-runtime 2.0.0", "sp-std 2.0.0", @@ -6613,8 +6614,8 @@ dependencies = [ name = "sp-rpc" version = "2.0.0" dependencies = [ - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", ] @@ -6627,8 +6628,8 @@ dependencies = [ "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "sp-application-crypto 2.0.0", "sp-arithmetic 2.0.0", "sp-core 2.0.0", @@ -6642,8 +6643,8 @@ name = "sp-runtime-interface" version = "2.0.0" dependencies = [ "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "primitive-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustversion 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "sp-core 2.0.0", "sp-externalities 0.8.0", "sp-io 2.0.0", @@ -6653,7 +6654,7 @@ dependencies = [ "sp-std 2.0.0", "sp-wasm-interface 2.0.0", "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "trybuild 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", + "trybuild 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -6662,9 +6663,9 @@ version = "2.0.0" dependencies = [ "Inflector 0.11.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -6707,8 +6708,8 @@ dependencies = [ name = "sp-serializer" version = "2.0.0" dependencies = [ - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -6737,7 +6738,7 @@ dependencies = [ "hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -6758,7 +6759,7 @@ name = "sp-storage" version = "2.0.0" dependencies = [ "impl-serde 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-debug-derive 2.0.0", "sp-std 2.0.0", ] @@ -6768,7 +6769,7 @@ name = "sp-test-primitives" version = "2.0.0" dependencies = [ "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-application-crypto 2.0.0", "sp-core 2.0.0", "sp-runtime 2.0.0", @@ -6794,7 +6795,7 @@ dependencies = [ "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-api 2.0.0", "sp-runtime 2.0.0", ] @@ -6822,7 +6823,7 @@ version = "2.0.0" dependencies = [ "impl-serde 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-runtime 2.0.0", "sp-std 2.0.0", ] @@ -6872,7 +6873,7 @@ name = "string-interner" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -6896,10 +6897,10 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-error 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-error 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -6916,9 +6917,9 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -6940,7 +6941,7 @@ dependencies = [ "pallet-transaction-payment 2.0.0", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rpassword 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rpassword 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "sc-rpc 2.0.0", "sp-core 2.0.0", @@ -6975,7 +6976,7 @@ dependencies = [ "jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "sc-rpc-api 0.8.0", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-storage 2.0.0", "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -6994,7 +6995,7 @@ dependencies = [ "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "sc-client 0.8.0", "sc-transaction-pool 2.0.0", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-api 2.0.0", "sp-blockchain 2.0.0", "sp-core 2.0.0", @@ -7038,7 +7039,7 @@ dependencies = [ "parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "sc-client 0.8.0", "sc-executor 0.8.0", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sp-api 2.0.0", "sp-application-crypto 2.0.0", "sp-block-builder 2.0.0", @@ -7087,13 +7088,13 @@ version = "2.0.0" name = "substrate-wasm-builder" version = "1.0.9" dependencies = [ - "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "build-helper 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "cargo_metadata 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", "fs2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-gc-api 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -7123,10 +7124,10 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -7136,9 +7137,9 @@ name = "syn-mid" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7146,9 +7147,9 @@ name = "synstructure" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -7160,7 +7161,7 @@ dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "doc-comment 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -7203,10 +7204,10 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.0.5" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7215,9 +7216,9 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -7242,14 +7243,14 @@ name = "thiserror-impl" version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "thread_local" -version = "0.3.6" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -7260,7 +7261,7 @@ name = "threadpool" version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7305,11 +7306,11 @@ dependencies = [ [[package]] name = "tinytemplate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7320,7 +7321,7 @@ dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -7337,20 +7338,20 @@ dependencies = [ [[package]] name = "tokio" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-macros 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-macros 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -7424,11 +7425,12 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7441,7 +7443,7 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -7451,7 +7453,7 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -7505,7 +7507,7 @@ dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -7571,16 +7573,16 @@ dependencies = [ "futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures-sink 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "pin-project-lite 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "toml" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7590,31 +7592,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "tracing" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing-attributes 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing-core 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-attributes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tracing-attributes" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tracing-core" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7674,15 +7674,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "trybuild" -version = "1.0.18" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", - "termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7700,7 +7700,7 @@ name = "twox-hash" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7750,7 +7750,7 @@ dependencies = [ [[package]] name = "unicode-normalization" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "smallvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -7808,7 +7808,7 @@ dependencies = [ [[package]] name = "url" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -7856,9 +7856,9 @@ name = "wabt" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "wabt-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -7867,19 +7867,19 @@ name = "wabt-sys" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", "cmake 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "walkdir" -version = "2.2.9" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -7903,81 +7903,81 @@ dependencies = [ [[package]] name = "wasi" -version = "0.7.0" +version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "wasm-bindgen" -version = "0.2.57" +version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.57" +version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bumpalo 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bumpalo 3.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.57" +version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-macro-support 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.57" +version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-backend 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-shared 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.57" +version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "wasm-bindgen-webidl" -version = "0.2.57" +version = "0.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "anyhow 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-backend 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", "weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -7997,13 +7997,13 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", "send_wrapper 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-futures 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "web-sys 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -8014,8 +8014,8 @@ dependencies = [ "errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-rational 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "num-rational 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "parity-wasm 0.41.0 (registry+https://github.com/rust-lang/crates.io-index)", "wasmi-validation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -8038,7 +8038,7 @@ name = "wasmtime-debug" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "anyhow 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", "cranelift-codegen 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", "cranelift-entity 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", "cranelift-wasm 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -8064,17 +8064,17 @@ dependencies = [ "directories 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "file-per-thread-logger 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "more-asserts 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "wasmparser 0.39.3 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "zstd 0.5.1+zstd.1.4.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -8085,7 +8085,7 @@ name = "wasmtime-jit" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "anyhow 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", "cranelift-codegen 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", "cranelift-entity 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", "cranelift-frontend 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -8106,11 +8106,11 @@ name = "wasmtime-runtime" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", "cranelift-codegen 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", "cranelift-entity 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", "cranelift-wasm 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -8123,14 +8123,14 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.34" +version = "0.3.35" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "anyhow 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "js-sys 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)", + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", - "wasm-bindgen-webidl 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -8248,7 +8248,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi-util" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -8259,15 +8259,6 @@ name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "wincolor" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "ws" version = "0.9.1" @@ -8280,9 +8271,9 @@ dependencies = [ "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", "mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -8311,13 +8302,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "yamux" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "nohash-hasher 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "nohash-hasher 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -8341,9 +8332,9 @@ name = "zeroize_derive" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -8369,7 +8360,7 @@ name = "zstd-sys" version = "1.4.15+zstd.1.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -8384,22 +8375,22 @@ dependencies = [ "checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -"checksum anyhow 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "9267dff192e68f3399525901e709a48c1d3982c9c072fa32f2127a0cb0babf14" +"checksum anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" "checksum app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" "checksum arc-swap 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d7b8a9123b8027467bce0099fe556c628a53c8d83df0507084c31e9ba2e39aff" -"checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee" +"checksum arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" "checksum arrayvec 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" "checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" "checksum asn1_der 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6fce6b6a0ffdafebd82c87e79e3f40e8d2c523e5fea5566ff6b90509bf98d638" "checksum asn1_der_derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d0864d84b8e07b145449be9a8537db86bf9de5ce03b913214694643b4743502" "checksum assert_matches 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7deb0a829ca7bcfaf5da70b073a8d128619259a7be8216a355e23f00763059e5" -"checksum async-macros 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "644a5a8de80f2085a1e7e57cd1544a2a7438f6e003c0790999bd43b92a77cdb2" -"checksum async-std 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "513ee3c49800679a319912340f5601afda9e72848d7dea3a48bab489e8c1a46f" -"checksum async-task 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de6bd58f7b9cc49032559422595c81cbfcf04db2f2133592f70af19e258a1ced" +"checksum async-std 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0bf6039b315300e057d198b9d3ab92ee029e31c759b7f1afae538145e6f18a3e" +"checksum async-task 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f20c6fda19d0fc02406779587ca4f9a4171cd32e4a5bda0bd016f0a1334c8d4a" "checksum async-tls 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce6977f57fa68da77ffe5542950d47e9c23d65f5bc7cb0a9f8700996913eec7" -"checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" +"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" "checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" -"checksum backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)" = "924c76597f0d9ca25d762c25a4d369d51267536465dc5064bdf0eb073ed477ea" +"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +"checksum backtrace 0.3.42 (registry+https://github.com/rust-lang/crates.io-index)" = "b4b1549d804b6c73f4817df2ba073709e96e426f12987127c48e6745568c350b" "checksum backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" "checksum base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" @@ -8412,17 +8403,17 @@ dependencies = [ "checksum bitvec 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a993f74b4c99c1908d156b8d2e0fb6277736b0ecbd833982fd1241d39b2766a6" "checksum blake2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330" "checksum blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" -"checksum blake2b_simd 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b83b7baab1e671718d78204225800d6b170e648188ac7dc992e9d6bddf87d0c0" +"checksum blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" "checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" "checksum block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" "checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" "checksum broadcaster 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "07a1446420a56f1030271649ba0da46d23239b3a68c73591cea5247f15a788a0" "checksum bs58 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c95ee6bba9d950218b6cc910cf62bc9e0a171d0f4537e3627b0f54d08549b188" "checksum bs58 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b170cd256a3f9fa6b9edae3e44a7dfdfc77e8124dbc3e2612d75f9c3e2396dae" -"checksum bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8d6c2c5b58ab920a4f5aeaaca34b4488074e8cc7596af94e6f8c6ff247c60245" +"checksum bstr 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "fe8a65814ca90dfc9705af76bb6ba3c6e2534489a72270e797e603783bb4990b" "checksum build-helper 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bdce191bf3fa4995ce948c8c83b4640a1745457a149e73c6db75b4ffe36aad5f" -"checksum bumpalo 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fe2567a8d8a3aedb4e39aa39e186d5673acfd56393c6ac83b2bc5bd82f4369c" -"checksum byte-slice-cast 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f6209f3b2c1edea170002e016d5ead6903d3bb0a846477f53bbeb614967a52a9" +"checksum bumpalo 3.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5fb8038c1ddc0a5f73787b130f4cc75151e96ed33e417fde765eb5a81e3532f4" +"checksum byte-slice-cast 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b0a5e3906bcbf133e33c1d4d95afc664ad37fbdb9f6568d8043e7ea8c27d93d3" "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" @@ -8432,7 +8423,7 @@ dependencies = [ "checksum c_linked_list 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b" "checksum cargo_metadata 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "46e3374c604fb39d1a2f35ed5e4a4e30e60d01fab49446e08f1b3e9a90aef202" "checksum cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0" -"checksum cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)" = "f52a465a666ca3d838ebbf08b241383421412fe7ebb463527bba275526d89f76" +"checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" "checksum cexpr 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fce5b5fb86b0c57c20c834c1b412fd09c77c8a59b9473f86272709e78874cd1d" "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" "checksum chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01" @@ -8443,9 +8434,9 @@ dependencies = [ "checksum cmake 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "81fb25b677f8bf1eb325017cb6bb8452f87969db0fedb4f757b297bee78a7c62" "checksum console_error_panic_hook 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d976903543e0c48546a91908f21588a680a8c8f984df9a5d69feccb2b2a211" "checksum console_log 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1e7871d2947441b0fdd8e2bd1ce2a2f75304f896582c0d572162d48290683c48" -"checksum const-random 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7b641a8c9867e341f3295564203b1c250eb8ce6cb6126e007941f78c4d2ed7fe" -"checksum const-random-macro 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c750ec12b83377637110d5a57f5ae08e895b06c4b16e2bdbf1a94ef717428c59" -"checksum constant_time_eq 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "995a44c877f9212528ccc74b21a232f66ad69001e40ede5bcee2ac9ef2657120" +"checksum const-random 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "2f1af9ac737b2dd2d577701e59fd09ba34822f6f2ebdb30a7647405d9e55e16a" +"checksum const-random-macro 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "25e4c606eb459dd29f7c57b2e0879f2b6f14ee130918c2b78ccb58a9624e6c7a" +"checksum constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" "checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" "checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" "checksum cranelift-bforest 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bd05aac8cefcde54ce26178df8f36cb1f518ac691db650e7d2440c2b6b41c4dc" @@ -8458,19 +8449,19 @@ dependencies = [ "checksum cranelift-wasm 0.50.0 (registry+https://github.com/rust-lang/crates.io-index)" = "54cb82a1071f88822763a583ec1a8688ffe5e2cda02c111d4483dd4376ed14d8" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" "checksum criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0363053954f3e679645fc443321ca128b7b950a6fe288cf5f9335cc22ee58394" -"checksum criterion 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "938703e165481c8d612ea3479ac8342e5615185db37765162e762ec3523e2fc6" +"checksum criterion 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1fc755679c12bda8e5523a71e4d654b6bf2e14bd838dfc48cde6559a05caf7d1" "checksum criterion-plot 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76f9212ddf2f4a9eb2d401635190600656a1f88a932ef53d06e7fa4c7e02fb8e" -"checksum criterion-plot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eccdc6ce8bbe352ca89025bee672aa6d24f4eb8c53e3a8b5d1bc58011da072a2" +"checksum criterion-plot 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a01e15e0ea58e8234f96146b1f91fa9d0e4dd7a38da93ff7a75d42c0b9d3a545" "checksum crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "acec9a3b0b3559f15aee4f90746c4e5e293b701c0f7d3925d24e01645267b68c" "checksum crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca" "checksum crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" "checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" -"checksum crossbeam-queue 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfd6515864a82d2f877b42813d4553292c6659498c9a2aa31bab5a15243c2700" +"checksum crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" "checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" "checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" "checksum crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" "checksum crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" -"checksum csv 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "37519ccdfd73a75821cac9319d4fce15a81b9fcf75f951df5b9988aa3a0af87d" +"checksum csv 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "00affe7f6ab566df61b4be3ce8cf16bc2576bca0963ceb0955e45d514bf9a279" "checksum csv-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9b5cadb6b25c77aeff80ba701712494213f4a8418fcda2ee11b6560c3ad0bf4c" "checksum ct-logs 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4d3686f5fa27dbc1d76c751300376e167c5a43387f44bb451fd1c24776e49113" "checksum ctor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8ce37ad4184ab2ce004c33bf6379185d3b1c95801cab51026bd271bf68eedc" @@ -8493,7 +8484,7 @@ dependencies = [ "checksum env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3" "checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" "checksum environmental 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "516aa8d7a71cb00a1c4146f0798549b93d083d4f189b3ced8f3de6b8f11ee6c4" -"checksum erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3beee4bc16478a1b26f2e80ad819a52d24745e292f521a63c16eea5f74b7eb60" +"checksum erased-serde 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)" = "cd7d80305c9bd8cd78e3c753eb9fb110f83621e5211f1a3afffcc812b104daf9" "checksum errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2a071601ed01b988f896ab14b95e67335d1eeb50190932a1320f7fe3cadc84e" "checksum errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" "checksum evm 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "32a2c6961fdc9952371fc5f0416f03a9d90378a9dfb6862f6a7a9a3b8986b8dd" @@ -8506,10 +8497,10 @@ dependencies = [ "checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" -"checksum fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b1ee15a7050e5580b3712877157068ea713b245b080ff302ae2ca973cfcd9baa" +"checksum fdlimit 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9084c55bb76efb1496328976db88320fe7d9ee86e649e83c4ecce3ba7a9a35d1" "checksum file-per-thread-logger 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8505b75b31ef7285168dd237c4a7db3c1f3e0927e7d314e670bc98e854272fe9" "checksum finality-grandpa 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "52c48f8a628193ba18639b2f727c32132d75f167a4b32f44b252ea8b937f154c" -"checksum fixed-hash 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "72fe7539e2c5692c6989f2f9c0457e42f1e5768f96b85c87d273574670ae459f" +"checksum fixed-hash 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3367952ceb191f4ab95dd5685dc163ac539e36202f9fcfd0cb22f9f9c542fefc" "checksum fixedbitset 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33" "checksum fixedbitset 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" "checksum flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" @@ -8544,12 +8535,12 @@ dependencies = [ "checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" "checksum get_if_addrs 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "abddb55a898d32925f3148bd281174a68eeb68bbfd9a5938a57b18f506ee4ef7" "checksum get_if_addrs-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0d04f9fb746cf36b191c00f3ede8bde9c8e64f9f4b05ae2694a9ccf5e3f5ab48" -"checksum getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e7db7ca94ed4cd01190ceee0d8a8052f08a247aa1b469a7f68c6a3b71afcf407" +"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" "checksum gimli 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "162d18ae5f2e3b90a993d202f1ba17a5633c2484426f8bcae201f86194bacd00" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" "checksum globset 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "925aa2cac82d8834e2b2a4415b6f6879757fb5c0928fc445ae76461a12eed8f2" -"checksum goblin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88a79ef1f0dad46fd78075b6f80f92d97710eddf87b3e18a15a66761e8942672" +"checksum goblin 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3081214398d39e4bd7f2c1975f0488ed04614ffdd976c6fc7a0708278552c0da" "checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" "checksum h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1" "checksum hash-db 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" @@ -8558,7 +8549,7 @@ dependencies = [ "checksum hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e1de41fb8dba9714efd92241565cdff73f78508c95697dd56787d3cba27e2353" "checksum hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" -"checksum hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "307c3c9f937f38e3534b1d6447ecf090cafcc9744e4a6360e8b037b2cf5af120" +"checksum hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772" "checksum hex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "023b39be39e3a2da62a94feb433e91e8bcd37676fbc8bea371daf52b7a769a3e" "checksum hex-literal 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "961de220ec9a91af2e1e5bd80d02109155695e516771762381ef8581317066e0" "checksum hex-literal-impl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9d4c5c844e2fee0bf673d54c2c177f1713b3d2af2ff6e666b49cb7572e6cf42d" @@ -8580,16 +8571,17 @@ dependencies = [ "checksum impl-codec 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1be51a921b067b0eaca2fad532d9400041561aa922221cc65f95a85641c6bf53" "checksum impl-rlp 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8f7a72f11830b52333f36e3b09a288333888bf54380fd0ac0790a3c31ab0f3c5" "checksum impl-serde 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "58e3cae7e99c7ff5a995da2cf78dd0a5383740eda71d98cf7b1910c301ac69b8" +"checksum impl-serde 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5bbe9ea9b182f0fb1cabbd61f4ff9b7b7b9197955e95a7e4c27de5055eb29ff8" "checksum impl-trait-for-tuples 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" -"checksum indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d7b3ea5827fcb9d4fda14bf4da5f136f0db2ae9c8f4bd4e2d1c6fde4e6db2" -"checksum integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ea155abb3ba6f382a75f1418988c05fe82959ed9ce727de427f9cfd425b0c903" +"checksum indexmap 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b54058f0a6ff80b6803da8faf8997cde53872b38f4023728f6830b06cd3c0dc" +"checksum integer-sqrt 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f65877bf7d44897a473350b1046277941cee20b263397e90869c50b6e766088b" "checksum interleaved-ordered 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "141340095b15ed7491bd3d4ced9d20cebfb826174b6bb03386381f62b01e3d77" "checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" "checksum ipnet 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f4b06b21db0228860c8dfd17d2106c49c7c6bd07477a4036985347d84def04" "checksum itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" -"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" -"checksum jobserver 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "f2b1d42ef453b30b7387e113da1c83ab1605d90c5b4e0eb8e96d016ed3b8c160" -"checksum js-sys 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)" = "c40e7a4fafb6cf0be06d25662fc99aacb25f526eb6e1bc0c24100bde5d6a834e" +"checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" +"checksum jobserver 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "67b06c1b455f1cf4269a8cfc320ab930a810e2375a42af5075eb8a8b36405ce0" +"checksum js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "7889c7c36282151f6bf465be4700359318aef36baa951462382eae49e9577cf9" "checksum jsonrpc-client-transports 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0a9ae166c4d1f702d297cd76d4b55758ace80272ffc6dbb139fdc1bf810de40b" "checksum jsonrpc-core 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fe3b688648f1ef5d5072229e2d672ecb92cbff7d1c79bcf3fd5898f3f3df0970" "checksum jsonrpc-core-client 14.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "080dc110be17701097df238fad3c816d4a478a1899dfbcf8ec8957dd40ec7304" @@ -8638,7 +8630,7 @@ dependencies = [ "checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" "checksum linked_hash_set 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3c7c91c4c7bbeb4f2f7c4e5be11e6a05bd6830bc37249c47ce1ad86ad453ff9c" "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" -"checksum lock_api 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e57b3997725d2b60dbec1297f6c2e2957cc383db1cebd6be812163f969c7d586" +"checksum lock_api 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "79b2de95ecb4691949fea4716ca53cdbcfccb2c612e19644a8bad05edcf9f47b" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum lru 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "5d8f669d42c72d18514dfca8115689c5f6370a17d980cb5bd777a67f404594c8" @@ -8647,7 +8639,7 @@ dependencies = [ "checksum malloc_size_of_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e37c5d4cd9473c5f4c9c111f033f15d4df9bd378fdf615944e360a4f55a05f0b" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" -"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" +"checksum memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3197e20c7edb283f87c071ddfc7a2cca8f8e0b888c242959846a6fce03c72223" "checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" "checksum memory-db 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)" = "881736a0f68a6fae1b596bb066c5bd16d7b3ed645a4dd8ffaefd02f585abaf71" "checksum memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" @@ -8666,17 +8658,18 @@ dependencies = [ "checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" "checksum nodrop 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" -"checksum nohash-hasher 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4e657a6ec97f9a3ba46f6f7034ea6db9fcd5b71d25ef1074b7bc03da49be0e8e" +"checksum nohash-hasher 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "721a2bf1c26159ebf17e0a980bc4ce61f4b2fec5ec3b42d42fddd7a84a9e538f" "checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" -"checksum num-bigint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f9c3f34cdd24f334cb265d9bf8bfa8a241920d026916785747a92f0e55541a1a" -"checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09" -"checksum num-rational 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f2885278d5fe2adc2f75ced642d52d879bffaceb5a2e0b1d4309ffdfb239b454" -"checksum num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c81ffc11c212fa327657cb19dd85eb7419e163b5b076bede2bdb5c974c07e4" -"checksum num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76dac5ed2a876980778b8b85f75a71b6cbf0db0b1232ee12f826bccb00d09d72" +"checksum num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +"checksum num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" +"checksum num-rational 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "da4dc79f9e6c81bef96148c8f6b8e72ad4541caa4a24373e900a36da07de03a3" +"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" +"checksum num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" "checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" "checksum once_cell 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "532c29a261168a45ce28948f9537ddd7a5dd272cc513b3017b1e82a88f962c37" "checksum once_cell 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d584f08c2d717d5c23a6414fc2822b71c651560713e54fa7eace675f758a355e" -"checksum once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "891f486f630e5c5a4916c7e16c4b24a53e78c860b646e9f8e005e4f16847bfed" +"checksum once_cell 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b1c601810575c99596d4afc46f78a678c80105117c379eb3650cf99b8a21ce5b" +"checksum oorandom 11.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ebcec7c9c2a95cacc7cd0ecb89d8a8454eca13906f6deb55258ffff0adeb9405" "checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" "checksum openssl 0.10.26 (registry+https://github.com/rust-lang/crates.io-index)" = "3a3cc5799d98e1088141b8e01ff760112bbd9f19d850c124500566ca6901a585" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" @@ -8685,7 +8678,7 @@ dependencies = [ "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" "checksum parity-bytes 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0c276d76c5333b8c2579e02d49a06733a55b8282d2d9b13e8d53b6406bd7e30a" "checksum parity-multiaddr 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "045b3c7af871285146300da35b1932bb6e4639b66c7c98e85d06a32cbc4e8fa7" -"checksum parity-multiaddr 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6de20a133b50f5120c6b8284ee88c5017fb167149208b3ee2e95f8719a434dc4" +"checksum parity-multiaddr 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80878c27f90dd162d3143333d672e80b194d6b080f05c83440e3dfda42e409f2" "checksum parity-multihash 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "df3a17dc27848fd99e4f87eb0f8c9baba6ede0a6d555400c850ca45254ef4ce3" "checksum parity-multihash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "70a4d7b05e51bff5ae2c29c7b8c3d889985bbd8f4e15b3542fcc1f6f9666d292" "checksum parity-scale-codec 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f747c06d9f3b2ad387ac881b9667298c81b1243aa9833f086e05996937c35507" @@ -8711,22 +8704,23 @@ dependencies = [ "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" "checksum petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3659d1ee90221741f65dd128d9998311b0e40c5d3c23a62445938214abce4f" "checksum petgraph 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "29c127eea4a29ec6c85d153c59dc1213f33ec74cead30fe4730aecc88cc1fd92" -"checksum pin-project 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "94b90146c7216e4cb534069fb91366de4ea0ea353105ee45ed297e2d1619e469" -"checksum pin-project-internal 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "44ca92f893f0656d3cba8158dd0f2b99b94de256a4a54e870bd6922fcc6c8355" -"checksum pin-project-lite 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f0af6cbca0e6e3ce8692ee19fb8d734b641899e07b68eb73e9bbbd32f1703991" +"checksum pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7804a463a8d9572f13453c516a5faea534a2403d7ced2f0c7e100eeff072772c" +"checksum pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f" +"checksum pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" "checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" "checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" "checksum plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" +"checksum plotters 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "4e3bb8da247d27ae212529352020f3e5ee16e83c0c258061d27b08ab92675eeb" "checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" "checksum pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3f81e1644e1b54f5a68959a29aa86cde704219254669da328ecfdf6a1f09d427" -"checksum primitive-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a0253db64c26d8b4e7896dd2063b516d2a1b9e0a5da26b5b78335f236d1e9522" +"checksum primitive-types 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e4336f4f5d5524fa60bcbd6fe626f9223d8142a50e7053e979acdf0da41ab975" "checksum proc-macro-crate 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e10d4b51f154c8a7fb96fd6dad097cb74b863943ec010ac94b9fd1be8861fe1e" -"checksum proc-macro-error 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "53c98547ceaea14eeb26fcadf51dc70d01a2479a7839170eae133721105e4428" -"checksum proc-macro-error-attr 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c2bf5d493cf5d3e296beccfd61794e445e830dfc8070a9c248ad3ee071392c6c" +"checksum proc-macro-error 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1b79a464461615532fcc8a6ed8296fa66cc12350c18460ab3f4594a6cee0fcb6" +"checksum proc-macro-error-attr 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "23832e5eae6bac56bbac190500eef1aaede63776b5cd131eaa4ee7fe120cd892" "checksum proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" "checksum proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e" "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -"checksum proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27" +"checksum proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548" "checksum prost 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96d14b1c185652833d24aaad41c5832b0be5616a590227c1fbff57c616754b23" "checksum prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce49aefe0a6144a45de32927c77bd2859a5f7677b55f220ae5b744e87389c212" "checksum prost-build 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eb788126ea840817128183f8f603dce02cb7aea25c2a0b764359d8e20010702e" @@ -8736,8 +8730,8 @@ dependencies = [ "checksum prost-types 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1de482a366941c8d56d19b650fac09ca08508f2a696119ee7513ad590c8bac6f" "checksum prost-types 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1834f67c0697c001304b75be76f67add9c89742eda3a085ad8ee0bb38c3417aa" "checksum pwasm-utils 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f7a12f176deee919f4ba55326ee17491c8b707d0987aed822682c821b660192" -"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" -"checksum quickcheck 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d5ca504a2fdaa08d3517f442fbbba91ac24d1ec4c51ea68688a038765e3b2662" +"checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +"checksum quickcheck 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a44883e74aa97ad63db83c4bf8ca490f02b2fc02f92575e720c8551e843c945f" "checksum quicksink 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a8461ef7445f61fd72d8dcd0629ce724b9131b3c2eb36e83a5d3d4161c127530" "checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" @@ -8755,37 +8749,35 @@ dependencies = [ "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" "checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" "checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -"checksum rand_os 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a788ae3edb696cfcba1c19bfd388cc4b8c21f8a408432b199c072825084da58a" "checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rand_xoshiro 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "03b418169fb9c46533f326efd6eed2576699c44ca92d3052a066214a8d828929" -"checksum rand_xoshiro 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0e18c91676f670f6f0312764c759405f13afb98d5d73819840cf72a518487bff" "checksum raw-cpuid 7.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4a349ca83373cfa5d6dbb66fd76e58b2cca08da71a5f6400de0a0a6a9bceeaf" -"checksum rayon 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "43739f8831493b276363637423d3622d4bd6394ab6f0a9c4a552e208aeb7fddd" -"checksum rayon-core 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f8bf17de6f23b05473c437eb958b9c850bfc8af0961fe17b4cc92d5a627b4791" +"checksum rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098" +"checksum rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" -"checksum redox_users 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4ecedbca3bf205f8d8f5c2b44d83cd0690e39ee84b951ed649e9f1841132b66d" -"checksum regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd" +"checksum redox_users 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" +"checksum regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b5508c1941e4e7cb19965abef075d35a9a8b5cdf0846f30b4050e9b55dc55e87" "checksum regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "92b73c2a1770c255c240eaa4ee600df1704a38dc3feaa6e949e7fcd4f8dc09f9" -"checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716" +"checksum regex-syntax 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e734e891f5b408a29efbf8309e656876276f49ab6a6ac208600b4419bd893d90" "checksum region 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "448e868c6e4cfddfa49b6a72c95906c04e8547465e9536575b95c70a4044f856" "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" "checksum ring 0.16.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6747f8da1f2b1fabbee1aaa4eb8a11abf9adef0bf58a41cee45db5d59cecdfac" "checksum rlp 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3a44d5ae8afcb238af8b75640907edc6c931efcfab2c854e81ed35fa080f84cd" "checksum rocksdb 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "12069b106981c6103d3eab7dd1c86751482d0779a520b7c14954c8b586c1e643" -"checksum rpassword 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d59f0e97173c514b9036cd450c195a6483ba81055c6fa0f1bff3ab563f47d44a" -"checksum rust-argon2 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4ca4eaef519b494d1f2848fc602d18816fed808a981aedf4f1f00ceb7c9d32cf" +"checksum rpassword 4.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f" +"checksum rust-argon2 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" "checksum rustc-hex 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b25a18b1bf7387f0145e7f8324e700805aade3842dd3db2e74e4cdeb4677c09e" -"checksum rustversion 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c48f91977f4ef3be5358c15d131d3f663f6b4d7a112555bf3bf52ad23b6659e5" -"checksum rw-stream-sink 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "761d4727649dc004ee5555a0779afd53963efafd2218c969a2c5e323cdf73a09" +"checksum rustversion 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b3bba175698996010c4f6dce5e7f173b6eb781fce25d2cfc45e27091ce0b79f6" +"checksum rw-stream-sink 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020" "checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" "checksum safe-mix 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f7bf422d23a88c16d5090d455f182bc99c60af4df6a345c63428acf5129e347" "checksum safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" -"checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421" +"checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" "checksum schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "87f550b06b6cba9c8b8be3ee73f391990116bf527450d2556e9b9ce263b9a021" "checksum schnorrkel 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)" = "eacd8381b3c37840c9c9f40472af529e49975bdcbc24f83c31059fd6539023d3" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" @@ -8800,10 +8792,10 @@ dependencies = [ "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum send_wrapper 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a0eddf2e8f50ced781f288c19f18621fa72a3779e3cb58dbf23b07469b0abeb4" "checksum send_wrapper 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "686ef91cf020ad8d4aca9a7047641fd6add626b7b89e14546c2b6a76781cf822" -"checksum serde 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "1217f97ab8e8904b57dd22eb61cde455fa7446a9c1cf43966066da047c1f3702" -"checksum serde_derive 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "a8c6faef9a2e64b0064f48570289b4bf8823b7581f1d6157c1b52152306651d0" -"checksum serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)" = "48c575e0cc52bdd09b47f330f646cf59afc586e9c4e3ccd6fc1f625b8ea1dad7" -"checksum sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23962131a91661d643c98940b20fcaffe62d776a823247be80a48fcb8b6fce68" +"checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" +"checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" +"checksum serde_json 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)" = "eab8f15f15d6c41a154c1b128a22f2dfabe350ef53c40953d84e36155c91192b" +"checksum sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum sha2 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "27044adfd2e1f077f649f59deb9490d3941d674002f7d062870a60ebe9bd47a0" "checksum sha3 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" @@ -8835,7 +8827,7 @@ dependencies = [ "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" "checksum subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c65d530b10ccaeac294f349038a597e435b18fb456aadd0840a623f83b9e941" "checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -"checksum syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "dff0acdb207ae2fe6d5976617f887eb1e35a2ba52c13c7234c790960cdad9238" +"checksum syn 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "af6f3550d8dff9ef7dc34d384ac6f107e5d31c8f57d9f28e0081503f547ac8f5" "checksum syn-mid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9fd3937748a7eccff61ba5b90af1a20dbf610858923a9192ea0ecb0cb77db1d0" "checksum synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" "checksum sysinfo 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6f4b2468c629cffba39c0a4425849ab3cdb03d9dfacba69684609aea04d08ff9" @@ -8844,20 +8836,20 @@ dependencies = [ "checksum target_info 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c63f48baada5c52e65a29eef93ab4f8982681b67f9e8d29c7b05abcfec2b9ffe" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" -"checksum termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96d6098003bde162e4277c70665bd87c326f5a0c3f3fbfb285787fa482d54e6e" +"checksum termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" "checksum test-case 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a605baa797821796a751f4a959e1206079b24a4b7e1ed302b7d785d81a9276c9" "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" "checksum thiserror 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6f357d1814b33bc2dc221243f8424104bfe72dbe911d5b71b3816a2dff1c977e" "checksum thiserror-impl 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "eb2e25d25307eb8436894f727aba8f65d07adf02e5b35a13cebed48bd282bfef" -"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" +"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" "checksum threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" "checksum tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c1c5676413eaeb1ea35300a0224416f57abc3bd251657e0fafc12c47ff98c060" "checksum tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d8a021c69bb74a44ccedb824a046447e2c84a01df9e5c20779750acb38e11b2" "checksum tiny-keccak 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2953ca5148619bc99695c1274cb54c5275bbb913c6adad87e72eaf8db9787f69" -"checksum tinytemplate 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4574b75faccaacddb9b284faecdf0b544b80b6b294f3d062d325c5726a209c20" +"checksum tinytemplate 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "57a3c6667d3e65eb1bc3aed6fd14011c6cbc3a0665218ab7f5daf040b9ec371a" "checksum tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" -"checksum tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "ffa2fdcfa937b20cb3c822a635ceecd5fc1a27a6a474527e5516aa24b8c8820a" +"checksum tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8fdd17989496f49cdc57978c96f0c9fe5e4a58a8bddc6813c449a4624f6a030b" "checksum tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" "checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" "checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" @@ -8865,9 +8857,9 @@ dependencies = [ "checksum tokio-executor 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee9ceecf69145923834ea73f32ba40c790fd877b74a7817dd0b089f1eb9c7c8" "checksum tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "3fe6dc22b08d6993916647d108a1a7d15b9cd29c4f4496c62b92c45b5041b7af" "checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" -"checksum tokio-macros 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "50a61f268a3db2acee8dcab514efc813dc6dbe8a00e86076f935f94304b59a7a" +"checksum tokio-macros 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f4b1e7ed7d5d4c2af3d999904b0eebe76544897cdbfb2b9684bed2174ab20f7c" "checksum tokio-reactor 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "6732fe6b53c8d11178dcb77ac6d9682af27fc6d4cb87789449152e5377377146" -"checksum tokio-rustls 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1df2fa53ac211c136832f530ccb081af9af891af22d685a9493e232c7a359bc2" +"checksum tokio-rustls 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2d7cf08f990090abd6c6a73cab46fed62f85e8aef8b99e4b918a9f4a637f0676" "checksum tokio-sync 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "d06554cce1ae4a50f42fba8023918afa931413aded705b560e29600ccf7c6d76" "checksum tokio-sync 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4f1aaeb685540f7407ea0e27f1c9757d258c7c6bf4e3eb19da6fc59b747239d2" "checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" @@ -8877,18 +8869,18 @@ dependencies = [ "checksum tokio-udp 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f02298505547f73e60f568359ef0d016d5acd6e830ab9bc7c4a5b3403440121b" "checksum tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "037ffc3ba0e12a0ab4aca92e5234e0dedeb48fddf6ccd260f1f150a36a9f2445" "checksum tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930" -"checksum toml 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "01d1404644c8b12b16bfcffa4322403a91a451584daaaa7c28d3152e6cbc98cf" +"checksum toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" "checksum tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" -"checksum tracing 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ff4e4f59e752cb3beb5b61c6d5e11191c7946231ba84faec2902c9efdd8691c5" -"checksum tracing-attributes 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a4263b12c3d3c403274493eb805966093b53214124796552d674ca1dd5d27c2b" -"checksum tracing-core 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bc913647c520c959b6d21e35ed8fa6984971deca9f0a2fcb8c51207e0c56af1d" +"checksum tracing 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1e213bd24252abeb86a0b7060e02df677d367ce6cb772cef17e9214b8390a8d3" +"checksum tracing-attributes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04cfd395def5a60236e187e1ff905cb55668a59f29928dec05e6e1b1fd2ac1f3" +"checksum tracing-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "13a46f11e372b8bd4b4398ea54353412fdd7fd42a8370c7e543e218cf7661978" "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" "checksum trie-bench 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "26fd042d57ee9c987c562811162a78db78b5340ab674ac76056c85dca49b26bc" "checksum trie-db 0.19.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a0d747ae5b6f078df7e46477fcc7df66df9eb4f27a031cf4a7c890a8dd03d8e6" "checksum trie-root 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0b779f7c1c8fe9276365d9d5be5c4b5adeacf545117bb3f64c974305789c5c0b" "checksum trie-standardmap 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3161ba520ab28cd8e6b68e1126f1009f6e335339d1a73b978139011703264c8" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" -"checksum trybuild 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "b75e31d624df08744532e935f1d4bfedd319a277d5a162c5b15f6ced59307575" +"checksum trybuild 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)" = "3f5b3f750c701725331ac78e389b5d143b7d25f6b6ffffd0d419759a9063ac5f" "checksum twofish 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d261e83e727c8e2dbb75dacac67c36e35db36a958ee504f2164fc052434e1" "checksum twox-hash 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3bfd5b7557925ce778ff9b9ef90e3ade34c524b5ff10e239c69a42d546d2af56" "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" @@ -8897,7 +8889,7 @@ dependencies = [ "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" "checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b561e267b2326bb4cebfc0ef9e68355c7abe6c6f522aeac2f5bf95d56c59bdcf" +"checksum unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" "checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" "checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" @@ -8906,7 +8898,7 @@ dependencies = [ "checksum unsigned-varint 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c689459fbaeb50e56c6749275f084decfd02194ac5852e6617d95d0d3cf02eaf" "checksum untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60369ef7a31de49bcb3f6ca728d4ba7300d9a1658f94c727d4cab8c8d9f4aece" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -"checksum url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75b414f6c464c879d7f9babf951f23bc3743fb7313c081b2e6ca719067ea9d61" +"checksum url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" "checksum vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" "checksum vergen 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6aba5e34f93dc7051dfad05b98a18e9156f27e7b431fe1d2398cb6061c0a1dba" @@ -8915,17 +8907,17 @@ dependencies = [ "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" "checksum wabt 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3c5c5c1286c6e578416982609f47594265f9d489f9b836157d403ad605a46693" "checksum wabt-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "af5d153dc96aad7dc13ab90835b892c69867948112d95299e522d370c4e13a08" -"checksum walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9658c94fa8b940eab2250bd5a457f9c48b748420d71293b165c8cdbe2f55f71e" +"checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" "checksum want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" "checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -"checksum wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d" -"checksum wasm-bindgen 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)" = "701bc20794a7f9e8dcd85984a848f951ef6c5083322b6dd17fe880c99390f7cd" -"checksum wasm-bindgen-backend 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)" = "426315280d373e1a828e1c322507d51aa82e03c2fb1d654720b9e2f2368d291d" -"checksum wasm-bindgen-futures 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1de54efe80cb87a8fa1f715d60ab47a5eac6b1447dd68665300773f498c229b1" -"checksum wasm-bindgen-macro 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)" = "d9a8a46373db32c892de910ccca302ecdaf8262abab746324a8a4dac352fc11f" -"checksum wasm-bindgen-macro-support 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)" = "45d1c6c2259c0f4ef3d61ea0976ea075b6f8185497c4a5457793740c2cda6430" -"checksum wasm-bindgen-shared 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)" = "dd8e108ae395aae8017b091c4766101f08c635a5074e6631e0085e8a839e5810" -"checksum wasm-bindgen-webidl 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)" = "7a38859ace1c29c8ed75cd74940d4c96b980837179355de542a2eab3b435bb5c" +"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +"checksum wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "5205e9afdf42282b192e2310a5b463a6d1c1d774e30dc3c791ac37ab42d2616c" +"checksum wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "11cdb95816290b525b32587d76419facd99662a07e59d3cdb560488a819d9a45" +"checksum wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8bbdd49e3e28b40dec6a9ba8d17798245ce32b019513a845369c641b275135d9" +"checksum wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "574094772ce6921576fb6f2e3f7497b8a76273b6db092be18fc48a082de09dc3" +"checksum wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668" +"checksum wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "f5e7e61fc929f4c0dddb748b102ebf9f632e2b8d739f2016542b4de2965a9601" +"checksum wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "ef012a0d93fc0432df126a8eaf547b2dce25a8ce9212e1d3cbeef5c11157975d" "checksum wasm-gc-api 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c32691b6c7e6c14e7f8fd55361a9088b507aa49620fcd06c09b3a1082186b9" "checksum wasm-timer 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "324c5e65a08699c9c4334ba136597ab22b85dccd4b65dd1e36ccf8f723a95b54" "checksum wasmi 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bf617d864d25af3587aa745529f7aaa541066c876d57e050c0d0c85c61c92aff" @@ -8935,7 +8927,7 @@ dependencies = [ "checksum wasmtime-environ 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a3947662a0b8e05b1418465e64f16de9114f9fec18cc3f56e0ed5aa7737b89d0" "checksum wasmtime-jit 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6ed7922689461a7b5bd0d9c7350cac526c8a520a23b3ffd7f5b446ac51dfc51f" "checksum wasmtime-runtime 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "781d6bb8b346efaa3dc39746386957cd79b8d841e8652ed9b02d77bcf64fb514" -"checksum web-sys 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)" = "ba09295448c0b93bc87d2769614d371a924749e5e6c87e4c1df8b2416b49b775" +"checksum web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "aaf97caf6aa8c2b1dac90faf0db529d9d63c93846cca4911856f78a83cebf53b" "checksum webpki 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d7e664e770ac0110e2384769bcc59ed19e329d81f555916a6e072714957b81b4" "checksum webpki-roots 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a262ae37dd9d60f60dd473d1158f9fbebf110ba7b6a5051c8160460f6043718b" "checksum webpki-roots 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "91cd5736df7f12a964a5067a12c62fa38e1bd8080aff1f80bc29be7c80d19ab4" @@ -8948,14 +8940,13 @@ dependencies = [ "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" +"checksum winapi-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4ccfbf554c6ad11084fb7517daca16cfdcaccbdadba4fc336f032a8b12c2ad80" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96f5016b18804d24db43cebf3c77269e7569b8954a8464501c216cc5e070eaa9" "checksum ws 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a2c47b5798ccc774ffb93ff536aec7c4275d722fd9c740c83cdd1af1f2d94" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum x25519-dalek 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7ee1585dc1484373cbc1cee7aafda26634665cf449436fd6e24bfd1fad230538" "checksum xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" -"checksum yamux 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "809f4388471d280173404e3d4f889e2d36004960a37d822ce5637fbef33a0ce4" +"checksum yamux 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9f937668802a2e862a4fed05267e10b20c310bf771adc89687710706d55a9a65" "checksum zeroize 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "45af6a010d13e4cf5b54c94ba5a2b2eba5596b9e46bf5875612d332a1f2b3f86" "checksum zeroize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3cbac2ed2ba24cc90f5e06485ac8c7c1e5449fe8911aef4d8877218af021a5b8" "checksum zeroize_derive 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2" diff --git a/bin/node-template/Cargo.toml b/bin/node-template/Cargo.toml index 02ab9e6fd25ed..8b59d1bfa5f57 100644 --- a/bin/node-template/Cargo.toml +++ b/bin/node-template/Cargo.toml @@ -29,6 +29,7 @@ sc-client = { version = "0.8", path = "../../client/" } node-template-runtime = { version = "2.0.0", path = "runtime" } sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" } sc-basic-authorship = { path = "../../client/basic-authorship" } +structopt = "0.3.8" [build-dependencies] vergen = "3.0.4" diff --git a/bin/node-template/src/chain_spec.rs b/bin/node-template/src/chain_spec.rs index 6afb67547bd6c..6c6ab492a3913 100644 --- a/bin/node-template/src/chain_spec.rs +++ b/bin/node-template/src/chain_spec.rs @@ -145,3 +145,10 @@ fn testnet_genesis(initial_authorities: Vec<(AuraId, GrandpaId)>, }), } } + +pub fn load_spec(id: &str) -> Result, String> { + Ok(match Alternative::from(id) { + Some(spec) => Some(spec.load()?), + None => None, + }) +} diff --git a/bin/node-template/src/cli.rs b/bin/node-template/src/cli.rs index 8bc1e061a5c6c..0091ef7d75912 100644 --- a/bin/node-template/src/cli.rs +++ b/bin/node-template/src/cli.rs @@ -1,35 +1,11 @@ -use crate::service; -pub use sc_cli::{VersionInfo, error}; -use sc_cli::CoreParams; -use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair}; -use crate::chain_spec; +use sc_cli::{RunCmd, Subcommand}; +use structopt::StructOpt; -/// Parse command line arguments into service configuration. -pub fn run(args: I, version: VersionInfo) -> error::Result<()> -where - I: Iterator, - T: Into + Clone, -{ - let args: Vec<_> = args.collect(); - let core_params = sc_cli::from_iter::(args.clone(), &version); +#[derive(Debug, StructOpt)] +pub struct Cli { + #[structopt(subcommand)] + pub subcommand: Option, - let mut config = sc_service::Configuration::default(); - config.impl_name = "node-template"; - - sc_cli::run( - config, - core_params, - service::new_light, - service::new_full, - load_spec, - |config: _| Ok(new_full_start!(config).0), - &version, - ) -} - -fn load_spec(id: &str) -> Result, String> { - Ok(match chain_spec::Alternative::from(id) { - Some(spec) => Some(spec.load()?), - None => None, - }) + #[structopt(flatten)] + pub run: RunCmd, } diff --git a/bin/node-template/src/command.rs b/bin/node-template/src/command.rs new file mode 100644 index 0000000000000..0d0f4f937cb7f --- /dev/null +++ b/bin/node-template/src/command.rs @@ -0,0 +1,32 @@ +use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair}; +use sc_cli::{VersionInfo, error}; +use crate::service; +use crate::chain_spec; +use crate::cli::Cli; + +/// Parse and run command line arguments +pub fn run(version: VersionInfo) -> error::Result<()> +{ + let opt = sc_cli::from_args::(&version); + + let mut config = sc_service::Configuration::default(); + config.impl_name = "node-template"; + + match opt.subcommand { + Some(subcommand) => sc_cli::run_subcommand( + config, + subcommand, + chain_spec::load_spec, + |config: _| Ok(new_full_start!(config).0), + &version, + ), + None => sc_cli::run( + config, + opt.run, + service::new_light, + service::new_full, + chain_spec::load_spec, + &version, + ) + } +} diff --git a/bin/node-template/src/main.rs b/bin/node-template/src/main.rs index 157bc7106b2e3..8a02d42afdba1 100644 --- a/bin/node-template/src/main.rs +++ b/bin/node-template/src/main.rs @@ -5,10 +5,11 @@ mod chain_spec; #[macro_use] mod service; mod cli; +mod command; pub use sc_cli::{VersionInfo, error}; -fn main() -> Result<(), cli::error::Error> { +fn main() -> Result<(), error::Error> { let version = VersionInfo { name: "Substrate Node", commit: env!("VERGEN_SHA_SHORT"), @@ -19,5 +20,5 @@ fn main() -> Result<(), cli::error::Error> { support_url: "support.anonymous.an", }; - cli::run(std::env::args(), version) + command::run(version) } diff --git a/bin/node-template/src/service.rs b/bin/node-template/src/service.rs index 97c8e7b24cb22..f6bfa8c90b4fb 100644 --- a/bin/node-template/src/service.rs +++ b/bin/node-template/src/service.rs @@ -11,7 +11,6 @@ use sc_executor::native_executor_instance; pub use sc_executor::NativeExecutor; use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair}; use grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider}; -use futures::{FutureExt, compat::Future01CompatExt}; // Our native executor instance. native_executor_instance!( diff --git a/bin/node/cli/Cargo.toml b/bin/node/cli/Cargo.toml index bf52a5e3c3785..93d683a0eb049 100644 --- a/bin/node/cli/Cargo.toml +++ b/bin/node/cli/Cargo.toml @@ -30,7 +30,7 @@ hex-literal = "0.2.1" jsonrpc-core = "14.0.3" log = "0.4.8" rand = "0.7.2" -structopt = "0.3.8" +structopt = { version = "0.3.8", optional = true } # primitives sp-authority-discovery = { version = "2.0.0", path = "../../../primitives/authority-discovery" } @@ -97,6 +97,8 @@ tempfile = "3.1.0" [build-dependencies] build-script-utils = { version = "2.0.0", package = "substrate-build-script-utils", path = "../../../utils/build-script-utils" } +structopt = { version = "0.3.8", optional = true } +node-transaction-factory = { version = "0.8.0", optional = true, path = "../transaction-factory" } [build-dependencies.sc-cli] version = "0.8.0" @@ -121,6 +123,7 @@ cli = [ "sc-service/rocksdb", "node-executor/wasmi-errno", "vergen", + "structopt", ] wasmtime = [ "cli", diff --git a/bin/node/cli/build.rs b/bin/node/cli/build.rs index 1d4a8774f73f6..e824b59be64f3 100644 --- a/bin/node/cli/build.rs +++ b/bin/node/cli/build.rs @@ -21,8 +21,10 @@ fn main() { #[cfg(feature = "cli")] mod cli { + include!("src/cli.rs"); + use std::{fs, env, path::Path}; - use sc_cli::{CoreParams, structopt::{StructOpt, clap::Shell}}; + use sc_cli::{structopt::clap::Shell}; use vergen::{ConstantsFlags, generate_cargo_keys}; pub fn main() { @@ -54,6 +56,6 @@ mod cli { fs::create_dir(&path).ok(); - CoreParams::clap().gen_completions("substrate-node", *shell, &path); + Cli::clap().gen_completions("substrate-node", *shell, &path); } } diff --git a/bin/node/cli/src/cli.rs b/bin/node/cli/src/cli.rs index 28cbbed09dcf0..201e39eabd05e 100644 --- a/bin/node/cli/src/cli.rs +++ b/bin/node/cli/src/cli.rs @@ -14,14 +14,8 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -pub use sc_cli::VersionInfo; -use sc_cli::{SharedParams, ImportParams, error}; -use sc_service::{Roles as ServiceRoles, Configuration}; +use sc_cli::{SharedParams, ImportParams, RunCmd}; use structopt::StructOpt; -use sc_cli::{CoreParams, RunCmd}; -use crate::{service, ChainSpec, load_spec}; -use crate::factory_impl::FactoryState; -use node_transaction_factory::RuntimeAdapter; #[derive(Clone, Debug, StructOpt)] #[structopt(settings = &[ @@ -29,9 +23,17 @@ use node_transaction_factory::RuntimeAdapter; structopt::clap::AppSettings::ArgsNegateSubcommands, structopt::clap::AppSettings::SubcommandsNegateReqs, ])] -enum Cli { +pub struct Cli { + #[structopt(subcommand)] + pub subcommand: Option, #[structopt(flatten)] - SubstrateCli(CoreParams), + pub run: RunCmd, +} + +#[derive(Clone, Debug, StructOpt)] +pub enum Subcommand { + #[structopt(flatten)] + Base(sc_cli::Subcommand), /// The custom factory subcommmand for manufacturing transactions. #[structopt( name = "factory", @@ -82,64 +84,3 @@ pub struct FactoryCmd { #[structopt(flatten)] pub import_params: ImportParams, } - -/// Parse command line arguments into service configuration. -pub fn run(args: I, version: sc_cli::VersionInfo) -> error::Result<()> -where - I: Iterator, - T: Into + Clone, -{ - type Config = Configuration; - - let args: Vec<_> = args.collect(); - let subcommand = match sc_cli::try_from_iter::(args.clone(), &version) { - Ok(opt) => Cli::SubstrateCli(CoreParams::Run(opt)), - Err(_) => sc_cli::from_iter::(args.clone(), &version), - }; - - let mut config = sc_service::Configuration::default(); - config.impl_name = "substrate-node"; - - match subcommand { - Cli::SubstrateCli(cli) => sc_cli::run( - config, - cli, - service::new_light, - service::new_full, - load_spec, - |config: Config<_, _>| Ok(new_full_start!(config).0), - &version, - ), - Cli::Factory(cli_args) => { - sc_cli::init(&mut config, load_spec, &cli_args.shared_params, &version)?; - - sc_cli::fill_import_params( - &mut config, - &cli_args.import_params, - ServiceRoles::FULL, - cli_args.shared_params.dev, - )?; - - match ChainSpec::from(config.expect_chain_spec().id()) { - Some(ref c) if c == &ChainSpec::Development || c == &ChainSpec::LocalTestnet => {}, - _ => panic!("Factory is only supported for development and local testnet."), - } - - let factory_state = FactoryState::new( - cli_args.mode.clone(), - cli_args.num, - cli_args.rounds, - ); - - let service_builder = new_full_start!(config).0; - node_transaction_factory::factory::, _, _, _, _, _>( - factory_state, - service_builder.client(), - service_builder.select_chain() - .expect("The select_chain is always initialized by new_full_start!; QED") - ).map_err(|e| format!("Error in transaction factory: {}", e))?; - - Ok(()) - }, - } -} diff --git a/bin/node/cli/src/command.rs b/bin/node/cli/src/command.rs new file mode 100644 index 0000000000000..86d98fbd37596 --- /dev/null +++ b/bin/node/cli/src/command.rs @@ -0,0 +1,67 @@ +use sc_cli::{VersionInfo, error}; +use sc_service::{Roles as ServiceRoles}; +use node_transaction_factory::RuntimeAdapter; +use crate::{Cli, service, ChainSpec, load_spec, Subcommand}; +use crate::factory_impl::FactoryState; + +/// Parse command line arguments into service configuration. +pub fn run(args: I, version: sc_cli::VersionInfo) -> error::Result<()> +where + I: Iterator, + T: Into + Clone, +{ + let args: Vec<_> = args.collect(); + let opt = sc_cli::from_iter::(args.clone(), &version); + + let mut config = sc_service::Configuration::default(); + config.impl_name = "substrate-node"; + + match opt.subcommand { + None => sc_cli::run( + config, + opt.run, + service::new_light, + service::new_full, + load_spec, + &version, + ), + Some(Subcommand::Factory(cli_args)) => { + sc_cli::init(&mut config, load_spec, &cli_args.shared_params, &version)?; + + sc_cli::fill_import_params( + &mut config, + &cli_args.import_params, + ServiceRoles::FULL, + cli_args.shared_params.dev, + )?; + + match ChainSpec::from(config.expect_chain_spec().id()) { + Some(ref c) if c == &ChainSpec::Development || c == &ChainSpec::LocalTestnet => {}, + _ => panic!("Factory is only supported for development and local testnet."), + } + + let factory_state = FactoryState::new( + cli_args.mode.clone(), + cli_args.num, + cli_args.rounds, + ); + + let service_builder = new_full_start!(config).0; + node_transaction_factory::factory::, _, _, _, _, _>( + factory_state, + service_builder.client(), + service_builder.select_chain() + .expect("The select_chain is always initialized by new_full_start!; QED") + ).map_err(|e| format!("Error in transaction factory: {}", e))?; + + Ok(()) + }, + Some(Subcommand::Base(subcommand)) => sc_cli::run_subcommand( + config, + subcommand, + load_spec, + |config: service::NodeConfiguration| Ok(new_full_start!(config).0), + &version, + ), + } +} diff --git a/bin/node/cli/src/lib.rs b/bin/node/cli/src/lib.rs index d3fbf9c1ea5cd..f5b915a2bedd6 100644 --- a/bin/node/cli/src/lib.rs +++ b/bin/node/cli/src/lib.rs @@ -39,11 +39,15 @@ mod browser; mod cli; #[cfg(feature = "cli")] mod factory_impl; +#[cfg(feature = "cli")] +mod command; #[cfg(feature = "browser")] pub use browser::*; #[cfg(feature = "cli")] pub use cli::*; +#[cfg(feature = "cli")] +pub use command::*; /// The chain specification option. #[derive(Clone, Debug, PartialEq)] diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 4754f6ead94e4..a49e88a77b77e 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -55,8 +55,8 @@ use params::{ NetworkConfigurationParams, TransactionPoolParams, Cors, }; pub use params::{ - CoreParams, SharedParams, ImportParams, ExecutionStrategy, - RunCmd, BuildSpecCmd, ExportBlocksCmd, ImportBlocksCmd, CheckBlockCmd, PurgeChainCmd, RevertCmd, + SharedParams, ImportParams, ExecutionStrategy, Subcommand, RunCmd, BuildSpecCmd, + ExportBlocksCmd, ImportBlocksCmd, CheckBlockCmd, PurgeChainCmd, RevertCmd, }; pub use traits::GetSharedParams; use app_dirs::{AppInfo, AppDataType}; @@ -222,33 +222,50 @@ where Ok(T::from_clap(&matches)) } -/// A helper function that initializes and runs any of the command variants of `CoreParams`. -pub fn run( +/// A helper function that initializes and runs the node +pub fn run( mut config: Configuration, - core_params: CoreParams, + run_cmd: RunCmd, new_light: FNL, new_full: FNF, spec_factory: F, - builder: B, version: &VersionInfo, ) -> error::Result<()> where F: FnOnce(&str) -> Result>, String>, FNL: FnOnce(Configuration) -> Result, FNF: FnOnce(Configuration) -> Result, - B: FnOnce(Configuration) -> Result, G: RuntimeGenesis, E: ChainSpecExtension, SL: AbstractService + Unpin, SF: AbstractService + Unpin, +{ + init(&mut config, spec_factory, &run_cmd.shared_params, version)?; + + run_cmd.run(config, new_light, new_full, version) +} + +/// A helper function that initializes and runs any of the subcommand variants of `CoreParams`. +pub fn run_subcommand( + mut config: Configuration, + subcommand: Subcommand, + spec_factory: F, + builder: B, + version: &VersionInfo, +) -> error::Result<()> +where + F: FnOnce(&str) -> Result>, String>, + B: FnOnce(Configuration) -> Result, + G: RuntimeGenesis, + E: ChainSpecExtension, BC: ServiceBuilderCommand + Unpin, BB: sp_runtime::traits::Block + Debug, <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, ::Hash: std::str::FromStr, { - init(&mut config, spec_factory, core_params.get_shared_params(), version)?; + init(&mut config, spec_factory, &subcommand.get_shared_params(), version)?; - core_params.run(config, new_light, new_full, builder, version) + subcommand.run(config, builder, version) } /// Initialize substrate and its configuration diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 3f53180caaaea..2174fdaad63c7 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -851,10 +851,7 @@ pub struct PurgeChainCmd { /// the CLI user perspective, it is not visible that `Run` is a subcommand. So, all parameters of /// `Run` are exported as main executable parameters. #[derive(Debug, Clone, StructOpt)] -pub enum CoreParams { - /// Run a node. - Run(RunCmd), - +pub enum Subcommand { /// Build a spec.json file, outputing to stdout. BuildSpec(BuildSpecCmd), @@ -874,13 +871,12 @@ pub enum CoreParams { PurgeChain(PurgeChainCmd), } -impl CoreParams { +impl Subcommand { /// Get the shared parameters of a `CoreParams` command pub fn get_shared_params(&self) -> &SharedParams { - use CoreParams::*; + use Subcommand::*; match self { - Run(params) => ¶ms.shared_params, BuildSpec(params) => ¶ms.shared_params, ExportBlocks(params) => ¶ms.shared_params, ImportBlocks(params) => ¶ms.shared_params, @@ -891,22 +887,16 @@ impl CoreParams { } /// Run any `CoreParams` command - pub fn run( + pub fn run( self, config: Configuration, - new_light: FNL, - new_full: FNF, builder: B, version: &VersionInfo, ) -> error::Result<()> where - FNL: FnOnce(Configuration) -> Result, - FNF: FnOnce(Configuration) -> Result, B: FnOnce(Configuration) -> Result, G: RuntimeGenesis, E: ChainSpecExtension, - SL: AbstractService + Unpin, - SF: AbstractService + Unpin, BC: ServiceBuilderCommand + Unpin, BB: sp_runtime::traits::Block + Debug, <<::Header as HeaderT>::Number as std::str::FromStr>::Err: std::fmt::Debug, @@ -915,13 +905,12 @@ impl CoreParams { assert!(config.chain_spec.is_some(), "chain_spec must be present before continuing"); match self { - CoreParams::Run(cmd) => cmd.run(config, new_light, new_full, version), - CoreParams::BuildSpec(cmd) => cmd.run(config), - CoreParams::ExportBlocks(cmd) => cmd.run(config, builder), - CoreParams::ImportBlocks(cmd) => cmd.run(config, builder), - CoreParams::CheckBlock(cmd) => cmd.run(config, builder), - CoreParams::PurgeChain(cmd) => cmd.run(config), - CoreParams::Revert(cmd) => cmd.run(config, builder), + Subcommand::BuildSpec(cmd) => cmd.run(config), + Subcommand::ExportBlocks(cmd) => cmd.run(config, builder), + Subcommand::ImportBlocks(cmd) => cmd.run(config, builder), + Subcommand::CheckBlock(cmd) => cmd.run(config, builder), + Subcommand::PurgeChain(cmd) => cmd.run(config), + Subcommand::Revert(cmd) => cmd.run(config, builder), } } } From b6df5250d1196e68b3a95c1fe9d12afa7d32c45a Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 09:27:23 +0100 Subject: [PATCH 54/77] WIP --- client/cli/src/params.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 2174fdaad63c7..46f7c0983ae21 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -543,35 +543,35 @@ pub struct RunCmd { #[structopt(flatten)] pub pool_config: TransactionPoolParams, - #[allow(missing_docs)] + /// Shortcut for `--name alice --validator` with session keys for `alice` added to keystore. #[structopt(long, conflicts_with_all = &["bob", "charlie", "dave", "eve", "ferdie", "one", "two"])] pub alice: bool, - #[allow(missing_docs)] + /// Shortcut for `--name bob --validator` with session keys for `bob` added to keystore. #[structopt(long, conflicts_with_all = &["alice", "charlie", "dave", "eve", "ferdie", "one", "two"])] pub bob: bool, - #[allow(missing_docs)] + /// Shortcut for `--name charlie --validator` with session keys for `charlie` added to keystore. #[structopt(long, conflicts_with_all = &["alice", "bob", "dave", "eve", "ferdie", "one", "two"])] pub charlie: bool, - #[allow(missing_docs)] + /// Shortcut for `--name dave --validator` with session keys for `dave` added to keystore. #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "eve", "ferdie", "one", "two"])] pub dave: bool, - #[allow(missing_docs)] + /// Shortcut for `--name eve --validator` with session keys for `eve` added to keystore. #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "ferdie", "one", "two"])] pub eve: bool, - #[allow(missing_docs)] + /// Shortcut for `--name ferdie --validator` with session keys for `ferdie` added to keystore. #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "one", "two"])] pub ferdie: bool, - #[allow(missing_docs)] + /// Shortcut for `--name one --validator` with session keys for `one` added to keystore. #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "two"])] pub one: bool, - #[allow(missing_docs)] + /// Shortcut for `--name two --validator` with session keys for `two` added to keystore. #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "one"])] pub two: bool, From 07e0310fc0b0b716f9e7203eadf4b34061fc169d Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 09:34:06 +0100 Subject: [PATCH 55/77] WIP --- bin/node-template/src/command.rs | 16 ++++++++++++++++ bin/node/cli/src/command.rs | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/bin/node-template/src/command.rs b/bin/node-template/src/command.rs index 0d0f4f937cb7f..86058929b0871 100644 --- a/bin/node-template/src/command.rs +++ b/bin/node-template/src/command.rs @@ -1,3 +1,19 @@ +// Copyright 2017-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair}; use sc_cli::{VersionInfo, error}; use crate::service; diff --git a/bin/node/cli/src/command.rs b/bin/node/cli/src/command.rs index 86d98fbd37596..33c11f31867c0 100644 --- a/bin/node/cli/src/command.rs +++ b/bin/node/cli/src/command.rs @@ -1,3 +1,19 @@ +// Copyright 2017-2020 Parity Technologies (UK) Ltd. +// This file is part of Substrate. + +// Substrate is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Substrate is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Substrate. If not, see . + use sc_cli::{VersionInfo, error}; use sc_service::{Roles as ServiceRoles}; use node_transaction_factory::RuntimeAdapter; From e99c674ed384e31a7762179fef4c5c39b8e02f0f Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 09:34:47 +0100 Subject: [PATCH 56/77] WIP --- bin/node/cli/src/command.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/node/cli/src/command.rs b/bin/node/cli/src/command.rs index 33c11f31867c0..65015efcb2b3a 100644 --- a/bin/node/cli/src/command.rs +++ b/bin/node/cli/src/command.rs @@ -17,8 +17,7 @@ use sc_cli::{VersionInfo, error}; use sc_service::{Roles as ServiceRoles}; use node_transaction_factory::RuntimeAdapter; -use crate::{Cli, service, ChainSpec, load_spec, Subcommand}; -use crate::factory_impl::FactoryState; +use crate::{Cli, service, ChainSpec, load_spec, Subcommand, factory_impl::FactoryState}; /// Parse command line arguments into service configuration. pub fn run(args: I, version: sc_cli::VersionInfo) -> error::Result<()> From c3bb276dbea1284d35b21abcecb7e2b6ca1d859f Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 10:55:33 +0100 Subject: [PATCH 57/77] WIP --- client/cli/src/params.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 46f7c0983ae21..5abeeab4c6427 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -891,7 +891,6 @@ impl Subcommand { self, config: Configuration, builder: B, - version: &VersionInfo, ) -> error::Result<()> where B: FnOnce(Configuration) -> Result, From 8aedbd499e815f91f5bc4e4f367e2d8b448eb61e Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 11:06:52 +0100 Subject: [PATCH 58/77] WIP --- client/cli/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 379a14918fb1a..e72b2099a5322 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -265,7 +265,7 @@ where { init(&mut config, spec_factory, &subcommand.get_shared_params(), version)?; - subcommand.run(config, builder, version) + subcommand.run(config, builder) } /// Initialize substrate and its configuration From 35e1cd41213da6f3a4d899519f26fe8df228620e Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 13:04:39 +0100 Subject: [PATCH 59/77] WIP --- client/cli/src/runtime.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/client/cli/src/runtime.rs b/client/cli/src/runtime.rs index a8c2b1f670c93..e1eb227f596ce 100644 --- a/client/cli/src/runtime.rs +++ b/client/cli/src/runtime.rs @@ -21,6 +21,7 @@ use sc_service::{AbstractService, Configuration}; use crate::error; use crate::informant; +#[cfg(target_family = "unix")] async fn main(func: F) -> Result<(), Box> where F: Future> + future::FusedFuture, @@ -46,6 +47,27 @@ where Ok(()) } +#[cfg(target_family = "windows")] +async fn main(func: F) -> Result<(), Box> +where + F: Future> + future::FusedFuture, + E: 'static + std::error::Error, +{ + use tokio::signal::ctrl_c; + + let t1 = ctrl_c().fuse(); + let t2 = func; + + pin_mut!(t1, t2); + + select! { + _ = t1 => println!("Caught CTRL-C"), + res = t2 => res?, + } + + Ok(()) +} + fn build_runtime() -> Result { tokio::runtime::Builder::new() .thread_name("main-tokio-") From 031ca07ccf96d09d29789aa4c4b6d7596036ad83 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 13:45:23 +0100 Subject: [PATCH 60/77] Update client/cli/src/runtime.rs Co-Authored-By: Pierre Krieger --- client/cli/src/runtime.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/runtime.rs b/client/cli/src/runtime.rs index e1eb227f596ce..ff425d4e859f8 100644 --- a/client/cli/src/runtime.rs +++ b/client/cli/src/runtime.rs @@ -47,7 +47,7 @@ where Ok(()) } -#[cfg(target_family = "windows")] +#[cfg(not(unix))] async fn main(func: F) -> Result<(), Box> where F: Future> + future::FusedFuture, From ff986dcdb688e25e14f9fb7282af1b9dbd2f2704 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 13:46:53 +0100 Subject: [PATCH 61/77] WIP --- client/cli/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index e72b2099a5322..f57066a78f938 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -334,7 +334,7 @@ where { info!("{}", version.name); info!(" version {}", config.full_version()); - info!(" by {}, 2017-2020", version.author); + info!(" by {}", version.author); info!("Chain specification: {}", config.expect_chain_spec().name()); info!("Node name: {}", config.name); info!("Roles: {}", display_role(&config)); From a0d4a5447e7478c8719a4f5833ab0c569038ec35 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 14:38:26 +0100 Subject: [PATCH 62/77] Update client/cli/src/params.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Bastian Köcher --- client/cli/src/params.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 5abeeab4c6427..375305420d1c9 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -547,7 +547,7 @@ pub struct RunCmd { #[structopt(long, conflicts_with_all = &["bob", "charlie", "dave", "eve", "ferdie", "one", "two"])] pub alice: bool, - /// Shortcut for `--name bob --validator` with session keys for `bob` added to keystore. + /// Shortcut for `--name Bob --validator` with session keys for `Bob` added to keystore. #[structopt(long, conflicts_with_all = &["alice", "charlie", "dave", "eve", "ferdie", "one", "two"])] pub bob: bool, From 34cf9305aef04fb316cdab88de73c0d8869d58da Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 14:38:37 +0100 Subject: [PATCH 63/77] Update client/cli/src/params.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Bastian Köcher --- client/cli/src/params.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 375305420d1c9..6971fef3e6c98 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -571,7 +571,7 @@ pub struct RunCmd { #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "two"])] pub one: bool, - /// Shortcut for `--name two --validator` with session keys for `two` added to keystore. + /// Shortcut for `--name Two --validator` with session keys for `Two` added to keystore. #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "one"])] pub two: bool, From 957a102bf26f51fe28cacd7714d3398fff051ba7 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 14:38:49 +0100 Subject: [PATCH 64/77] Update client/cli/src/params.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Bastian Köcher --- client/cli/src/params.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 6971fef3e6c98..2ab85985c280a 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -567,7 +567,7 @@ pub struct RunCmd { #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "one", "two"])] pub ferdie: bool, - /// Shortcut for `--name one --validator` with session keys for `one` added to keystore. + /// Shortcut for `--name One --validator` with session keys for `One` added to keystore. #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "ferdie", "two"])] pub one: bool, From f3d7b01e8a91e164e403f4a034bfae7ef1c52e9e Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 14:39:00 +0100 Subject: [PATCH 65/77] Update client/cli/src/params.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Bastian Köcher --- client/cli/src/params.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 2ab85985c280a..89d354154cd54 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -543,7 +543,7 @@ pub struct RunCmd { #[structopt(flatten)] pub pool_config: TransactionPoolParams, - /// Shortcut for `--name alice --validator` with session keys for `alice` added to keystore. + /// Shortcut for `--name Alice --validator` with session keys for `Alice` added to keystore. #[structopt(long, conflicts_with_all = &["bob", "charlie", "dave", "eve", "ferdie", "one", "two"])] pub alice: bool, From 292ec6e471b3bf6f2cc2510d9ffdfd9f000443d7 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 14:39:14 +0100 Subject: [PATCH 66/77] Update client/cli/src/params.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Bastian Köcher --- client/cli/src/params.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 89d354154cd54..84a5220ba6155 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -551,7 +551,7 @@ pub struct RunCmd { #[structopt(long, conflicts_with_all = &["alice", "charlie", "dave", "eve", "ferdie", "one", "two"])] pub bob: bool, - /// Shortcut for `--name charlie --validator` with session keys for `charlie` added to keystore. + /// Shortcut for `--name Charlie --validator` with session keys for `Charlie` added to keystore. #[structopt(long, conflicts_with_all = &["alice", "bob", "dave", "eve", "ferdie", "one", "two"])] pub charlie: bool, From ec78b9c1608b33f6518f2e702d98d101710a8aba Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 14:40:05 +0100 Subject: [PATCH 67/77] Update client/cli/src/params.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Bastian Köcher --- client/cli/src/params.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 84a5220ba6155..3e9848cc0ab5d 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -555,7 +555,7 @@ pub struct RunCmd { #[structopt(long, conflicts_with_all = &["alice", "bob", "dave", "eve", "ferdie", "one", "two"])] pub charlie: bool, - /// Shortcut for `--name dave --validator` with session keys for `dave` added to keystore. + /// Shortcut for `--name Dave --validator` with session keys for `Dave` added to keystore. #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "eve", "ferdie", "one", "two"])] pub dave: bool, From 505f5743973c903ade51fad09edc7ccea98654dd Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 14:40:21 +0100 Subject: [PATCH 68/77] Update client/cli/src/params.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Bastian Köcher --- client/cli/src/params.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 3e9848cc0ab5d..dfc41e0a8a012 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -559,7 +559,7 @@ pub struct RunCmd { #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "eve", "ferdie", "one", "two"])] pub dave: bool, - /// Shortcut for `--name eve --validator` with session keys for `eve` added to keystore. + /// Shortcut for `--name Eve --validator` with session keys for `Eve` added to keystore. #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "ferdie", "one", "two"])] pub eve: bool, From 3ffe54305d89feddadb7021bb09be25aa8a8887a Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 14:40:34 +0100 Subject: [PATCH 69/77] Update client/cli/src/params.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Bastian Köcher --- client/cli/src/params.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index dfc41e0a8a012..4622b3d2b0083 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -563,7 +563,7 @@ pub struct RunCmd { #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "ferdie", "one", "two"])] pub eve: bool, - /// Shortcut for `--name ferdie --validator` with session keys for `ferdie` added to keystore. + /// Shortcut for `--name Ferdie --validator` with session keys for `Ferdie` added to keystore. #[structopt(long, conflicts_with_all = &["alice", "bob", "charlie", "dave", "eve", "one", "two"])] pub ferdie: bool, From 03cc75f6a97c0d3f64d8212bf6d467e78f800a0c Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 14:41:24 +0100 Subject: [PATCH 70/77] Update client/cli/src/params.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Bastian Köcher --- client/cli/src/params.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 4622b3d2b0083..5b37d614e06f9 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -1150,7 +1150,7 @@ impl PurgeChainCmd { } match fs::remove_dir_all(&db_path) { - Result::Ok(_) => { + Ok(_) => { println!("{:?} removed.", &db_path); Ok(()) }, From d126cb5f54255161ddbe9abfa7c382f40d447061 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 14:41:38 +0100 Subject: [PATCH 71/77] Update client/cli/src/params.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Bastian Köcher --- client/cli/src/params.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index 5b37d614e06f9..a66f7d1f5029e 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -1154,7 +1154,7 @@ impl PurgeChainCmd { println!("{:?} removed.", &db_path); Ok(()) }, - Result::Err(ref err) if err.kind() == io::ErrorKind::NotFound => { + Err(ref err) if err.kind() == io::ErrorKind::NotFound => { eprintln!("{:?} did not exist.", &db_path); Ok(()) }, From 54ac33d498fa3a17b3db4e5756903136edbb1235 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 14:41:50 +0100 Subject: [PATCH 72/77] Update client/cli/src/params.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Bastian Köcher --- client/cli/src/params.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/params.rs b/client/cli/src/params.rs index a66f7d1f5029e..73d9fa59ba330 100644 --- a/client/cli/src/params.rs +++ b/client/cli/src/params.rs @@ -1158,7 +1158,7 @@ impl PurgeChainCmd { eprintln!("{:?} did not exist.", &db_path); Ok(()) }, - Result::Err(err) => Result::Err(err.into()) + Err(err) => Result::Err(err.into()) } } } From 4fd3edf197204d4208c7cb1bbac7c0a6aaa01668 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 14:54:02 +0100 Subject: [PATCH 73/77] WIP --- client/cli/src/runtime.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/cli/src/runtime.rs b/client/cli/src/runtime.rs index ff425d4e859f8..3eee94c0495ea 100644 --- a/client/cli/src/runtime.rs +++ b/client/cli/src/runtime.rs @@ -39,8 +39,8 @@ where pin_mut!(t1, t2, t3); select! { - _ = t1 => println!("Caught SIGINT"), - _ = t2 => println!("Caught SIGTERM"), + _ = t1 => {}, + _ = t2 => {}, res = t3 => res?, } @@ -61,7 +61,7 @@ where pin_mut!(t1, t2); select! { - _ = t1 => println!("Caught CTRL-C"), + _ = t1 => {}, res = t2 => res?, } From 6276b7686c744815ca59ef29b92ca2ece9a82214 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 29 Jan 2020 15:05:20 +0100 Subject: [PATCH 74/77] WIP --- Cargo.lock | 1 + bin/node-template/src/main.rs | 1 + bin/node/cli/bin/main.rs | 1 + client/cli/Cargo.toml | 1 + client/cli/src/lib.rs | 5 ++++- 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index d9895144f6ea0..7fd45c7632605 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5171,6 +5171,7 @@ dependencies = [ "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "app_dirs 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/bin/node-template/src/main.rs b/bin/node-template/src/main.rs index 8a02d42afdba1..9d0a57d77a851 100644 --- a/bin/node-template/src/main.rs +++ b/bin/node-template/src/main.rs @@ -18,6 +18,7 @@ fn main() -> Result<(), error::Error> { author: "Anonymous", description: "Template Node", support_url: "support.anonymous.an", + copyright_start_year: 2017, }; command::run(version) diff --git a/bin/node/cli/bin/main.rs b/bin/node/cli/bin/main.rs index 319d4d3c7228e..e951c04710b92 100644 --- a/bin/node/cli/bin/main.rs +++ b/bin/node/cli/bin/main.rs @@ -29,6 +29,7 @@ fn main() -> Result<(), sc_cli::error::Error> { author: "Parity Technologies ", description: "Generic substrate node", support_url: "https://github.com/paritytech/substrate/issues/new", + copyright_start_year: 2017, }; node_cli::run(std::env::args(), version) diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml index 2e16f82edb10d..edb41599ee352 100644 --- a/client/cli/Cargo.toml +++ b/client/cli/Cargo.toml @@ -33,6 +33,7 @@ sp-keyring = { version = "2.0.0", path = "../../primitives/keyring" } names = "0.11.0" structopt = "0.3.8" sc-tracing = { version = "2.0.0", path = "../tracing" } +chrono = "0.4.10" [target.'cfg(not(target_os = "unknown"))'.dependencies] rpassword = "4.0.1" diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index f57066a78f938..e0ad275c26cb6 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -67,6 +67,7 @@ use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; pub use crate::runtime::{run_until_exit, run_service_until_exit}; use execution_strategy::*; use names::{Generator, Name}; +use chrono::prelude::*; /// default sub directory to store network config const DEFAULT_NETWORK_CONFIG_PATH : &'static str = "network"; @@ -95,6 +96,8 @@ pub struct VersionInfo { pub author: &'static str, /// Support URL. pub support_url: &'static str, + /// Copyright starting year (x-current year) + pub copyright_start_year: i32, } fn get_chain_key(cli: &SharedParams) -> String { @@ -334,7 +337,7 @@ where { info!("{}", version.name); info!(" version {}", config.full_version()); - info!(" by {}", version.author); + info!(" by {}, {}-{}", version.author, version.copyright_start_year, Local::today().year()); info!("Chain specification: {}", config.expect_chain_spec().name()); info!("Node name: {}", config.name); info!("Roles: {}", display_role(&config)); From 6424b53342b138079ee02c1e1bc4b331108d25b8 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Thu, 30 Jan 2020 10:49:51 +0100 Subject: [PATCH 75/77] Update client/cli/src/lib.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Bastian Köcher --- client/cli/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index e0ad275c26cb6..d371b946ff177 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -210,7 +210,7 @@ where let mut full_version = sc_service::config::full_version_from_strs( version.version, - version.commit + version.commit, ); full_version.push_str("\n"); From 7774621b097d965eeb664a2c53919118f4d8ab98 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Thu, 30 Jan 2020 10:53:32 +0100 Subject: [PATCH 76/77] Update client/cli/src/lib.rs Co-Authored-By: Pierre Krieger --- client/cli/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index d371b946ff177..08fa61122ab6a 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -320,7 +320,7 @@ where /// Run the node /// -/// Run the light node if the role is "light", otherwise run the full node. +/// Builds and runs either a full or a light node, depending on the `role` within the `Configuration`. pub fn run_node( config: Configuration, new_light: FNL, From 9c09d17668c6f8db2b8efb4c0566bb54240d8eba Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Thu, 30 Jan 2020 10:55:55 +0100 Subject: [PATCH 77/77] WIP --- client/cli/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/cli/src/lib.rs b/client/cli/src/lib.rs index 08fa61122ab6a..c602d52ed9ea5 100644 --- a/client/cli/src/lib.rs +++ b/client/cli/src/lib.rs @@ -449,8 +449,8 @@ fn fill_config_keystore_in_memory(config: &mut sc_service::Configuration Result<(), String> { match &mut config.keystore { - cfg @ KeystoreConfig::None => { *cfg = KeystoreConfig::InMemory; Ok(()) }, - _ => Err("Keystore config specified when it should not be!".into()), + cfg @ KeystoreConfig::None => { *cfg = KeystoreConfig::InMemory; Ok(()) }, + _ => Err("Keystore config specified when it should not be!".into()), } }