Skip to content

A simple guide that will allow you to become a Lava validator

License

Notifications You must be signed in to change notification settings

0semter0/lava_validator_node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

lava_validator_node

Hardware Requirement

Key Value
Memory 16 GB
CPU 8 cores
Disk 400 GB SSD

Installation

Install Dependencies

Update system package and install build tools

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

Configure Moniker

Replace with your own moniker

MONIKER="<your-moniker-name>"

Install Go

sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.20.10.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)

Build Binaries

Cloning project repository and Compile binaries

cd $HOME
rm -rf lava
git clone https://github.com/lavanet/lava.git
cd lava
git checkout v2.0.0

Export binaries name and build

export LAVA_BINARY=lavadmake build

Prepare binaries for cosmovisor

mkdir -p $HOME/.lava/cosmovisor/genesis/binmv build/lavad $HOME/.lava/cosmovisor/genesis/bin/rm -rf build

Create symlinks

sudo ln -s $HOME/.lava/cosmovisor/genesis $HOME/.lava/cosmovisor/current -fsudo ln -s $HOME/.lava/cosmovisor/current/bin/lavad /usr/local/bin/lavad -f

Cosmovisor Setup

Install cosmovisor

go install cosmossdk.io/tools/cosmovisor/cmd/[email protected]

Create Service

Create a systemd service

sudo tee /etc/systemd/system/lava.service > /dev/null << EOF
[Unit]
Description=lava node service
After=network-online.target
 
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.lava"
Environment="DAEMON_NAME=lavad"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$HOME/.lava/cosmovisor/current/bin"
 
[Install]
WantedBy=multi-user.target
EOF

Enable Service

Enable lava systemd service

sudo systemctl daemon-reloadsudo systemctl enable lava

Initialize Node

Setting node configuration

lavad config chain-id lava-testnet-2
lavad config keyring-backend test
lavad config node tcp://localhost:20457

Initialize node

lavad init $MONIKER --chain-id lava-testnet-2

Download Genesis and Addrbook

Download genesis and addrbook file

curl -Ls https://snap.nandal.website/lava-testnet/genesis.json > $HOME/.lava/config/genesis.json
curl -Ls https://snap.nandal.website/lava-testnet/addrbook.json > $HOME/.lava/config/addrbook.json

Configure Seeds

Setting up a seed peers

sed -i -e "s|^seeds *=.*|seeds = \"d1d43cc7c7aef715957289fd96a114ecaa7ba756@testnet-seeds.nandal.website:20410\"|" $HOME/.lava/config/config.toml

Configure Gas Prices

Setting up a gas prices

sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0ulava\"|" $HOME/.lava/config/app.toml

Pruning Setting

Configure pruning setting

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"|' \
  $HOME/.lava/config/app.toml

Download Snapshots

Download latest chain snapshot

curl -L https://snap.nandal.website/lava-testnet/lava-latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.lava
[[ -f $HOME/.lava/data/upgrade-info.json ]] && cp $HOME/.lava/data/upgrade-info.json $HOME/.lava/cosmovisor/genesis/upgrade-info.json

Start Service

sudo systemctl start lava

About

A simple guide that will allow you to become a Lava validator

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published