Set up a Node

In this tutorial you will learn how to set up a fiamma node

NOTE

This guide requires having Fiamma installed on a Linux System. The instructions can be found on the Installation page The version to install is specified at the fiamma-testnet-1 network info page.

System Requirements

The following specifications have been found to work well:

  • Quad Core or larger AMD or Intel (amd64) CPU

  • 32GB RAM;

  • 1TB NVMe SSD Storage (disk i/o is crucial);

  • 100Mbps bi-directional Internet connection;

Install Fiammad

You can refer to the installation page to install the fiammad binary

Initialize the Node Directory

First, initialize a node configuration directory under ~/.fiamma. The $NODENAME variable specifies the name you aim to give your node.

fiammad init $NODENAME --chain-id fiamma-testnet-1

Then, retrieve the genesis file and place it in the node directory:

wget https://raw.githubusercontent.com/fiamma-chain/networks/main/fiamma-testnet-1/genesis.json -O ~/.fiamma/config/genesis.json

Add Peers and Modify Configuration

Edit the configuration file at ~/.fiamma/config/config.toml and modify the seeds and persistent_peers attributes to contain appropriate seeds and peers of your choice. The full list of Fiamma approved seeds and peers can be found under the fiamma-testnet-1 network info page.


# Comma separated list of seed nodes to connect to
seeds = "5d6828849a45cf027e035593d8790bc62aca9cef@18.182.20.173:26656,526d13f3ce3e0b56fa3ac26a48f231e559d4d60c@35.73.202.182:26656"

# Comma separated list of nodes to keep persistent connections to
persistent_peers = "5d6828849a45cf027e035593d8790bc62aca9cef@18.182.20.173:26656,526d13f3ce3e0b56fa3ac26a48f231e559d4d60c@35.73.202.182:26656"

Edit the configuration file at ~/.babylond/config/app.toml and modify the minimum-gas-prices attribute and set it to a value of your choosing. For example

minimum-gas-prices = "0.00001ufia"

Setup Cosmovisor

Cosmovisor is a tool for automating the management of Cosmos SDK application binary files. It simplifies the process of upgrading and rolling back chains.

To install the latest version of Cosmovisor

go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest

Create the necessary directories

mkdir -p ~/.fiamma/cosmovisor
mkdir -p ~/.fiamma/cosmovisor/genesis/bin
mkdir -p ~/.fiamma/cosmovisor/upgrades

Copy the fiamma binary into the cosmovisor/genesis folder

cp $GOPATH/bin/fiammad ~/.fiamma/cosmovisor/genesis/bin/fiammad

Setup a cosmovisor service:

sudo tee /etc/systemd/system/fiamma.service > /dev/null <<EOF
[Unit]
Description=Fiamma daemon
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start --x-crisis-skip-assert-invariants
Restart=always
RestartSec=3
LimitNOFILE=infinity

Environment="DAEMON_NAME=fiammad"
Environment="DAEMON_HOME=${HOME}/.fiamma"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"

[Install]
WantedBy=multi-user.target
EOF

Start the Node

sudo -S systemctl daemon-reload
sudo -S systemctl enable fiamma
sudo -S systemctl start fiamma

You can check the status of the node by running

systemctl status fiamma

You can also check the fiamma's log by running

journalctl -u fiamma -f

Last updated