Skip to content
Snippets Groups Projects
Commit 1e263062 authored by Éloïs's avatar Éloïs
Browse files

doc(README): precise how to launch local testnet

parent 55e150a7
Branches
Tags
No related merge requests found
...@@ -71,6 +71,42 @@ CAUTION: In order for **Polkadot-JS Apps** to be able to fully understand the in ...@@ -71,6 +71,42 @@ CAUTION: In order for **Polkadot-JS Apps** to be able to fully understand the in
If you want to see the multi-node consensus algorithm in action, refer to If you want to see the multi-node consensus algorithm in action, refer to
[our Start a Private Network tutorial](https://substrate.dev/docs/en/tutorials/start-a-private-network/). [our Start a Private Network tutorial](https://substrate.dev/docs/en/tutorials/start-a-private-network/).
### Purge previous lacal testnet
```
./target/release/lc-core purge-chain --base-path /tmp/alice --chain local
./target/release/lc-core purge-chain --base-path /tmp/bob --chain local
```
### Start Alice's node
```bash
./target/release/lc-core \
--base-path /tmp/alice \
--chain local \
--alice \
--port 30333 \
--ws-port 9945 \
--rpc-port 9933 \
--node-key 0000000000000000000000000000000000000000000000000000000000000001 \
--validator
```
### Start Bob's node
```bash
./target/release/lc-core \
--base-path /tmp/bob \
--chain local \
--bob \
--port 30334 \
--ws-port 9946 \
--rpc-port 9934 \
--validator \
--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp
```
## Project Structure ## Project Structure
A Substrate project such as this consists of a number of components that are spread across a few A Substrate project such as this consists of a number of components that are spread across a few
...@@ -96,7 +132,7 @@ There are several files in the `node` directory - take special note of the follo ...@@ -96,7 +132,7 @@ There are several files in the `node` directory - take special note of the follo
[chain specification](https://substrate.dev/docs/en/knowledgebase/integrate/chain-spec) is a [chain specification](https://substrate.dev/docs/en/knowledgebase/integrate/chain-spec) is a
source code file that defines a Substrate chain's initial (genesis) state. Chain specifications source code file that defines a Substrate chain's initial (genesis) state. Chain specifications
are useful for development and testing, and critical when architecting the launch of a are useful for development and testing, and critical when architecting the launch of a
production chain. Take note of the `development_config` and `testnet_genesis` functions, which production chain. Take note of the `development_chain_spec` and `testnet_genesis` functions, which
are used to define the genesis state for the local development chain configuration. These are used to define the genesis state for the local development chain configuration. These
functions identify some functions identify some
[well-known accounts](https://substrate.dev/docs/en/knowledgebase/integrate/subkey#well-known-keys) [well-known accounts](https://substrate.dev/docs/en/knowledgebase/integrate/subkey#well-known-keys)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment