MONIKER="YOUR_MONIKER_NAME"
sudo apt update && sudo apt upgrade -ysudo apt install curl build-essential git jq lz4 ncdu bashtop -y
cd $HOMEversion="1.22.5"wget "https://golang.org/dl/go$version.linux-amd64.tar.gz"sudo rm -rf /usr/local/gosudo tar -C /usr/local -xzf "go$version.linux-amd64.tar.gz"rm "go$version.linux-amd64.tar.gz"echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profilesource $HOME/.bash_profile
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0
cd $HOMEgit clone https://github.com/lavanet/lava.gitcd lavagit checkout v3.1.0export LAVA_BINARY=lavadmake installlavad version --long | grep -e commit -e version
# Set node configurationlavad config chain-id lava-mainnet-1lavad config keyring-backend filelavad config node tcp://localhost:15857 # Initialize nodelavad init $MONIKER --chain-id lava-mainnet-1 # Download genesis and addrbookcurl -Ls https://snapshots.moonbridge.team/mainnet/lava/genesis.json > $HOME/.lava/config/genesis.jsoncurl -Ls https://snapshots.moonbridge.team/mainnet/lava/addrbook.json > $HOME/.lava/config/addrbook.json # Set seeds and peersSEEDS=""PEERS=""sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.lava/config/config.toml # Setting minimum gas pricesed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.000000001ulava\"|" $HOME/.lava/config/app.toml # Setting pruningsed -i -e 's|^pruning *=.*|pruning = "custom"|' $HOME/.lava/config/app.tomlsed -i -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' $HOME/.lava/config/app.tomlsed -i -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' $HOME/.lava/config/app.tomlsed -i -e 's|^pruning-interval *=.*|pruning-interval = "10"|' $HOME/.lava/config/app.toml # Disable indexersed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.lava/config/config.toml # Enable Prometheussed -i -e "s/prometheus = false/prometheus = true/" $HOME/.lava/config/config.toml # Setting custom portssed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:15858\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://0.0.0.0:15857\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:15860\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:15856\"%; s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):15856\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":15866\"%" $HOME/.lava/config/config.tomlsed -i -e "s%:1587%:15817%g; s%:8080%:15880%g; s%:9090%:15890%g; s%:9091%:15891%g; s%:8545%:15845%g; s%:8546%:15846%g; s%:6065%:15865%g" $HOME/.lava/config/app.toml
sed -i \ -e 's/timeout_propose = .*/timeout_propose = "10s"/' \ -e 's/timeout_propose_delta = .*/timeout_propose_delta = "500ms"/' \ -e 's/timeout_prevote = .*/timeout_prevote = "1s"/' \ -e 's/timeout_prevote_delta = .*/timeout_prevote_delta = "500ms"/' \ -e 's/timeout_precommit = .*/timeout_precommit = "500ms"/' \ -e 's/timeout_precommit_delta = .*/timeout_precommit_delta = "1s"/' \ -e 's/timeout_commit = .*/timeout_commit = "15s"/' \ -e 's/^create_empty_blocks = .*/create_empty_blocks = true/' \ -e 's/^create_empty_blocks_interval = .*/create_empty_blocks_interval = "15s"/' \ -e 's/^timeout_broadcast_tx_commit = .*/timeout_broadcast_tx_commit = "151s"/' \ -e 's/skip_timeout_commit = .*/skip_timeout_commit = false/' \ $HOME/.lava/config/config.toml
mkdir -p $HOME/.lava/cosmovisor/genesis/binmkdir -p $HOME/.lava/cosmovisor/upgradescp $HOME/go/bin/lavad $HOME/.lava/cosmovisor/genesis/bin/
sudo tee /etc/systemd/system/lavad.service > /dev/null << EOF[Unit]Description=Lava NodeAfter=network-online.target [Service]User=$USERExecStart=$(which cosmovisor) run startRestart=alwaysRestartSec=5LimitNOFILE=65535Environment="DAEMON_NAME=lavad"Environment="DAEMON_HOME=$HOME/.lava"Environment="UNSAFE_SKIP_BACKUP=true"Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"Environment="DAEMON_RESTART_AFTER_UPGRADE=true" [Install]WantedBy=multi-user.targetEOFsudo systemctl daemon-reloadsudo systemctl enable lavad
curl -o - -L https://snapshots.moonbridge.team/mainnet/lava/snapshot_latest.tar.lz4 | lz4 -dc - | tar -x -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 lavad && sudo journalctl -u lavad -f --no-hostname -o cat
lavad keys add wallet
lavad q bank balances $(lavad keys show wallet -a)
lavad tx staking create-validator \ --amount 1000000ulava \ --pubkey $(lavad tendermint show-validator) \ --moniker "YOUR_MONIKER_NAME" \ --identity "YOUR_KEYBASE_ID" \ --details "YOUR_DETAILS" \ --website "YOUR_WEBSITE_URL" \ --security-contact "YOUR_EMAIL_ADDRESS" \ --chain-id lava-mainnet-1 \ --commission-rate 0.05 \ --commission-max-rate 0.20 \ --commission-max-change-rate 0.01 \ --min-self-delegation 1 \ --from wallet \ --gas-adjustment 1.4 \ --gas auto \ --gas-prices 0.000000001ulava \ -y
sudo systemctl stop lavadsudo systemctl disable lavadsudo rm -rf /etc/systemd/system/lavad.servicesudo systemctl daemon-reloadsudo rm -f $(which lavad)sudo rm -rf $HOME/.lavasudo rm -rf $HOME/lava