This repository was archived by the owner on Nov 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +31
-1
lines changed
Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Original file line number Diff line number Diff line change 5555
5656### Single-Node Development Chain
5757
58- This command will start the single-node development chain with persistent state:
58+ This command will start the single-node development chain with non- persistent state:
5959
6060``` bash
6161./target/release/node-template --dev
@@ -72,6 +72,36 @@ Start the development chain with detailed logging:
7272``` bash
7373RUST_BACKTRACE=1 ./target/release/node-template -ldebug --dev
7474```
75+ > Development chain means that the state of our chain will be in a tmp folder while the nodes are
76+ > running. Also, ** alice** account will be authority and sudo account as declared in the [ genesis
77+ > state] ( https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/chain_spec.rs#L49 ) .
78+ > At the same time the following accounts will be prefunded:
79+ > - Alice
80+ > - Bob
81+ > - Alice//stash
82+ > - Bob//stash
83+
84+ In case of being interested in maintaining the chain' state futher in time a base path other than
85+ a temporary directory must be added so the db can be stored in the provided folder. We could use
86+ this folder to store different chain databases, as a different folder will be created per different
87+ chain that is ran. The following commands shows how to use a newly created folder as our db base
88+ path.
89+
90+ ``` bash
91+ // Create a folder to use as the db base path
92+ $ mkdir my-chain-state
93+
94+ // Use of that folder to store the chain state
95+ $ ./target/release/node-template --dev --base-path ./my-chain-state/
96+
97+ // Check the folder structure created inside the base path after running the chain
98+ $ ls ./my-chain-state
99+ chains
100+ $ ls ./my-chain-state/chains/
101+ dev
102+ $ ls ./my-chain-state/chains/dev
103+ db keystore network
104+ ```
75105
76106### Connect with Polkadot-JS Apps Front-end
77107
You can’t perform that action at this time.
0 commit comments