🌍Lava Network: Setting Up Your Validator Node

ilaNihas 🌍
10 min readJan 5, 2024

--

© by Lava Network

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.

© by ICOAnalytics

Part 1: Order and configure your VPS

To get started with installing your node, you’ll first need to rent a VPS (Virtual Private Server). Using a VPS offers several advantages, such as enhanced performance, scalability and reliability. I’ll guide you through the process of renting a VPS at a lower cost, and show you how to configure it. Follow the steps below to get your VPS ready for the node installation. Research VPS providers: Take some time to explore different VPS providers available in the market. Consider factors like pricing, reputation, and customer reviews to find the right fit for your needs. Look for plans that offer the appropriate amount of resources (CPU, RAM, storage) to support your node. Contabo is my preferred choice due to their combination of affordable pricing, reliable performance, and user-friendly interface.

I personally use and trust Contabo for my blockchain nodes. I’ve recently joined their affiliate program to recommend their services. If you decide to use my affiliate links for Contabo, you’ll be supporting my work at no extra cost to you. This support is important for continuing our journey together in the fascinating world of crypto, and using these affiliate links is a direct and impactful way to back my efforts. Thank you very much for your support!

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

Given the hardware requirements, I suggest opting for the Cloud VPS S package, as it offers a suitable balance of performance and efficiency for these needs. However, the Cloud VPS S option is also a viable choice as it meets the minimum requirements.

I will initially select a rental period of 1 month, with the flexibility to extend it later if needed:

Make sure to choose the option “European Union (Germany)”:

For the best storage solution, I recommend selecting the 400GB SSD storage type. While it’s slightly below the recommended requirements, it should still be enough:

To access Docker with Ubuntu 22.04, navigate to the “Apps & Panels” section and make the appropriate selection:

To prioritize security, I highly recommend to generate a password and securely store it to ensure maximum protection:

For the final step, it’s recommended to leave the sections titled “Object Storage”, “Networking”, and “Add-Ons” in their default state without any modifications. If you are new to Contabo, please create an account; otherwise, login using your existing credentials. Provide your personal data by filling in the required fields. Complete the remaining fields with your personal information, and click the “Next” button to proceed with the payment. After successfully completing the payment for your order, you will receive an initial email. Within approximately 15 minutes, you will receive a second email containing all the information needed to connect to your VPS.

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

To continue, we can update the packages by running the following commands in the terminal. The first part of the command (sudo apt update) updates the package lists for upgrades, and the second part (sudo apt upgrade -y) actually performs the upgrades with the “-y” flag allowing for automatic confirmation of prompts during the upgrade process:

sudo apt update && sudo apt upgrade -y

Part 4: Setup validator name

First change “YOUR_MONIKER_GOES_HERE” to your chosen validator moniker and enter this command:

MONIKER="YOUR_MONIKER_GOES_HERE"

Part 5: Install dependencies & Install GO

# Install Build Tools
sudo apt -qy install curl git jq lz4 build-essential
# Install GO
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.20.12.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)

Part 6: Download and build binaries

Before proceeding, ensure you visit the Lava GitHub repository to verify the latest version. Look on the right-hand side of the page to determine the most recent release. Once you’ve identified the latest version, update the command “git checkout” accordingly to reflect this newest version.

# Clone project repository
cd $HOME
rm -rf lava
git clone https://github.com/lavanet/lava.git
cd lava
git checkout v0.34.0

# Build binaries
export LAVA_BINARY=lavad
make build

# Prepare binaries for Cosmovisor
mkdir -p $HOME/.lava/cosmovisor/genesis/bin
mv build/lavad $HOME/.lava/cosmovisor/genesis/bin/
rm -rf build

# Create application symlinks
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

Part 7: Set up Cosmovisor and create the corresponding service

# Download and install Cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest

# Create 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"

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

Part 8: Initialize the node

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

# Initialize the node
lavad init $MONIKER --chain-id lava-testnet-2

# Download genesis and addrbook
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

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

# Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0ulava\"|" $HOME/.lava/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"|' \
$HOME/.lava/config/app.toml

# Set custom ports
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

Part 9: Update chain-specific configuration

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

Part 10: 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

Part 11: Start service and check the logs

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

Part 12: Become a Validator

To initiate the journey of becoming a validator, you’ll need to follow these steps.

Part 12a: 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.

Part 12b: 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

You can check your wallet balance using this command:

lavad q bank balances $(lavad keys show wallet -a)

Ensure that you have successfully received 1,000,00 ulava.

Part 12c: 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

Part 13: Create the Validator

Unlike traditional Cosmos SDK chains, establishing a validator on Lava Network requires using the lavad tx staking create-validator command. This process assumes the presence of a BLS validator key in the $HOME/.lava/config/.json file.

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:

# Make sure you have adjusted **moniker**, **details** and **website** to match your values.

lavad tx staking create-validator \
--amount=150000ulava \
--pubkey=$(lavad tendermint show-validator) \
--moniker "YOUR_MONIKER_NAME" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id=lava-testnet-2 \
--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.

Hey everyone, I’m excited to share that I’ve partnered with Dotcom Canvas, a standout German brand known for its exquisite crypto-themed wall art. Their acrylic glass pieces are particularly impressive.

Discover their unique collection via my affiliate link. For a special treat, use the code CRYPTOTRIBE at checkout to get a 15% discount. To see these art pieces in their full glory, take a peek at this promotional video. It’s a great way to visualize how they could elevate your space.

Let’s enjoy some awesome crypto art together!

Disclosure: By using my affiliate link for purchases, I receive a commission.

About me

Hi! I’m ilaNihas, a big football fan (or soccer, if you prefer). After 13 years in IT, I paused my career to explore crypto, blockchain, and Web3. I’m fascinated by the potential and constantly searching for interesting projects, airdrops, and new nodes to explore. Join me as I combine my passions for sports, writing, and tech. Let’s dive into the world of crypto and blockchain together!

Thanks for reading! Please share your feedback in a comment and follow me on my socials if you enjoyed the article. I’ve also set up a Discord community where we can get together and have discussions about interesting crypto-related topics. You’re welcome to join us and be part of the conversation → https://discord.gg/zN4dH35JJZ

Disclaimer

Please note that the content provided on this blog is intended solely for educational, informational, and entertainment purposes and should not be considered as financial advice. In summary, always do your own research, evaluate the information critically, and seek professional advice when necessary. Stay informed, exercise caution, and make well-informed decisions based on your own unique circumstances.

--

--

ilaNihas 🌍

Crypto reptile | Join us on this ride through the cryptoverse, as we explore the strangest corners of the blockchain -> https://discord.gg/zN4dH35JJZ