From a20db311658675383252705b88b6213714d4500f Mon Sep 17 00:00:00 2001 From: Dan Forbes Date: Tue, 28 Jul 2020 11:33:53 -0700 Subject: [PATCH] Remove unused node template deps (#6748) * Remove unused node template deps Backport changes made by @c410-f3r https://github.com/substrate-developer-hub/substrate-node-template/pull/66 * Enhancements to README * Revert change to serde per @thiolliere --- substrate/Cargo.lock | 5 ----- substrate/bin/node-template/README.md | 14 ++++++++++---- substrate/bin/node-template/node/Cargo.toml | 4 ---- substrate/bin/node-template/runtime/Cargo.toml | 2 -- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/substrate/Cargo.lock b/substrate/Cargo.lock index 2ce99bfbbf..069a4ea1a8 100644 --- a/substrate/Cargo.lock +++ b/substrate/Cargo.lock @@ -3826,10 +3826,7 @@ dependencies = [ name = "node-template" version = "2.0.0-rc5" dependencies = [ - "futures 0.3.5", - "log", "node-template-runtime", - "parking_lot 0.10.2", "sc-basic-authorship", "sc-cli", "sc-client-api", @@ -3837,7 +3834,6 @@ dependencies = [ "sc-consensus-aura", "sc-executor", "sc-finality-grandpa", - "sc-network", "sc-service", "sc-transaction-pool", "sp-consensus", @@ -3873,7 +3869,6 @@ dependencies = [ "sp-consensus-aura", "sp-core", "sp-inherents", - "sp-io", "sp-offchain", "sp-runtime", "sp-session", diff --git a/substrate/bin/node-template/README.md b/substrate/bin/node-template/README.md index ad514617ee..5623fedb53 100644 --- a/substrate/bin/node-template/README.md +++ b/substrate/bin/node-template/README.md @@ -108,7 +108,8 @@ Substrate-based blockchain nodes expose a number of capabilities: - Consensus: Blockchains must have a way to come to [consensus](https://substrate.dev/docs/en/knowledgebase/advanced/consensus) on the state of the network. Substrate makes it possible to supply custom consensus engines and also ships with - several consensus mechanisms that have been built on top of Web3 Foundation research. + several consensus mechanisms that have been built on top of + [Web3 Foundation research](https://research.web3.foundation/en/latest/polkadot/NPoS/index.html). - RPC Server: A remote procedure call (RPC) server is used to interact with Substrate nodes. There are several files in the `node` directory - take special note of the following: @@ -140,12 +141,17 @@ capabilities and configuration parameters that it exposes: ### Runtime -The Substrate project in this repository uses the -[FRAME](https://substrate.dev/docs/en/knowledgebase/runtime/frame) framework to construct a +In Substrate, the terms +"[runtime](https://substrate.dev/docs/en/knowledgebase/getting-started/glossary#runtime)" and +"[state transition function](https://substrate.dev/docs/en/knowledgebase/getting-started/glossary#stf-state-transition-function)" +are analogous - they refer to the core logic of the blockchain that is responsible for validating +blocks and executing the state changes they define. The Substrate project in this repository uses +the [FRAME](https://substrate.dev/docs/en/knowledgebase/runtime/frame) framework to construct a blockchain runtime. FRAME allows runtime developers to declare domain-specific logic in modules called "pallets". At the heart of FRAME is a helpful [macro language](https://substrate.dev/docs/en/knowledgebase/runtime/macros) that makes it easy to -create pallets and flexibly compose them to create blockchains that can address a variety of needs. +create pallets and flexibly compose them to create blockchains that can address +[a variety of needs](https://www.substrate.io/substrate-users/). Review the [FRAME runtime implementation](./runtime/src/lib.rs) included in this template and note the following: diff --git a/substrate/bin/node-template/node/Cargo.toml b/substrate/bin/node-template/node/Cargo.toml index cd4007a883..82c2d7ad43 100644 --- a/substrate/bin/node-template/node/Cargo.toml +++ b/substrate/bin/node-template/node/Cargo.toml @@ -16,10 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] name = "node-template" [dependencies] -futures = "0.3.4" -log = "0.4.8" structopt = "0.3.8" -parking_lot = "0.10.0" sc-cli = { version = "0.8.0-rc5", path = "../../../client/cli", features = ["wasmtime"] } sp-core = { version = "2.0.0-rc5", path = "../../../primitives/core" } @@ -28,7 +25,6 @@ sc-service = { version = "0.8.0-rc5", path = "../../../client/service", features sp-inherents = { version = "2.0.0-rc5", path = "../../../primitives/inherents" } sc-transaction-pool = { version = "2.0.0-rc5", path = "../../../client/transaction-pool" } sp-transaction-pool = { version = "2.0.0-rc5", path = "../../../primitives/transaction-pool" } -sc-network = { version = "0.8.0-rc5", path = "../../../client/network" } sc-consensus-aura = { version = "0.8.0-rc5", path = "../../../client/consensus/aura" } sp-consensus-aura = { version = "0.8.0-rc5", path = "../../../primitives/consensus/aura" } sp-consensus = { version = "0.8.0-rc5", path = "../../../primitives/consensus/common" } diff --git a/substrate/bin/node-template/runtime/Cargo.toml b/substrate/bin/node-template/runtime/Cargo.toml index 71b68dfc2f..088a132411 100644 --- a/substrate/bin/node-template/runtime/Cargo.toml +++ b/substrate/bin/node-template/runtime/Cargo.toml @@ -29,7 +29,6 @@ sp-block-builder = { path = "../../../primitives/block-builder", default-feature sp-consensus-aura = { version = "0.8.0-rc5", default-features = false, path = "../../../primitives/consensus/aura" } sp-core = { version = "2.0.0-rc5", default-features = false, path = "../../../primitives/core" } sp-inherents = { path = "../../../primitives/inherents", default-features = false, version = "2.0.0-rc5"} -sp-io = { version = "2.0.0-rc5", default-features = false, path = "../../../primitives/io" } sp-offchain = { version = "2.0.0-rc5", default-features = false, path = "../../../primitives/offchain" } sp-runtime = { version = "2.0.0-rc5", default-features = false, path = "../../../primitives/runtime" } sp-session = { version = "2.0.0-rc5", default-features = false, path = "../../../primitives/session" } @@ -58,7 +57,6 @@ std = [ "sp-consensus-aura/std", "sp-core/std", "sp-inherents/std", - "sp-io/std", "sp-offchain/std", "sp-runtime/std", "sp-session/std",