Skip to content

testnet

This document outlines the steps to join an existing testnet.

Select a testnet

You can specify the network to join by setting genesis file and seed node.

Testnet Chain ID Description Location Version Status
daodst_7000-1 daodst Testnet Arsia Mons v0.1.x active

Install stcd

Follow the installation documentation to install program.

⚠️ Note : Make sure you have the correct version of Program installed.

Save Chain ID

We recommend saving the testnet chain-id to your client.toml. This will save you from having to manually pass the chain-id flag for every CLI command.

📣 Tips: See the official chain IDs for reference.

stcd config chain-id daodst_7000-1

Initialize node

📣 Tip: $install_path is used to indicate the path where you installed the stcd binary

We need to initialize the node to create all necessary validators and node configuration files:

stcd init <your_custom_moniker> --chain-id daodst_7000-4

⚠️ Note : A moniker can only contain ASCII characters. Using Unicode characters will make your node inaccessible.

By default, the init command creates the $install_path/.stcd (ie $HOME) directory with subfolders config/ and data/. In the config directory, the most important configuration files are app.toml and config.toml.

Genesis & Seeds

Copy the genesis file

Download the genesis.json file from github and copy it to the config directory: $install_path/.stcd/config/genesis.json. This is a genesis file that contains the chain ID and the balance of the genesis account.

sudo apt install -y unzip wget
wget -P $install_path/.stcd/config https://github.com/daodst/testnets/daodst_7000-1/genesis.json

Then verify the correctness of the genesis configuration file:

stcd validate-genesis

seeds

Your peers need to know how to find peers. You need to add a healthy seed node to $HOME/.stcd/config/config.toml . The testnets repository contains pointers to some seed nodes.

Edit the files located in $install_path/.stcd/config/config.toml and seeds to the following:

#################################################### #####
### P2P Configuration Options ###
#################################################### #####
[p2p]

#...

# Comma separated list of seed nodes to connect to
seeds = "<node-id>@<ip>:<p2p port>"

You can fetch a seed from the repository and add it to your config with the following code:

SEEDS=`curl -sL https://raw.githubusercontent.com/daodst/testnets/main/daodst_7000-1/seeds.txt | awk '{print $1}' | paste -s -d, -`
sed -i.bak -e "s/^seeds =.*/seeds = \"$SEEDS\"/" ~/.stcd/config/config.toml

📣 Tips: For more information on torrents and peers, you can visit the Tendermint P2P Documentation.

persistent_peers

We can set [persistent_peers] in $install_path/.stcd/config/config.toml(https://docs.tendermint.com/v0.34/tendermint-core/using-tendermint.html#persistent- peer) field. to specify the peers with which your node will maintain persistent connections. You can retrieve them from the list of available peers in the testnets repository.

You can get 10 random entries from peers.txt by adding the file to the PEERS variable by running:

PEERS=`curl -sL https://raw.githubusercontent.com/daodst/testnets/main/daodst_7000-1/peers.txt | sort -R | head -n 10 | awk '{print $1}' | paste -s -d, -`

Use sed to include them into the configuration. You can also add them manually:

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $install_path/.stcd/config/config.toml

Run the testnet validator

Declare your testnet on faucet using your validator account address and submit your validator account address:

📣 Tips: For more details on how to run the validator, please follow these instructions.

stcd tx staking create-validator \
   --amount=1000000000000dst \
   --pubkey=$(stcd tendermint show-validator) \
   --moniker="Daodst1" \
   --chain-id=<chain_id> \
   --commission-rate="0.10" \
   --commission-max-rate="0.20" \
   --commission-max-change-rate="0.01" \
   --min-self-delegation="1000000" \
   --gas="auto" \
   --gas-prices="5000000000dst" \
   --from=<key_name>

Start the testnet

The last step is to start the node. Once enough voting power (+2/3) from genesis validators is up and running, the testnet will start producing blocks.

stcd daemon

Upgrade your node

📣 Tip : These instructions are for full nodes who are already running on a previous version and want to upgrade to the latest testnet version.

📣 Tip: $install_path is used to indicate the path where you installed the stcd binary

Reset Data

⚠️ Note : If the version you are upgrading to does not conflict with the previous version, you should not reset the data. If this is the case, you can skip to Restart

First, delete obsolete files and reset data.

rm $install_path/.stcd/config/addrbook.json $install_path/.stcd/config/genesis.json
stcd tendermint unsafe-reset-all --home $install_path/.stcd

Your node is now in pristine state, while keeping the original priv_validator.json and config.toml. If you previously set up any sentinel nodes or full nodes, your nodes will still attempt to connect to them, but may fail if they have not been upgraded.

⚠️ Note : Make sure each node has a unique priv_validator.json. Do not copy priv_validator.json from old nodes to multiple new nodes. Running two nodes with the same priv_validator.json will cause you to double sign.

restart

To restart your node, just type:

stcd daemon

Share your node information

You can share your companions on the Internet and publish them.

📣 Tips: To get your node ID, use

stcd tendermint show-node-id

State synchronization node

If you want to join the network using state-sync (fast, but not for archive nodes), check out our state-sync page