Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coretime-dev/substrate-stencil
A template for kick starting a Substrate based PoS chain.
https://github.com/coretime-dev/substrate-stencil
Last synced: 3 months ago
JSON representation
A template for kick starting a Substrate based PoS chain.
- Host: GitHub
- URL: https://github.com/coretime-dev/substrate-stencil
- Owner: coretime-dev
- License: apache-2.0
- Created: 2020-07-01T02:40:48.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-06-07T10:11:59.000Z (over 1 year ago)
- Last Synced: 2024-07-07T04:30:03.468Z (4 months ago)
- Language: Rust
- Homepage:
- Size: 1.98 MB
- Stars: 65
- Watchers: 6
- Forks: 32
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-substrate - `substrate-stencil` - A template for a Substrate node that includes staking and governance capabilities. (Templates)
README
substrate-stencil
A template for kick starting a Rust and Blockchain project using Substrate.
Docs
|
Chat
## Features
This template includes the minimum required components to start a PoS testnet, inspired by [substrate-node-template](https://github.com/substrate-developer-hub/substrate-node-template).
* Consensus related pallets: Babe & GRANDPA
* Staking related pallets: staking, session, authorship, im-online, offences, utility
* Governance related pallets: collective, membership, elections-phragmen, democracy, treasure**Notes:** The code is un-audited and not production ready, use it at your own risk.
## Getting Started
Follow the steps below to get started.
### Rust Setup
First, complete the [Dev Docs Installation](https://docs.substrate.io/v3/getting-started/installation/).
### Build and Run
Use the following command to build the node and run it after build successfully:
```sh
cargo build --release
./target/release/substrate-stencil --dev
```## Run public testnet
* Modify the genesis config in chain_spec.rs
* Build spec, `./target/release/substrate-stencil build-spec --chain staging > stencil-staging.json`
* Change original spec to encoded raw spec, `./target/release/substrate-stencil build-spec --chain=stencil-staging.json --raw > stencil-staging-raw.json`
* Start your bootnodes, node key can be generate with command `./target/release/substrate-stencil key generate-node-key`.
```shell
./target/release/substrate-stencil \
--node-key \
--base-path /tmp/bootnode1 \
--chain stencil-staging-raw.json \
--name bootnode1
```
* Start your initial validators,
```shell
./target/release/substrate-stencil \
--base-path /tmp/validator1 \
--chain stencil-staging-raw.json \
--bootnodes /ip4//tcp/30333/p2p/ \
--port 30336 \
--ws-port 9947 \
--rpc-port 9936 \
--name validator1 \
--validator
```
* [Insert session keys](https://substrate.dev/docs/en/tutorials/start-a-private-network/customchain#add-keys-to-keystore)
* Attract enough validators from community in waiting
* Call force_new_era in staking pallet with sudo, rotate to PoS validators
* Enable governance, and remove sudo
* Enable transfer and other functions