laconicd/docs/testnet/join.md
Federico Kunze Küllmer ea3ec3b7c6
docs: testnet (#458)
* testnet docs

* more changes

* testnet and validators
2021-08-19 10:23:33 +00:00

3.2 KiB

Joining a Testnet

This document outlines the steps to join an existing testnet {synopsis}

Install ethermintd

Follow the installation document to install the Ethermint binary ethermintd.

:::warning Make sure you have the right version of ethermintd installed :::

Initialize Node

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

ethermintd init <your_custom_moniker>

::: danger Monikers can contain only ASCII characters. Using Unicode characters will render your node unreachable. :::

By default, the init command creates your ~/.ethermintd 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 file from the testnets repository and copy it over to the config directory: ~/.ethermintd/config/genesis.json.

Then verify the correctness of the genesis configuration file:

ethermintd validate-genesis

Add Seed Nodes

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

Edit the file located in ~/.ethermintd/config/config.toml and the seeds to the following:

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

# ...

# Comma separated list of seed nodes to connect to
seeds = ""

:::tip For more information on seeds and peers, you can the Tendermint P2P documentation. :::

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.

ethermintd start

Upgrading Your Node

NOTE: These instructions are for full nodes that have ran on previous versions of and would like to upgrade to the latest testnet.

Reset Data

:::warning If the version <new_version> you are upgrading to is not breaking from the previous one, you should not reset the data. If this is the case you can skip to Restart :::

First, remove the outdated files and reset the data.

rm $HOME/.ethermintd/config/addrbook.json $HOME/.ethermintd/config/genesis.json
ethermintd unsafe-reset-all

Your node is now in a pristine state while keeping the original priv_validator.json and config.toml. If you had any sentry nodes or full nodes setup before, your node will still try to connect to them, but may fail if they haven't also been upgraded.

::: danger Warning Make sure that every node has a unique priv_validator.json. Do not copy the priv_validator.json from an old node 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:

ethermintd start