Git Product home page Git Product logo

chain-spec-staging's Introduction

substrate-stencil

A template for kick starting a Rust and Blockchain project using Substrate.

Features

This template includes the minimum required components to start a PoS testnet, inspired by 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.

Build and Run

Use the following command to build the node and run it after build successfully:

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 > ryan-staging.json
  • Change original spec to encoded raw spec, ./target/release/substrate-stencil build-spec --chain=ryan-staging.json --raw > ryan-staging-raw.json
  • Start your bootnodes, node key can be generate with command ./target/release/substrate-stencil key generate-node-key.
    ./target/release/substrate-stencil \
         --node-key <your-node-key> \
         --base-path /tmp/bootnode1 \
         --chain ryan-staging-raw.json \
         --name bootnode1
  • Start your initial validators,
    ./target/release/substrate-stencil \
        --base-path  /tmp/validator1 \
        --chain   ryan-staging-raw.json \
        --bootnodes  /ip4/<your-bootnode-ip>/tcp/30333/p2p/<your-bootnode-peerid> \
          --port 30336 \
          --ws-port 9947 \
          --rpc-port 9936 \
        --name  validator1 \
        --validator
  • Insert session keys
  • 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

chain-spec-staging's People

Contributors

kaichaosun avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.