Skip to main content

Setting Up a New Node

These instructions are for setting up a brand new full node from scratch. If you haven't installed the gitopiad application, follow the instructions here.

First, choose a "moniker" - a readable name for your validator. In this guide, we'll use moniker-from-the-guide, but you should replace that with your own for the following instructions.

caution

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

GITOPIA_MONIKER="moniker-from-the-guide"

Then initialize the node and create the necessary config files:

gitopiad init --chain-id "$GITOPIA_CHAIN_ID" "$GITOPIA_MONIKER"

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

# A custom human readable name for this node
moniker = "moniker-from-the-guide"
info

The current chain id is "gitopia".

From here on, your node can be configured in a number of different places.

  • ~/.gitopia/config/app.toml - cosmos-specific configuration
  • ~/.gitopia/config/config.toml - tendermint-specific configuration
  • environment variables and command-line options can override settings in the above configuration files.

Some common settings are described below.


Gas Prices

Your full-node keeps unconfirmed transactions in its mempool. In order to protect it from spam, it is better to set a minimum-gas-prices that the transaction must meet in order to be accepted in your node's mempool. This parameter can be set in ~/.gitopia/config/app.toml.

The initial recommended min-gas-prices is 0.001ulore, but you might want to change it later.

# 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 = "0.001ulore"

Genesis & Seeds

Next, we need to configure the p2p network and ensure that you have the right genesis.json file to join the testnet.


Copy the Genesis File

Copy the gitopia-janus-testnet-2's genesis.json file into gitopiad's config directory ($HOME/.gitopia/config/genesis.json).

wget https://server.gitopia.com/raw/gitopia/testnets/master/gitopia-janus-testnet-2/genesis.json.gz
gunzip genesis.json.gz
mv genesis.json $HOME/.gitopia/config/genesis.json

Make sure you have the correct genesis file.

sha256sum $HOME/.gitopia/config/genesis.json
038a81d821f3d8f99e782cbfed609e4853d24843c48a1469287528e632a26162

To verify the correctness of the configuration run:

gitopiad validate-genesis

Add Seed Nodes

Your node needs to know how to find peers. You'll need to add healthy seed nodes or persistent peers to $HOME/.gitopia/config/config.toml.

Seed Nodes

macOS

sed -i '' 's#seeds = ""#seeds = "[email protected]:26656"#' $HOME/.gitopia/config/config.toml

Linux

sed -i 's#seeds = ""#seeds = "[email protected]:26656"#' $HOME/.gitopia/config/config.toml

For more information on the how and why of seeds and peers, you can read this great documentation from the Tendermint maintainers.


A Note on Gas and Fees

Transactions on the Gitopia Mainnet need to include a transaction fee in order to be processed. This fee pays for the gas required to run the transaction. The formula is the following:

fees = ceil(gas * gasPrices)

The gas is dependent on the transaction. Different transaction require different amount of gas. The gas amount for a transaction is calculated as it is being processed, but there is a way to estimate it beforehand by using the auto value for the gas flag. Of course, this only gives an estimate. You can adjust this estimate with the flag --gas-adjustment (default 1.0) if you want to be sure you provide enough gas for the transaction.

The gasPrice is the price of each unit of gas. Each validator sets a min-gas-price value, and will only include transactions that have a gasPrice greater than their min-gas-price.

The transaction fees are the product of gas and gasPrice. As a user, you have to input 2 out of 3. The higher the gasPrice/fees, the higher the chance that your transaction will get included in a block.

For Gitopia mainnet, the recommended gas-prices is 0.001ulore.


Run a Full Node

Start the full node with this command:

gitopiad start

If you would like to run your node via systemd.

You can use gitopiad to check that everything is running smoothly:

gitopiad status