Chain ID Latest Version Tag Custom Port
union-testnet-8 v0.24.0 171

Setup validator name

Replace YOUR_MONIKER_GOES_HERE with your validator name


Install dependencies

Update system and install build tools

sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential
sudo apt -qy upgrade

Install Go

sudo rm -rf /usr/local/go
curl -Ls | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)

Download binaries

# Download project binaries
mkdir -p $HOME/.union/cosmovisor/genesis/bin
wget -O $HOME/.union/cosmovisor/genesis/bin/uniond
chmod +x $HOME/.union/cosmovisor/genesis/bin/uniond

# Create application symlinks
sudo ln -s $HOME/.union/cosmovisor/genesis $HOME/.union/cosmovisor/current -f
sudo ln -s $HOME/.union/cosmovisor/current/bin/uniond /usr/local/bin/uniond -f

Install Cosmovisor and create a service

# Download and install Cosmovisor
go install

# Create service
sudo tee /etc/systemd/system/union.service > /dev/null << EOF
Description=union node service

ExecStart=$(which cosmovisor) run start --home=$HOME/.union

sudo systemctl daemon-reload
sudo systemctl enable union.service

Initialize the node

# Workaround mandatory home argument
alias uniond='uniond --home=$HOME/.union/'

# Set node configuration
uniond config set client chain-id union-testnet-8
uniond config set client keyring-backend test
uniond config set client node tcp://localhost:17157

# Initialize the node
uniond init $MONIKER --chain-id union-testnet-8 --home=$HOME/.union

# Download genesis and addrbook
curl -Ls > $HOME/.union/config/genesis.json
curl -Ls > $HOME/.union/config/addrbook.json

# Add seeds
sed -i -e "s|^seeds *=.*|seeds = \"\"|" $HOME/.union/config/config.toml

# Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0muno\"|" $HOME/.union/config/app.toml

# Set pruning
sed -i \
  -e 's|^pruning *=.*|pruning = "custom"|' \
  -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
  -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
  -e 's|^pruning-interval *=.*|pruning-interval = "19"|' \

# Set custom ports
sed -i -e "s%^proxy_app = \"tcp://\"%proxy_app = \"tcp://\"%; s%^laddr = \"tcp://\"%laddr = \"tcp://\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:17160\"%; s%^laddr = \"tcp://\"%laddr = \"tcp://\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":17166\"%" $HOME/.union/config/config.toml
sed -i -e "s%^address = \"tcp://\"%address = \"tcp://\"%; s%^address = \":8080\"%address = \":17180\"%; s%^address = \"\"%address = \"\"%; s%^address = \"\"%address = \"\"%; s%:8545%:17145%; s%:8546%:17146%; s%:6065%:17165%" $HOME/.union/config/app.toml

Download latest chain snapshot

curl -L | tar -Ilz4 -xf - -C $HOME/.union
[[ -f $HOME/.union/data/upgrade-info.json ]] && cp $HOME/.union/data/upgrade-info.json $HOME/.union/cosmovisor/genesis/upgrade-info.json

Start service and check the logs

sudo systemctl start union.service && sudo journalctl -u union.service -f --no-hostname -o cat