4.0 KiB
Gen6 Public Blockchain
A customized blockchain built using Substrate, designed to operate independently without relying on a relay chain, but keeping interoperability features.
Technical Info
Name: Gen6 Public Chain
Internal ID: g6-solo-chain/107
G6 SS58 Prefix: 355
SS58 Converter to G6 addresses: ss58.org
Gen6 WSS API: wss://gen6.app:443/node
Default CHAIN_PORT: 9944
Default RPC_PORT: 30301
Explorer: PJS Link
Wallets supported: SubWallet, PolkadotJS
Whitepaper: Gitbook
Getting Started with Building
Ensure all necessary dependencies are installed according to your platform’s Substrate installation guide.
Build
Use the following command to build the node without launching it:
cargo build --release
Single-Node Development Chain
The following command starts a single-node development chain that doesn't persist state:
./target/release/g6-solo-node --dev
To purge the development chain's state, run the following command:
./target/release/g6-solo-node purge-chain --dev
To start the development chain with detailed logging, run the following command:
RUST_BACKTRACE=1 ./target/release/g6-solo-node -ldebug --dev
Run with docker
You need to have docker installed on your system
Build
docker compose -f ./docker_g6/compose_files/solo_chain/builder/docker-compose.yml up
Run
docker compose -f ./docker_g6/compose_files/solo_chain/runner/docker-compose.yml up
Run the live chain
- build the chain
- create and insert keys with the generate_validator_keys.sh from the Scripts project You will have your secrets in a data folder. There are secrets inside which you should NOT share with anybody.
data
├── aura-sr25519.json
├── chains
│ └── gen6
│ ├── keystore
│ │ ├── 617572617c659be616ee6da553529e8e11081935a09dfd70a2556a972cd32822f916383a
│ │ └── 6772616ed81dd22ce966b9e77060292166f0904a126bd5d8b54db67f7476b0529ce2388b
│ └── network
│ └── secret_ed25519
├── grandpa-ed25519.json
├── node-key-ed25519.json
└── peer-id.txt
Run the blockchain
$SOLO_CHAIN_NODE_EXECUTABLE \
--base-path "$BASE_PATH" \
--chain "$RAW_CHAINSPEC_FILENAME" \
--port "$CHAIN_PORT" \
--rpc-port "$RPC_PORT" \
--validator \
--name "$NODE_NAME"
BASE_PATH = the path to the data folder we created with the generate script. SOLO_CHAIN_NODE_EXECUTABLE = the path to the node executable E.g. <solo_chain_project>/target/release/g6-solo-node RAW_CHAINSPEC_FILENAME = the raw chainspec. The live raw chainspec is stored in this project CHAIN_PORT=9944 RPC_PORT=30301 NODE_NAME= any unique name
Key generation
./target/release/g6-solo-node key generate --output-type json
Example output
{
"accountId": "0x9e6a8d5406599378f39784cb2f31f8a848d4605177da43d9e1227026a970e51c",
"networkId": "substrate",
"publicKey": "0x9e6a8d5406599378f39784cb2f31f8a848d4605177da43d9e1227026a970e51c",
"secretPhrase": "idle grid torch reflect acid cost whip verify song humble raw lion",
"secretSeed": "0xcd517bc718b16711d41182d98945867ee3eaf65b6dedfaaa1995efc1d5808073",
"ss58Address": "5FeR5LJ8jR6SRXeKXFEn61H2ztWxTw4Vvpz9vRrVdhcpuvKk",
"ss58PublicKey": "5FeR5LJ8jR6SRXeKXFEn61H2ztWxTw4Vvpz9vRrVdhcpuvKk"
}
Substrate supports different key types (e.g., sr25519, ed25519, or ecdsa). You can specify the key type using the --scheme flag
./target/release/g6-solo-node key generate --scheme sr25519 --output-type json
Generate Keys for a Specific Network
./target/release/g6-solo-node key generate --network polkadot
Help Command for Details: To explore all available options, use the --help flag:
./target/release/g6-solo-node key --help