deeper chain node is built on top of Substrate v3.0.0 full node
Get the required compiler version and wasm component before compiling.
rustup install nightly-2021-03-11
rustup target add wasm32-unknown-unknown --toolchain nightly-2021-03-11
# fix environmental package bug if it happens
cargo update -p environmental
# thread_local 1.1.2 has a bug: "memory leak"
cargo update -p thread_local
# update libp2p-swarm from v0.27.1 to v0.27.2
cargo update -p libp2p-swarm
# compile
cargo build --release
Purge any existing dev chain state:
./target/release/deeper-chain purge-chain --dev
Start a dev chain:
./target/release/deeper-chain --dev
Or, start a dev chain with detailed logging:
RUST_LOG=debug RUST_BACKTRACE=1 ./target/release/deeper-chain -lruntime=debug --dev
If you want to see the multi-node consensus algorithm in action, refer to our Start a Private Network tutorial.
See this doc
- Build deeper-chain with
--features runtime-benchmarks
cd cli/
cargo build --release --features runtime-benchmarks
- Run shell command to update weights.rs
./target/release/deeper-chain benchmark \
--chain=dev \
--steps=50 \
--repeat=20 \
--pallet=pallet_staking \
--extrinsic=* \
--execution=wasm \
--wasm-execution=compiled \
--heap-pages=4096 \
--output=./pallets/staking/src/weights.rs \
--template=./.maintain/frame-weight-template.hbs