🌍Lava Network: Validator Node Guide

DBRF...R1BM
23 Jan 2024
43

Great Introducing Lava Network: Pioneering a Modular Economy for Web3 Data Infrastructure

Lava's innovative design focuses on providing developers with swift, dependable, and precise connectivity across various chains. Initially featuring RPC as its primary service, Lava plans to broaden its offerings to include subgraphs, oracles, and more.


Constructed as a dedicated L1 Proof-of-Stake (PoS) Blockchain utilizing Cosmos SDK, Lava introduces a unique element called “specs”. These specs are modules that establish APIs in a JSON format. These can then be distributed by a network of providers to fulfill market needs. Their goal is to create a flexible economy centered around data infrastructure for web3 and beyond.

The involvement of major players like PayPal and Jump Crypto in this project adds a significant layer of promise to its outlook. It’s also conceivable that there may be an additional round of funding in the future.

This guide will provide you with comprehensive instructions covering installation, configuration, joining the network, and staking.

Part 1: Order and configure your VPS


This is the hardware configuration needed to set up an Lava node:


Open an account for a VPS server at https://www.digitalocean.com/ and get your $200 free credit.

After opening a membership, click create new in the create droplets section.

Keep the server information this way

Under Choose an image, click marketplace and select docker

Then select the server properties that we will install in this way

Create a password for yourself

Then click on create droplet and create a server.


Part 2: Connect to your VPS via SSH


Download and install most recent edition of PuTTY by visiting the official website

You will find the IP adress of your VPS in the second email. Launch PuTTY, enter the IP address of your VPS and click “Open”:

Once the server interface is open, you will be prompted to provide login details; simply enter “root” as the user and use your chosen password:
Congratulations! You are now successfully logged into your server.

Part 3: Preparations


Copy and paste the codes written here into the terminal respectively.

UPDATE SYSTEM AND INSTALL BUILD TOOLS
sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential
sudo apt -qy upgrade


Replace YOUR_MONIKER_GOES_HERE with your validator name

MONIKER="YOUR_MONIKER_GOES_HERE"


INSTALL GO

sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.20.13.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)


Download and build binaries

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


export LAVA_BINARY=lavad
make build


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


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


Install Cosmovisor and create a service


go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0


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"

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable lava.service


Initialize the node

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


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


curl -Ls https://snapshots.kjnodes.com/lava-testnet/genesis.json > $HOME/.lava/config/genesis.json
curl -Ls https://snapshots.kjnodes.com/lava-testnet/addrbook.json > $HOME/.lava/config/addrbook.json


sed -i -e "s|^seeds *=.*|seeds = \"3f472746f46493309650e5a033076689996c8881@lava-testnet.rpc.kjnodes.com:14459\"|" $HOME/.lava/config/config.toml


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


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


sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:14458\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:14457\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:14460\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:14456\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":14466\"%" $HOME/.lava/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:14417\"%; s%^address = \":8080\"%address = \":14480\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:14490\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:14491\"%; s%:8545%:14445%; s%:8546%:14446%; s%:6065%:14465%" $HOME/.lava/config/app.toml


Update chain-specific configuration


sed -i \-e 's/timeout_commit = ".*"/timeout_commit = "30s"/g' \-e 's/timeout_propose = ".*"/timeout_propose = "1s"/g' \-e 's/timeout_precommit = ".*"/timeout_precommit = "1s"/g' \-e 's/timeout_precommit_delta = ".*"/timeout_precommit_delta = "500ms"/g' \-e 's/timeout_prevote = ".*"/timeout_prevote = "1s"/g' \-e 's/timeout_prevote_delta = ".*"/timeout_prevote_delta = "500ms"/g' \-e 's/timeout_propose_delta = ".*"/timeout_propose_delta = "500ms"/g' \-e 's/skip_timeout_commit = ".*"/skip_timeout_commit = false/g' \$HOME/.lava/config/config.toml


Download latest chain snapshot

curl -L https://snapshots.kjnodes.com/lava-testnet/snapshot_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 and check the logs

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


Create a new wallet


lavad keys add wallet



Ensure to save the console output. Details such as name, address, public key, and the seed phrase are crucial and should be saved.

Obtain Funds from the Lava Network Testnet Faucet

To receive funds, visit the #faucet channel on the official Lava Network Discord server. Here, you can request funds by sharing the address you previously created. Once in the channel, submit your request by typing $request followed by your address. For instance, you would type this to request funds for that specific address:

$request lava@2km65apt24k8m3k0mh2w8l5t2l7znbbfaxq7pw4


Save the private validator key


Now save the private validator key, since it’s crucial to secure this file adequately to maintain the integrity and security of your validator operations.

cat $HOME/.lava/config/priv_validator_key.json


Check the network synchronization status with the command:

lavad status 2>&1 | jq .SyncInfo.catching_up


As soon as the value of catching_up becomes “false”, you can proceed to the final step and create your validator:

As soon as the value of catching_up becomes “false”, you can proceed to the final step and create your validator.

lavad tx staking create-validator \--amount=9000000ulava \--pubkey=$(lavad tendermint show-validator) \--moniker "YOUR_MONIKER_NAME" \--details "YOUR_DETAILS" \--website "YOUR_WEBSITE_URL" \--chain-id=lava-testnet-1 \--commission-rate=0.1 \--commission-max-rate=0.2 \--commission-max-change-rate=0.05 \--min-self-delegation=1 \--fees=10000ulava \--from=wallet \-y


Now make sure you see the validator details

lavad q staking validator $(lavad keys show wallet --bech val -a)



To achieve active validator status, it’s essential to bond more ulava tokens than the current lowest-bonded validator in the ranking (unless the validator set isn’t full). Additionally, you must have a minimum of 1,000,000 ulava tokens bonded.

Congratulations! You’ve successfully become a validator on the Lava Network. Within 30 minutes, the validator should appear in the list at https://lava.explorers.guru/validators (you can find it by searching for the wallet address or your Moniker, and then see it in the delegations to your validator on this wallet).

Please keep in mind that your node will initially be listed as “inactive” when it first appears. In order to become an active validator, you need to have more ulava tokens bonded than the last validator, so to have more voting power than the last validator, which is 159, 000 LAVA at the moment of writing. Therefore, you need to obtain a lot of testnet tokens from the faucet and then delegate these tokens to your node by using the following command:

lavad tx staking delegate YOUR_NODE_OPERATOR_ADRESS_HERE 1000000ulava --from wallet --chain-id lava-testnet-2


If you encounter any issues, I recommend consulting the official documentation first. For tasks like creating a backup of your keys, your node, or updating lavad, please also refer to the official guides. You can also refer to the handy cheat sheet provided by Node Jumper. If you still need assistance, feel free to post your questions in the “Validators” channel on the official Discord server. Alternatively, you’re always welcome to reach out to me directly for assistance.

Get fast shipping, movies & more with Amazon Prime

Start free trial

Enjoy this blog? Subscribe to kiembacty

2 Comments