Cover photo

GaiaNet setup Node

Prerequisites

Before starting, make sure you meet the following requirements:

  1. Server Requirements:

    • Linux-based operating system (Ubuntu 20.04 LTS recommended)

    • 4+ CPUs

    • 8+ GB of RAM

    • 200 GB SSD storage

    • Reliable internet connection (1 Gbps recommended)

  2. Software Requirements:

    • Latest version of Go (1.18 or higher)

    • Git

    • GaiaNet source code

  3. Wallet:

    • You’ll need a GaiaNet wallet to become a validator. Create one via the GaiaNet wallet interface or CLI.

Step 1: Server Setup

Update and Install Dependencies

Before you begin setting up the node, make sure to update your system packages:

sudo apt update && sudo apt upgrade -y

Install necessary dependencies:

sudo apt install -y build-essential git curl jq

Step 2: Install Go

GaiaNet requires Go for compiling its binaries. Install it by running:

curl -OL https://golang.org/dl/go1.19.5.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.19.5.linux-amd64.tar.gz

Add Go to your environment variables:

echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.profile
source ~/.profile

Verify the installation:

go version

Step 3: Clone GaiaNet Source Code

Clone the GaiaNet repository from GitHub:

git clone https://github.com/GaiaNetProject/gaianet.git
cd gaianet

Checkout the latest stable version:

Step 4: Build GaiaNet Binary

Now, you need to build the GaiaNet binary:

make install

Ensure the binary is correctly installed by checking the version:

Step 5: Configure the Node

Initialize the node by running:

gaianetd init <your-node-name> --chain-id=gaia-mainnet

This will create the basic configuration and genesis files for your node.

Step 6: Download Genesis File and Seeds

Fetch the genesis file from the GaiaNet official repository:

curl -O https://raw.githubusercontent.com/GaiaNetProject/mainnet/master/genesis.json
mv genesis.json ~/.gaianetd/config/genesis.json

Set persistent peers and seeds in the config.toml file:

nano ~/.gaianetd/config/config.toml

Look for the seeds and persistent_peers fields and add official peers:

seeds = "node1@seed.gaiainet.org:26656,node2@seed.gaiainet.org:26656"

Step 7: Start GaiaNet Node

Now that your node is configured, start the GaiaNet service:

gaianetd start

Your node will begin syncing with the GaiaNet blockchain. Depending on your server and internet speed, the syncing process may take some time.

Step 8: Create a Validator

Once the node is synced, you’re ready to create a validator. First, ensure your wallet has enough funds to meet the staking requirements.

Delegate tokens to create your validator using the following command:

gaianetd tx staking create-validator \
  --amount 1000000ugaia \
  --pubkey $(gaianetd tendermint show-validator) \
  --moniker <your-validator-name> \
  --chain-id gaia-mainnet \
  --commission-rate "0.10" \
  --commission-max-rate "0.20" \
  --commission-max-change-rate "0.01" \
  --min-self-delegation "1" \
  --gas auto \
  --from <your-wallet-name>

This command will create your validator node on the GaiaNet network.

Step 9: Monitor Your Node

You can monitor your node’s status using the following command:

gaianetd status

To view logs:

journalctl -u gaianetd -f

Conclusion

Congratulations! You’ve successfully set up a validator node on the GaiaNet blockchain. By participating as a validator, you contribute to the security and efficiency of the network. Keep your node online, monitor its performance regularly, and ensure you follow GaiaNet updates for any critical changes.