diff --git a/substrate/Cargo.lock b/substrate/Cargo.lock index affa982bd3..b50575fa80 100644 --- a/substrate/Cargo.lock +++ b/substrate/Cargo.lock @@ -5869,6 +5869,7 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-utils", + "sp-version", "structopt", "substrate-prometheus-endpoint", "tempfile", diff --git a/substrate/bin/node-template/node/src/command.rs b/substrate/bin/node-template/node/src/command.rs index 75b88877aa..7950df9a0b 100644 --- a/substrate/bin/node-template/node/src/command.rs +++ b/substrate/bin/node-template/node/src/command.rs @@ -71,7 +71,11 @@ pub fn run() -> sc_cli::Result<()> { } None => { let runner = cli.create_runner(&cli.run)?; - runner.run_node(service::new_light, service::new_full) + runner.run_node( + service::new_light, + service::new_full, + node_template_runtime::VERSION + ) } } } diff --git a/substrate/bin/node/cli/Cargo.toml b/substrate/bin/node/cli/Cargo.toml index c15769a98a..4643df6072 100644 --- a/substrate/bin/node/cli/Cargo.toml +++ b/substrate/bin/node/cli/Cargo.toml @@ -53,13 +53,13 @@ sp-inherents = { version = "2.0.0-alpha.5", path = "../../../primitives/inherent sp-keyring = { version = "2.0.0-alpha.5", path = "../../../primitives/keyring" } sp-io = { version = "2.0.0-alpha.5", path = "../../../primitives/io" } sp-consensus = { version = "0.8.0-alpha.5", path = "../../../primitives/consensus/common" } +sp-transaction-pool = { version = "2.0.0-alpha.5", path = "../../../primitives/transaction-pool" } # client dependencies sc-client-api = { version = "2.0.0-alpha.5", path = "../../../client/api" } sc-client = { version = "0.8.0-alpha.5", path = "../../../client/" } sc-chain-spec = { version = "2.0.0-alpha.5", path = "../../../client/chain-spec" } sc-transaction-pool = { version = "2.0.0-alpha.5", path = "../../../client/transaction-pool" } -sp-transaction-pool = { version = "2.0.0-alpha.5", path = "../../../primitives/transaction-pool" } sc-network = { version = "0.8.0-alpha.5", path = "../../../client/network" } sc-consensus-babe = { version = "0.8.0-alpha.5", path = "../../../client/consensus/babe" } grandpa = { version = "0.8.0-alpha.5", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" } diff --git a/substrate/bin/node/cli/src/command.rs b/substrate/bin/node/cli/src/command.rs index 179a61cee8..ab7d6ea65e 100644 --- a/substrate/bin/node/cli/src/command.rs +++ b/substrate/bin/node/cli/src/command.rs @@ -72,7 +72,11 @@ pub fn run() -> Result<()> { match &cli.subcommand { None => { let runner = cli.create_runner(&cli.run)?; - runner.run_node(service::new_light, service::new_full) + runner.run_node( + service::new_light, + service::new_full, + node_runtime::VERSION + ) } Some(Subcommand::Inspect(cmd)) => { let runner = cli.create_runner(cmd)?; diff --git a/substrate/client/cli/Cargo.toml b/substrate/client/cli/Cargo.toml index 89247cf016..1043818f7c 100644 --- a/substrate/client/cli/Cargo.toml +++ b/substrate/client/cli/Cargo.toml @@ -30,6 +30,7 @@ sp-blockchain = { version = "2.0.0-alpha.5", path = "../../primitives/blockchain sc-network = { version = "0.8.0-alpha.5", path = "../network" } sp-runtime = { version = "2.0.0-alpha.5", path = "../../primitives/runtime" } sp-utils = { version = "2.0.0-alpha.5", path = "../../primitives/utils" } +sp-version = { version = "2.0.0-alpha.5", path = "../../primitives/version" } sp-core = { version = "2.0.0-alpha.5", path = "../../primitives/core" } sc-service = { version = "0.8.0-alpha.5", default-features = false, path = "../service" } sp-state-machine = { version = "0.8.0-alpha.5", path = "../../primitives/state-machine" } diff --git a/substrate/client/cli/src/runner.rs b/substrate/client/cli/src/runner.rs index bd5dc7100e..c2c4f9739d 100644 --- a/substrate/client/cli/src/runner.rs +++ b/substrate/client/cli/src/runner.rs @@ -134,8 +134,12 @@ impl Runner { /// A helper function that runs an `AbstractService` with tokio and stops if the process receives /// the signal `SIGTERM` or `SIGINT`. - pub fn run_node(self, new_light: FNL, new_full: FNF) -> Result<()> - where + pub fn run_node( + self, + new_light: FNL, + new_full: FNF, + runtime_version: sp_version::RuntimeVersion, + ) -> Result<()> where FNL: FnOnce(Configuration) -> sc_service::error::Result, FNF: FnOnce(Configuration) -> sc_service::error::Result, SL: AbstractService + Unpin, @@ -152,6 +156,7 @@ impl Runner { info!("📋 Chain specification: {}", self.config.chain_spec.name()); info!("🏷 Node name: {}", self.config.network.node_name); info!("👤 Role: {}", self.config.display_role()); + info!("⛓ Native runtime: {}", runtime_version); match self.config.role { Role::Light => self.run_service_until_exit(new_light),