Skip to content

Latest commit

 

History

History
124 lines (80 loc) · 3.74 KB

join-mainnet.md

File metadata and controls

124 lines (80 loc) · 3.74 KB

Join the mainnet

::: tip See the launch for information on the mainnet, including the correct version of the Cosmos-SDK to use and details about the genesis file. :::

::: warning You need to install gaia before you go further :::

Setting Up a New Node

These instructions are for setting up a brand new full node from scratch.

First, initialize the node and create the necessary config files:

gaiad init <your_custom_moniker>

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

You can edit this moniker later, in the ~/.gaiad/config/config.toml file:

# A custom human readable name for this node
moniker = "<your_custom_moniker>"

You can edit the ~/.gaiad/config/gaiad.toml file in order to enable the anti spam mechanism and reject incoming transactions with less than the minimum gas prices:

# This is a TOML config file.
# For more information, see https://github.com/toml-lang/toml

##### main base config options #####

# The minimum gas prices a validator is willing to accept for processing a
# transaction. A transaction's fees must meet the minimum of any denomination
# specified in this config (e.g. 10uatom).

minimum-gas-prices = ""

Your full node has been initialized!

Genesis & Seeds

Copy the Genesis File

Fetch the testnet's genesis.json file into gaiad's config directory.

mkdir -p $HOME/.gaiad/config
curl https://raw.githubusercontent.com/cosmos/launch/master/latest/genesis.json > $HOME/.gaiad/config/genesis.json

Note we use the latest directory in the launch repo which contains details for the mainnet like the latest version and the genesis file.

::: tip If you want to connect to the public testnet instead, click here :::

To verify the correctness of the configuration run:

gaiad start

Add Seed Nodes

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

If those seeds aren't working, you can find more seeds and persistent peers on a Cosmos Hub explorer (a list can be found on the launch page).

You can also ask for peers on the Validators Riot Room

For more information on seeds and peers, you can read this.

Run a Full Node

Start the full node with this command:

gaiad start

Check that everything is running smoothly:

gaiacli status

View the status of the network with the Cosmos Explorer.

Export State

Gaia can dump the entire application state to a JSON file, which could be useful for manual analysis and can also be used as the genesis file of a new network.

Export state with:

gaiad export > [filename].json

You can also export state from a particular height (at the end of processing the block of that height):

gaiad export --height [height] > [filename].json

If you plan to start a new network from the exported state, export with the --for-zero-height flag:

gaiad export --height [height] --for-zero-height > [filename].json

Upgrade to Validator Node

You now have an active full node. What's the next step? You can upgrade your full node to become a Cosmos Validator. The top 100 validators have the ability to propose new blocks to the Cosmos Hub. Continue onto the Validator Setup.