Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tutorials to latest monthly tag #607

Merged
merged 14 commits into from
Nov 30, 2021
81 changes: 39 additions & 42 deletions v3/tutorials/01-create-your-first-substrate-chain/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -184,19 +184,21 @@ To compile the Substrate Node Template:

1. Clone the node template repository using the version `latest` branch by running the following command:

```
git clone -b latest --depth 1 https://github.com/substrate-developer-hub/substrate-node-template
```bash
git clone https://github.com/substrate-developer-hub/substrate-node-template
# We want to use the `latest` tag throughout all of this tutorial
git checkout latest
```

1. Change to the root of the node template directory by running the following command:

```
```bash
cd substrate-node-template
```

1. Compile the node template by running the following command:

```
```bash
cargo build --release
```

Expand All @@ -213,7 +215,7 @@ To install the Front-end Template:

1. Check whether `node` is installed on your local computer by running the following command:

```
```bash
node --version
```

Expand All @@ -223,31 +225,33 @@ To install the Front-end Template:

1. Check whether `yarn` is installed on your local computer by running the following command:

```
```bash
yarn --version
```

If the command doesn’t return a version number, download and install `yarn` by running the following command:

```
```bash
npm install -g yarn
```

1. Clone the Front-end Template repository by running the following command:

```
git clone -b latest --depth 1 https://github.com/substrate-developer-hub/substrate-front-end-template
```bash
git clone https://github.com/substrate-developer-hub/substrate-front-end-template
# We want to use the `latest` tag throughout all of this tutorial
git checkout latest
```

1. Change to the root of the front-end template directory by running the following command:

```
```bash
cd substrate-front-end-template
```

1. Install the dependencies for the front-end template by running the following command:

```
```bash
yarn install
```

Expand All @@ -265,44 +269,39 @@ To start the local Substrate node:

1. Start the node in development mode by running the following command:

```
./target/release/node-template --dev --tmp
```bash
./target/release/node-template --dev
```

The `node-template` command-line options specify how you want the running node to operate.
In this case, the options specify the following:

- The `--dev` option specifies that the node is run as a developer node chain specification.

- The `--tmp` option specifies that the node will delete all active data—such as keys,
blockchain database, and networking information when you stop the node by pressing Control-c.
You can use `--tmp` option to ensure you have a clean working state any time you stop and
restart the node.
In this case, the `--dev` option specifies that the node runs in developer mode using the predefined `development` chain specification.
By default, this option also deletes all active data—such as keys, the blockchain database, and networking information when you stop the node by pressing Control-c.
Using the `--dev` option ensures that you have a clean working state any time you stop and restart the node.

1. Verify your node is up and running successfully by reviewing the output displayed in the terminal.

The terminal should display output similar to this:

```
2021-03-16 10:56:51 Running in --dev mode, RPC CORS has been disabled.
2021-03-16 10:56:51 Substrate Node
2021-03-16 10:56:51 ✌️ version 3.0.0-8370ddd-x86_64-linux-gnu
2021-03-16 10:56:51 ❤️ by Substrate DevHub <https://github.com/substrate-developer-hub>, 2017-2021
2021-03-16 10:56:51 📋 Chain specification: Development
2021-03-16 10:56:51 🏷 Node name: few-size-5380
2021-03-16 10:56:51 👤 Role: AUTHORITY
2021-03-16 10:56:51 💾 Database: RocksDb at /tmp/substrateP1jD7H/chains/dev/db
2021-03-16 10:56:51 ⛓ Native runtime: node-template-100 (node-template-1.tx1.au1)
2021-03-16 10:56:51 🔨 Initializing Genesis block/state (state: 0x17df…04a0, header-hash: 0xc43b…ed16)
2021-03-16 10:56:51 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.
2021-03-16 10:56:51 ⏱ Loaded block-time = 6000 milliseconds from genesis on first-launch
2021-03-16 10:56:51 Using default protocol ID "sup" because none is configured in the chain specs
2021-03-16 10:56:51 🏷 Local node identity is: 12D3KooWQdU84EJCqDr4aqfhb7dxXU2fzd6i2Rn1XdNtsiM5jvEC
2021-03-16 10:56:51 📦 Highest known block at #0
```text
2021-11-24 15:36:35 Running in --dev mode, RPC CORS has been disabled.
2021-11-24 15:36:35 Substrate Node
2021-11-24 15:36:35 ✌️ version 4.0.0-dev-82b7c2c-aarch64-macos
2021-11-24 15:36:35 ❤️ by Substrate DevHub <https://github.com/substrate-developer-hub>, 2017-2021
2021-11-24 15:36:35 📋 Chain specification: Development
2021-11-24 15:36:35 🏷 Node name: six-wash-9274
2021-11-24 15:36:35 👤 Role: AUTHORITY
2021-11-24 15:36:35 💾 Database: RocksDb at /tmp/substrateP1jD7H/chains/dev/db
2021-11-24 15:36:35 ⛓ Native runtime: node-template-100 (node-template-1.tx1.au1)
2021-11-24 15:36:35 🔨 Initializing Genesis block/state (state: 0xa59b…5331, header-hash: 0xc5d2…37f3)
2021-11-24 15:36:35 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.
2021-11-24 15:36:35 ⏱ Loaded block-time = 6s from block 0xc5d2fdad35e14684753f087c1a20f022274e154d39add4f7efe34e95476a37f3
2021-11-24 15:36:35 Using default protocol ID "sup" because none is configured in the chain specs
2021-11-24 15:36:35 🏷 Local node identity is: 12D3KooWG5niQF5bjsFao3D8DZRpUUB6uWZC2pK8hCDZ94zsr8Sc
2021-11-24 15:36:35 📦 Highest known block at #0
...
...
...
2021-03-16 10:56:56 💤 Idle (0 peers), best: #2 (0x05bd…de3f), finalized #0 (0xc43b…ed16), ⬇ 0 ⬆ 0
2021-11-24 15:36:40 💤 Idle (0 peers), best: #1 (0xd2b5…d03f), finalized #0 (0xc5d2…37f3), ⬇ 0 ⬆ 0
```

If the number after `finalized` is increasing, your blockchain is producing new blocks and reaching consensus about the state they describe.
Expand All @@ -324,7 +323,7 @@ To use the Front-end Template:

1. Start the Front-end template by running the following command:

```
```bash
yarn start
```

Expand Down Expand Up @@ -385,9 +384,7 @@ To transfer funds to an account:

After a successful transfer, you can continue to explore the front-end template components or
stop the local Substrate node the state changes you made.
With `--tmp` flag specified when running the Node Template, stopping the local node stops the
blockchain and purge all persistent block data that goes with it so you can start with a clean new
state next time you start again.
Because you specified the `--dev` option when you started the node, stopping the local node stops the blockchain and purges all persistent block data so that you can start with a clean state next time you start the node.

To stop the local Substrate node:

Expand Down
Loading