Key | Value |
---|---|
Memory | 16 GB |
CPU | 8 cores |
Disk | 400 GB SSD |
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
Replace with your own moniker
MONIKER="<your-moniker-name>"
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)
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
Install cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/[email protected]
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 lava systemd service
sudo systemctl daemon-reloadsudo systemctl enable lava
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 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
Setting up a seed peers
sed -i -e "s|^seeds *=.*|seeds = \"d1d43cc7c7aef715957289fd96a114ecaa7ba756@testnet-seeds.nandal.website:20410\"|" $HOME/.lava/config/config.toml
Setting up a gas prices
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0ulava\"|" $HOME/.lava/config/app.toml
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 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
sudo systemctl start lava