Add Matchain Network

Pick a Testnet

You specify the network you want to join by setting the genesis file and seeds. If you need more information about past networks, check our testnets repo.

Testnet Chain IDDescriptionSiteVersionStatus

match_698-0

match_698-0 Testnet

todo

todo

Live

Server Timezone Configuration

Make sure your server timezone configuration is UTC. To know what is your current timezone, run the timedatectl command.

Initialize Node

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

matchd init <your_custom_moniker> --chain-id match_698-0

By default, the init command creates your ~/.matchd (i.e $HOME) directory with subfolders config/ and data/. In the config directory, the most important files for configuration are app.toml and config.toml.

Genesis & Seeds

Copy the Genesis File

Check the genesis.json file from the archive and copy it over to the config directory: ~/.matchd/config/genesis.json. This is a genesis file with the chain-id and genesis accounts balances.

sudo apt install -y unzip wget
wget -P ~/.matchd/config https://snapshot.matchain.io/match_698-0/genesis.json

Then verify the correctness of the genesis configuration file:

matchd validate-genesis

Add Seed Nodes

Your node needs to know how to find peers. You'll need to add healthy seed nodes to $HOME/.matchd/config/config.toml. The testnets repo contains links to some seed nodes.

Edit the file located in ~/.matchd/config/config.toml and the 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 use the following code to get seeds from the repo and add it to your config:

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

Add Persistent Peers

We can set the persistent_peers field in ~/.matchd/config/config.toml to specify peers that your node will maintain persistent connections with. You can retrieve them from the list of available peers on the testnets repo.

You can get a random 10 entries from the peers.txt file in the PEERS variable by running the following command:

PEERS=`curl -sL https://raw.githubusercontent.com/matchain/testnet/main/match_698-0/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\"/" ~/.matchd/config/config.toml

Run a Testnet Validator

Claim your testnet tMatch on the faucet using your validator account address and submit your validator account address:

TIP

For more details on how to run your validator, follow these instructions.

matchd tx staking create-validator \
  --amount=1000000000000atmatch \
  --pubkey=$(matchd tendermint show-validator) \
  --moniker="MatchWhale" \
  --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="0.025atmatch" \
  --from=<key_name>

Start testnet

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

matchd start

Last updated