⚙️ Installation

🛠️ Hardware Requirements

As the network grows, bandwidth, CPU, and memory requirements rise. Large hard drives are recommended for storing years of blockchain history, as well as significant RAM to process the increasing amount of transactions.

Also, running on testnet and mainnet will feature different requirements.

Node TypeCPURAMStorage

Full (Minimum)

4v CPU

8 GB

100 GB SSD

Full (Recommended)

4v CPU

16 GB

512 GB SSD

Additional requirements

Chain IDVersion tagBinary NameBinary Home

lava-testnet-2

v2.1.3

lavad

$HOME/.lava

⚡ Automatic installation

bash <(curl -s https://raw.githubusercontent.com/UnityNodes/scripts/main/lava/install-lava.sh)

📝 Manual installation

Installation packeges and dependencies

# Install dependencies for building from source
sudo apt update
sudo apt install -y lz4 jq make git gcc build-essential curl chrony unzip gzip snapd tmux bc

# Install Go
sudo rm -rf /usr/local/go
curl -L https://go.dev/dl/go1.21.6.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.bash_profile
source .bash_profile

Install node

Replace "NODE_MONIKER" with your name moniker

# Clone project repository
cd && rm -rf lava
git clone https://github.com/lavanet/lava
cd lava
git checkout v2.1.3

# Build binary
export LAVA_BINARY=lavad
make install

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

# Initialize the node
lavad init "NODE_MONIKER" --chain-id lava-testnet-2

# Download genesis,addrbook files
curl -L https://snapshots-testnet.unitynodes.com/lava-testnet-2/genesis.json > $HOME/.lava/config/genesis.json
curl -L https://snapshots-testnet.unitynodes.com/lava-testnet-2/addrbook.json > $HOME/.lava/config/addrbook.json

# Set seeds
sed -i -e 's|^seeds *=.*|seeds = "3a445bfdbe2d0c8ee82461633aa3af31bc2b4dc0@prod-pnet-seed-node.lavanet.xyz:26656,e593c7a9ca61f5616119d6beb5bd8ef5dd28d62d@prod-pnet-seed-node2.lavanet.xyz:26656,ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@testnet-seeds.polkachu.com:19956,eb7832932626c1c636d16e0beb49e0e4498fbd5e@lava-testnet-seed.itrocket.net:20656"|' $HOME/.lava/config/config.toml

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

# Download latest chain data snapshot
curl https://snapshots-testnet.unitynodes.com/lava-testnet-2/lava-testnet-2-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.lava

# Create a service
sudo tee /etc/systemd/system/lavad.service > /dev/null << EOF
[Unit]
Description=Lava node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which lavad) start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable lavad.service

# Start the service and check the logs
sudo systemctl start lavad.service
sudo journalctl -u lavad.service -f -o cat

📝 Create Validator

1️⃣ Create wallet

lavad keys add wallet

Save all information after entering the command, without this you will not be able to restore data to the wallet. SAVE SEED PHRASE (12 words).

2️⃣ Show priv_validator_key.json


cat $HOME/.lava/config/priv_validator_key.json
SAVE YOUR PRIVATE KEY AFTER ENTERING THE COMMAND

3️⃣ Create validator

lavad tx staking create-validator \
--amount=9000000ulava \
--pubkey=$(lavad tendermint show-validator) \
--moniker="$NODE_MONIKER" \
--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=YOUR_WALLET_NAME \
-y

Last updated