Installation Guide/
testnet/
lava

Rpc status: Active

Install Dependencies

sudo apt update
sudo apt install curl iptables build-essential git wget jq make gcc nano tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev lz4 -y

Install Go

cd $HOME && \
ver="1.22.6" && \
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" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
go version

Set Variables

echo "export WALLET='wallet'" >> $HOME/.bash_profile
echo "export MONIKER='validator'" >> $HOME/.bash_profile
echo "export PORT_LAVA='26'" >> $HOME/.bash_profile
source $HOME/.bash_profile

Download Binary

cd $HOME
wget -O lavad https://github.com/lavanet/lava/releases/download/v5.2.0/lavad-v5.2.0-linux-amd64
chmod +x lavad
mv $HOME/lavad $HOME/go/bin/lavad

lavad version --long | grep -e version -e commit

Config and Initialize Node

lavad init "validator" --chain-id lava-testnet-2
lavad config chain-id lava-testnet-2
lavad config keyring-backend os
lavad config node tcp://localhost:${PORT_LAVA}657

Download Genesis and Addrbook

wget -O $HOME/.lava/config/genesis.json https://download.dteam.tech/lava/testnet/genesis
wget -O $HOME/.lava/config/addrbook.json https://download.dteam.tech/lava/testnet/addrbook

Set Seeds and Peers

SEEDS="fee8928362b444206fc3d3ed44ea22a53eaf5ac3@seed.lava.testnet.dteam.tech:31656"
PEERS="325a6922ac5fa5803f312e07a3894fbc525c4285@peer.lava.testnet.dteam.tech:30656,[email protected]:19956,[email protected]:21756,[email protected]:19956,[email protected]:20656,[email protected]:26656,[email protected]:19956,[email protected]:23656,[email protected]:28656,[email protected]:56656,[email protected]:56656,[email protected]:26656,[email protected]:56656,[email protected]:656,[email protected]:19656,[email protected]:26656,[email protected]:56656,[email protected]:27066,[email protected]:56656,[email protected]:21156,[email protected]:19956,[email protected]:19956,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:36656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:19956,[email protected]:32656,[email protected]:26656,[email protected]:38666,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:23856,[email protected]:17756,[email protected]:27656,[email protected]:16656,[email protected]:56656,[email protected]:26656,[email protected]:56656,[email protected]:23656,[email protected]:23356,[email protected]:20656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.lava/config/config.toml

Set Custom Ports / Optional

sed -i.bak -e "s%:1317%:${PORT_LAVA}317%g;
s%:8080%:${PORT_LAVA}080%g;
s%:9090%:${PORT_LAVA}090%g;
s%:9091%:${PORT_LAVA}091%g;
s%:8545%:${PORT_LAVA}545%g;
s%:8546%:${PORT_LAVA}546%g;
s%:6065%:${PORT_LAVA}065%g" $HOME/.lava/config/app.toml

sed -i.bak -e "s%:26658%:${PORT_LAVA}658%g;
s%:26657%:${PORT_LAVA}657%g;
s%:6060%:${PORT_LAVA}060%g;
s%:26656%:${PORT_LAVA}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${PORT_LAVA}656\"%;
s%:26660%:${PORT_LAVA}660%g" $HOME/.lava/config/config.toml

Config Pruning / Optional

sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.lava/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.lava/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"20\"/" $HOME/.lava/config/app.toml

Set Minimum Gas Price / Optional

sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.025ulava"|g' $HOME/.lava/config/app.toml

Disable Indexing / Optional

INDEXER="null"
sed -i -e "s/^indexer *=.*/indexer = \"$INDEXER\"/" $HOME/.lava/config/config.toml

Disable Snapshots / Optional

SNAPSHOT_INTERVAL=0
sed -i.bak -e "s/^snapshot-interval *=.*/snapshot-interval = \"$SNAPSHOT_INTERVAL\"/" ~/.lava/config/app.toml

Create Service File

sudo tee /etc/systemd/system/lavad.service > /dev/null <<EOF
[Unit]
Description=lava testnet node
After=network-online.target

[Service]
User=$USER
WorkingDirectory=$HOME/.lava
ExecStart=$(which lavad) start
Restart=on-failure
RestartSec=5
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

Download Snapshot / Optional

lavad tendermint unsafe-reset-all --home $HOME/.lava
curl https://download.dteam.tech/lava/testnet/pruned/latest-snapshot | lz4 -dc - | tar -xf - -C $HOME/.lava

Enable and Start Service

sudo systemctl daemon-reload
sudo systemctl enable lavad
sudo systemctl restart lavad
sudo journalctl -u lavad -f -o cat