Lumera Node Setup

Install dependencies

Install all required packages for building and running the node (compilers, utilities, monitoring tools, compression libraries).

sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y

Install Go

Install Go (programming language required for building the node). Make sure you set the correct version.

cd $HOME
VER="1.24.1"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"

Install Ignite (optional)

Ignite is a tool for building Cosmos SDK-based blockchains.

curl https://get.ignite.com/cli! | bash

Clone repository and build

Download the Lumera source code, switch to the desired version, and build the binary.

export VER=
git clone https://github.com/LumeraProtocol/lumera
cd lumera
git checkout $VER
ignite chain build

Configure the setup

Set network parameters.

export CHAIN_ID=lumera-testnet-2

Set your node moniker (name).

export MONIKER=

Set your node folder name:

export FOLDER=".lumera"

Initialize the node.

$HOME/go/bin/lumerad init $MONIKER --chain-id $CHAIN_ID

Create folder structure for releases and copy binary

Organize binaries by version, move the built binary, and create a symlink for the active release. ℹ️ During the next upgrade, create a new subfolder for the new binary inside the releases folder and simply update the active-release symlink to point to this new binary’s folder. This approach is convenient for both automatic and manual updates, as well as for quickly rolling back to the previous version. Read more

mkdir -p $HOME/$FOLDER/releases/$VER/bin
mv $HOME/go/bin/lumerad $HOME/$FOLDER/releases/$VER/bin
ln -sfn $HOME/$FOLDER/releases/$VER $HOME/$FOLDER/active-release

Set PATH environment

Add the active release binary folder to your PATH so you can run lumerad from anywhere.

echo "export PATH=${HOME}/${FOLDER}/active-release/bin:\$PATH" >> $HOME/.bash_profile
source $HOME/.bash_profile

Custom ports

If you run multiple nodes on the same server, set a custom port prefix.

export CUSTOM_PORT_PREF=266

Update ports in config.toml.

sed -i.bak \
  -e "s|^\([[:space:]]*\)proxy_app *=.*|\1proxy_app = \"tcp://127.0.0.1:${CUSTOM_PORT_PREF}58\"|g" \
  -e "s|^\([[:space:]]*\)laddr *= \"tcp://127.0.0.1:26657\"|\1laddr = \"tcp://127.0.0.1:${CUSTOM_PORT_PREF}57\"|g" \
  -e "s|^\([[:space:]]*\)grpc_laddr *=.*|\1grpc_laddr = \"tcp://127.0.0.1:${CUSTOM_PORT_PREF}98\"|g" \
  -e "s|^\([[:space:]]*\)laddr *= \"tcp://0.0.0.0:26656\"|\1laddr = \"tcp://0.0.0.0:${CUSTOM_PORT_PREF}56\"|g" \
  -e "s|^\([[:space:]]*\)external_address *=.*|\1external_address = \"$(wget -qO- eth0.me):${CUSTOM_PORT_PREF}56\"|g" \
  -e "s|^\([[:space:]]*\)prometheus_listen_addr *=.*|\1prometheus_listen_addr = \"127.0.0.1:${CUSTOM_PORT_PREF}60\"|g" \
  -e "s|^\([[:space:]]*\)pprof_laddr|\1#pprof_laddr|g" \
  -e "s|prometheus = false|prometheus = true|g" \
  $HOME/$FOLDER/config/config.toml

Update ports in app.toml.

sed -i.bak \
  -e "s%^\([[:space:]]*\)address = \"tcp://localhost:1317\"%\1address = \"tcp://127.0.0.1:${CUSTOM_PORT_PREF}17\"%g" \
  -e "s%^\([[:space:]]*\)address = \"localhost:9090\"%\1address = \"127.0.0.1:${CUSTOM_PORT_PREF}90\"%g" \
  -e "s%^\([[:space:]]*\)address = \"0.0.0.0:9091\"%\1address = \"127.0.0.1:${CUSTOM_PORT_PREF}91\"%g" \
  $HOME/$FOLDER/config/app.toml

Update client RPC address in client.toml.

sed -i.bak \
  -e "s%^\([[:space:]]*\)node = \"tcp://localhost:26657\"%\1node = \"tcp://localhost:${CUSTOM_PORT_PREF}57\"%g" \
  $HOME/$FOLDER/config/client.toml

Set pruning

Enable pruning to reduce disk usage by deleting old blocks.

sed -i -e "s/^\([[:space:]]*\)pruning *=.*/\1pruning = \"custom\"/" $HOME/$FOLDER/config/app.toml
sed -i -e "s/^\([[:space:]]*\)pruning-keep-recent *=.*/\1pruning-keep-recent = \"100\"/" $HOME/$FOLDER/config/app.toml
sed -i -e "s/^\([[:space:]]*\)pruning-interval *=.*/\1pruning-interval = \"19\"/" $HOME/$FOLDER/config/app.toml

Enable bad peer filtering.

sed -i -e "s/^\([[:space:]]*\)filter_peers *=.*/\1filter_peers = \"true\"/" $HOME/$FOLDER/config/config.toml

Set chain-id

Configure chain-id for the client.

sed -i.bak -e "s/^\([[:space:]]*\)chain-id *=.*/\1chain-id = \"${CHAIN_ID}\"/;" $HOME/$FOLDER/config/client.toml

Set keyring-backend [optional]

Change key storage backend (e.g., use os instead of file).

sed -i.bak -e "s/^\([[:space:]]*\)keyring-backend *=.*/\1keyring-backend = \"os\"/;" $HOME/$FOLDER/config/client.toml

Set minimal gas-price

Define the minimum gas price for transactions.

sed -i.bak -e "s/^\([[:space:]]*\)minimum-gas-prices *=.*/\1minimum-gas-prices = \"0.0025alume\"/;" $HOME/$FOLDER/config/app.toml

Turn off RPC indexing [optional]

Disables transaction indexing to save disk space.

export STATUS="null"
sed -i -e "s/^indexer *=.*/indexer = \"$STATUS\"/" $HOME/$FOLDER/config/config.toml

Turn on snapshot [optional]

Enable automatic state snapshot creation every N blocks.

export INTERVAL=1000
sed -i.bak -e "s/^snapshot-interval *=.*/snapshot-interval = \"$INTERVAL\"/" $HOME/$FOLDER/config/app.toml

Download genesis

Download the network genesis file.

wget -O $HOME/$FOLDER/config/genesis.json https://snapshot01.at.htw.tech/lumera/testnet/genesis.json --inet4-only

Download addrbook

Download the network addrbook file.

wget -O $HOME/$FOLDER/config/addrbook.json https://snapshot01.at.htw.tech/lumera/testnet/addrbook.json --inet4-only

Donload Snapshot

Download the latest network snapshot here.

Add live peers

Add peers to config.toml for network connectivity.

Hightower peer:

37a27399e4b821894599452544a8d94b7500107f@lumera.at.htw.tech:10456

ℹ️ We scan our nodes for live peers and select up to 15 of the best ones.

PEERS="99825daa480688dfd1d6cffc8624e54309a14ce4@152.53.150.4:17756,2f68418ad7d6383a8caeb91cdf4b45c56d8ef55f@65.21.221.110:28656,39b84ac1ec66983759dc39ab5824a162c9b1168e@188.40.66.173:30756,e5b91364ce5de4f1f8fec2c6b70d6773faf1b815@157.90.1.91:28656,6ac1d5abefd5dda5e74efaa3e418a6ea6126d564@94.130.23.254:30756,ff90806ff1afe822a8ef730107df778b145ff4cb@148.251.86.17:30756,aeb7867b6ac0df3aa99f1a1265b50b0331d5415d@160.250.106.34:30756,faff7c1350468c53121a669ac40e317a4a70c425@44.198.60.93:26656,3b78b08bd9d9d0a2b17a944241a849ce04d8607e@44.204.100.172:26656,76ccfed7759506e10843908d4ad5b6e702ea1893@65.109.28.93:30756,a7445975480b2810d1646c059e9860292573220a@152.53.110.139:63656,a416a81715da4ffde5abb492a7c4ac17c887ae37@167.235.178.134:30756,483b7ef025e7241b3a85b52c7720b8917362eb9f@164.68.123.138:28656"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/$FOLDER/config/config.toml

Create systemd service

Create a systemd service file for auto-start and managing the node.

tee /etc/systemd/system/lumerad.service > /dev/null <<EOF
[Unit]
Description=Lumera Testnet node
After=network-online.target

[Service]
User=$USER
LimitNOFILE=1000000
ExecStart=$HOME/$FOLDER/active-release/bin/lumerad start
Restart=on-failure
RestartSec=3

[Install]
WantedBy=multi-user.target
EOF

Start the node

Reload systemd configs, enable the service at boot, start the node and follow logs.

systemctl daemon-reload
systemctl enable lumerad
systemctl restart lumerad && journalctl -o cat -fu lumerad