git.delta.rocks / unique-network / refs/commits / ffed93cc57a0

difftreelog

Add end user documentation

Greg Zaitsev2020-05-06parent: #d16b1c1.patch.diff
in: master

4 files changed

modifiedREADME.mddiffbeforeafterboth
1# Substrate Node Template1# NFT Parachain
22
3A new Substrate node, ready for hacking. This node includes:3## Application Development
44
5* A FRAME-based runtime5If you are building an application that operates NFT tokens, use [this guide](doc/application_development.md).
6* A template pallet
7* Aura block authoring
8* Grandpa finality gadget
96
10## Build7## Building
118
12Install Rust:9Install Rust:
1310
14```bash11```bash
15curl https://sh.rustup.rs -sSf | sh12curl https://sh.rustup.rs -sSf | sh
13rustup default nightly
14sudo apt-get install libssl-dev pkg-config libclang-dev clang
15
16```16```
1717
18Initialize your Wasm Build environment:18Install required tools:
1919
20```bash20```bash
21./scripts/init.sh21./scripts/init.sh
22```22```
2323
24Build Wasm and native code:24Build the WebAssembly binary:
2525
26```bash26```bash
27cargo build --release27./scripts/build.sh
28```28```
2929
30## Run30Build all native code:
3131
32### Single Node Development Chain
33
34Purge any existing developer chain state:
35
36```bash32```bash
37./target/release/node-template purge-chain --dev33cargo build --release
38```34```
3935
40Start a development chain with:36## Run
4137
38You can start a development chain with:
39
42```bash40```bash
43./target/release/node-template --dev41cargo run -- --dev
44```42```
4543
46Detailed logs may be shown by running the node with the following environment variables set: `RUST_LOG=debug RUST_BACKTRACE=1 cargo run -- --dev`.44Detailed logs may be shown by running the node with the following environment variables set: `RUST_LOG=debug RUST_BACKTRACE=1 cargo run -- --dev`.
4745
48### Multi-Node Local Testnet46If you want to see the multi-node consensus algorithm in action locally, then you can create a local testnet with two validator nodes for Alice and Bob, who are the initial authorities of the genesis chain that have been endowed with testnet units. Give each node a name and expose them so they are listed on the Polkadot [telemetry site](https://telemetry.polkadot.io/#/Local%20Testnet). You'll need two terminal windows open.
4947
50If you want to see the multi-node consensus algorithm in action locally, then you can create a local testnet with two validator nodes for Alice and Bob, who are the initial authorities of the genesis chain that have been endowed with testnet units.48We'll start Alice's substrate node first on default TCP port 30333 with her chain database stored locally at `/tmp/alice`. The bootnode ID of her node is `QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN`, which is generated from the `--node-key` value that we specify below:
5149
52Optionally, give each node a name and expose them so they are listed on the Polkadot [telemetry site](https://telemetry.polkadot.io/#/Local%20Testnet).
53
54You'll need two terminal windows open.
55
56We'll start Alice's substrate node first on default TCP port 30333 with her chain database stored locally at `/tmp/alice`. The bootnode ID of her node is `QmRpheLN4JWdAnY7HGJfWFNbfkQCb6tFf4vvA6hgjMZKrR`, which is generated from the `--node-key` value that we specify below:
57
58```bash50```bash
59cargo run -- \51cargo run -- \
60 --base-path /tmp/alice \52 --base-path /tmp/alice \
70```bash62```bash
71cargo run -- \63cargo run -- \
72 --base-path /tmp/bob \64 --base-path /tmp/bob \
73 --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/QmRpheLN4JWdAnY7HGJfWFNbfkQCb6tFf4vvA6hgjMZKrR \65 --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN \
74 --chain=local \66 --chain=local \
75 --bob \67 --bob \
76 --port 30334 \68 --port 30334 \
77 --telemetry-url ws://telemetry.polkadot.io:1024 \69 --telemetry-url ws://telemetry.polkadot.io:1024 \
78 --validator70 --validator
79```
80
81Additional CLI usage options are available and may be shown by running `cargo run -- --help`.
82
83## Advanced: Generate Your Own Substrate Node Template
84
85A substrate node template is always based on a certain version of Substrate. You can inspect it by
86opening [Cargo.toml](Cargo.toml) and see the template referred to a specific Substrate commit(
87`rev` field), branch, or version.
88
89You can generate your own Substrate node-template based on a particular Substrate
90version/commit by running following commands:
91
92```bash
93# git clone from the main Substrate repo
94git clone https://github.com/paritytech/substrate.git
95cd substrate
96
97# Switch to a particular branch or commit of the Substrate repo your node-template based on
98git checkout <branch/tag/sha1>
99
100# Run the helper script to generate a node template.
101# This script compiles Substrate and takes a while to complete. It takes a relative file path
102# from the current dir. to output the compressed node template.
103.maintain/node-template-release.sh ../node-template.tar.gz
104```71```
10572
106Noted though you will likely get faster and more thorough support if you stick with the releases73Additional CLI usage options are available and may be shown by running `cargo run -- --help`.
107provided in this repository.
108
addeddoc/application_development.mddiffbeforeafterboth

no changes

addeddoc/server_architecture.pngdiffbeforeafterboth

binary blob — no preview

addeddoc/serverless_architecture.pngdiffbeforeafterboth

binary blob — no preview