Self Chain Testnet

Find out more about the Self Chain Testnet.
Set up a Self Chain validator node.

Why does Self Chain need a Testnet?

Testnet is a part of our development process. Initially, new features are deployed to Self Chain internal devnet. Later on, they‘re moved to testnet, where we can battle-test different solutions together with our community.

Early Access

Get an exclusive look at what's happening behind the scenes. Be the first to know about new features!

Safe For Mainnet

Allows testers and application developers to test the new features and functionalities of a protocol in a different environment without having to worry about breaking the main blockchain.

Node Runners and Validators

By setting up a Node or a Validator on Testnet, they can practice as much as they want and minimize the mistakes that can lead to financial damage.

Resources
Staking App on Testnet
Full node and Validator Setup Guides

How to set up a Node?

Installation

Download the latest binary file .
Add the binary file to the system path.
Open a new terminal window to verify you can run:

selfchaind --help

Node initialization

The init command creates the ~/.selfchain directory with subfolders config and data.


# Create an env variable that points to the HOME location
export $SELF_CHAIN_HOME=~/.selfchain

# Moniker will be the name of the validator and it will be displayed on the blockchain explorer
selfchaind init 

# Or if you want a custom location
selfchaind init  --home $SELF_CHAIN_HOME

General Configuration

Download the Genesis file.


wget -O $SELF_CHAIN_HOME/config/genesis.json https://raw.githubusercontent.com/hotcrosscom/selfchain-genesis/main/networks/devnet/genesis.json

Config the seeds and peers values. You can find these values for the devnet network here .


Open the $SELF_CHAIN_HOME/config/config.toml and update seeds and persistent_peers using the values from the remote repository.

Create and add the operation keys.


# Create the operation key, and enter the strong password when prompted 
selfchaind keys --home $SELF_CHAIN_HOME --keyring-backend file --keyring-dir keys add  
    
# Add the key to keys folder, recover the key from mnemonic key
selfchaind keys add   --recover  --keyring-backend file --keyring-dir $SELF_CHAIN_HOME/keys

Config demon, minimum gas, and chain ID.


# Note you can also manually open these files and update the corresponding values 
sed -Ei '' 's/([0-9]+)stake/\1uself/g' $SELF_CHAIN_HOME/config/app.toml
sed -i  '' 's/"uatom"/"uself"/g' $SELF_CHAIN_HOME/config/app.toml
sed -Ei '' 's/^chain-id = .*$/chain-id = "self-dev-1"/g' $SELF_CHAIN_HOME/config/client.toml

For other configurations such as Ledger Pruning, API, gRPC, and Sync Options, visit Node Setup Guide for more information. Keeping those configurations to default is fine.

Start the Node

Wait for the node to sync, and monitor the log to follow the process.


# nohup will run the command in the background and will emit the logs to the local selfchain.out file
nohup selfchaind start --x-crisis-skip-assert-invariants --home $SELF_CHAIN_HOME >> selfchain.out 2>&1 &

# To view the logs
tail -f selfchain.out

Check the node status
Verify latest_block_height is the same as Self Chain Explorer , and then your node is synced. Now, you can create a new validator with it.


# To check node status
selfchaind status