Skip to content

mainnet

This document outlines the steps to join an existing mainnet.

Prerequisites to read

Mainnet

You need to setup a genesis file and a seed node. If you need more information on past networks, check out our mainnet repo. The table below outlines all mainnet chain IDs. Note that the displayed version may differ when there is an active software upgrade proposal on-chain.

Chain ID describe Location Version state
daodst_7777-1 Daodst Mainnet 1 Daodst v1.0.0 active

⚠️ IMPORTANT: If you join mainnet as a validator, please make sure you follow all security recommendations!

Install daodst

Follow the installation documentation to install the program

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

Save Chain ID

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

📣 Tip : Please refer to the official chain ID for reference.

stcd config chain-id daodst_7777-1

Initialize node

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

stcd init <your_custom_moniker> --chain-id daodst_7777-1

⚠️Dangerous : Name objects can only contain ASCII characters. Using Unicode characters will make your node inaccessible.

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

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 & Seed Nodes

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.

wget https://github.com/daodst/mainnet/daodst_7777-1/genesis.json
mv genesis.json $install_path/.stcd/config/

Then verify the correctness of the genesis configuration file:

stcd validate-genesis

Add seed node

Your peers need to know how to find peers.

You need to add a healthy seed node to $install_path/.stcd/config/config.toml mainnet repository contains some links seed node.

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/mainnet/main/daodst_7777-1/seeds.txt | awk '{print $1}' | paste -s -d, -`
sed -i.bak -e "s/^seeds =.*/seeds = \"$SEEDS\"/" $install_path/.stcd/config/config.toml

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

Add persistent node

We can set persistent_peers Fields in $install_path/.stcd/config/config.toml specify the peers with which your node will maintain persistent connections. You can retrieve them from the list of available nodes in the mainnet repository.

You can grab 10 random entries from the peers.txt file for the PEERS variable by running:

PEERS=`curl -sL https://raw.githubusercontent.com/daodst/mainnet/main/daodst_7777-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 mainnet validator

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

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

🚨 DANGER: NEVER create validator keys using test as the keyring backend. Doing so may cause your funds to be accessed remotely via the eth_sendTransaction JSON-RPC endpoint, resulting in loss of funds.

Reference: Security Advisory: Insecurely configured geth can make funds remotely accessible

Start the mainnet

The last step is to start the node. Once enough voting power (+2/3) Starting from the genesis validator, nodes will start producing blocks.

stcd daemon

Share your node

You can share your peers and post them in the #find-peers channel on the Daodst Discord.

📣 Hint: 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.