Useful commands List of commands used to manage the validator and node
Wallet interaction
Create Wallet
Copy lambdavm keys add <WALLET_NAME>
Restore wallet
Copy lambdavm keys add <WALLET_NAME> --recover
Show all wallets
Delete wallet
Copy lambdavm keys delete <WALLET_NAME>
Export wallet to the file
Copy lambdavm keys export < WALLET_NAM E >
Import wallet from the file
Copy lambdavm keys import < WALLET_NAM E > < WALLET_NAM E > .backup
Show balance
Copy lambdavm q bank balances $(lambdavm keys show <WALLET_NAME> -a)
Validator control
Create a validator
Copy lambdavm tx staking create-validator \
--amount=1000000000000000000ulamb \
--pubkey=$(lambdavm tendermint show-validator) \
--moniker=<YOUR_MONIKER> \
--chain-id=lambda_92000-1 \
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.1" \
--min-self-delegation="1" \
--from=<WALLET_NAME> \
--fees 3500ulamb \
--gas 350000 -y
Edit validator
Copy lambdavm tx staking edit-validator \
--new-moniker="<YOUR_MONIKER>" \
--identity="<YOUR_KEYBASE_ID>" \
--details="<YOUR_DETAILS>" \
--website="<YOUR_WEBSITE_URL>"
--chain-id=lambda_92000-1 \
--commission-rate=0.05 \
--from=<WALLET_NAME> \
--fees 3500ulamb -y
Unjail
Copy lambdavm tx slashing unjail --from <WALLET_NAME> --chain-id lambda_92000-1 --fees 2000ulamb -y
Jail reason
Copy lambdavm query slashing signing-info $(lambdavm tendermint show-validator)
Active validators
Copy lambdavm q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
Inactive validators
Copy lambdavm q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
Information about the validator
Copy lambdavm q staking validator $(lambdavm keys show <WALLET_NAME> --bech val -a)
Balance management
Withdrawal of all rewards
Copy lambdavm tx distribution withdraw-all-rewards --from <WALLET_NAME> --chain-id lambda_92000-1 --fees 2000ulamb -y
Withdrawal of rewards and commissions
Copy lambdavm tx distribution withdraw-rewards <VALOPER_ADDRESS> --commission --from <WALLET_NAME> --chain-id lambda_92000-1 --fees 2000ulamb -y
Self-delegation
Copy lambdavm tx staking delegate $(lambdavm keys show <WALLET_NAME> --bech val -a) --commission --from <WALLET_NAME> --chain-id lambda_92000-1 --fees 2000ulamb -y
Delegation to validator
Copy lambdavm tx staking delegate $(lambdavm keys show <WALLET_NAME> --bech val -a) 1000000000000000000ulamb --from <WALLET_NAME> --chain-id lambda_92000-1 --fees 2000ulamb -y
Redelegation to another validator
Copy lambdavm tx staking redelegate $(lambdavm keys show <WALLET_NAME> --bech val -a) <TO_VALOPER_ADDRESS> 1000000000000000000ulamb --from <WALLET_NAME> --chain-id lambda_92000-1 --fees 2000ulamb -y
Unbond tokens
Copy lambdavm tx staking unbond $(lambdavm keys show <WALLET_NAME> --bech val -a) 1000000000000000000ulamb --from <WALLET_NAME> --chain-id lambda_92000-1 --fees 2000ulamb -y
Sending tokens to a wallet
Copy lambdavm tx bank send <WALLET_NAME> <TO_WALLET_ADDRESS> 1000000000000000000ulamb --from <WALLET_NAME> --chain-id lambda_92000-1
Governance
All proposals
Copy lambdavm query gov proposals
All proposals by ID
Copy lambdavm query gov proposal 1
Vote "YES"
Copy lambdavm tx gov vote 1 yes --from <WALLET_NAME> --chain-id lambda_92000-1 --fees 2000ulamb -y
Vote "NO"
Copy lambdavm tx gov vote 1 no --from <WALLET_NAME> --chain-id lambda_92000-1 --fees 2000ulamb -y
Vote "Abstain"
Copy lambdavm tx gov vote 1 abstain --from <WALLET_NAME> --chain-id lambda_92000-1 --fees 2000ulamb -y
Vote "NoWithVeto"
Copy lambdavm tx gov vote 1 nowithveto --from <WALLET_NAME> --chain-id lambda_92000-1 --fees 2000ulamb auto -y
Utility
Update ports
Copy CUSTOM_PORT=10
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${CUSTOM_PORT}658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${CUSTOM_PORT}657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${CUSTOM_PORT}060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${CUSTOM_PORT}656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${CUSTOM_PORT}660\"%" $HOME/.lambdavm/config/config.toml
sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${CUSTOM_PORT}317\"%; s%^address = \":8080\"%address = \":${CUSTOM_PORT}080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${CUSTOM_PORT}090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${CUSTOM_PORT}091\"%" $HOME/.lambdavm/config/app.toml
Disable Indexer
Copy sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.lambdavm/config/config.toml
Enable Indexer
Copy sed -i 's|^indexer *=.*|indexer = "kv"|' $HOME/.lambdavm/config/config.toml
Update pruning
Copy sed -i.bak -e 's|^pruning *=.*|pruning = "custom"|; s|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|; s|^pruning-keep-every *=.*|pruning-keep-every = "0"|; s|^pruning-interval *=.*|pruning-interval = "10"|' $HOME/.lambdavm/config/app.toml
Node support
Validator Info
Copy lambdavm status 2>&1 | jq .ValidatorInfo
Sync info
Copy lambdavm status 2>&1 | jq .SyncInfo
Get peers
Copy echo $(lambdavm tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.lambdavm/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Validator key check
Copy [[ $(lambdavm q staking validator $(lambdavm keys show <WALLET_NAME> --bech val -a) -oj | jq -r .consensus_pubkey.key) = $(lambdavm status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "\n\e[1m\e[32mTrue\e[0m\n" || echo -e "\n\e[1m\e[31mFalse\e[0m\n"
Get live peers
Copy curl -sS http://localhost:26657/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}'
Setting the minimum commission
Copy sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0ulamb\"/" $HOME/.lambdavm/config/app.toml
Enable prometheus
Copy sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.lambdavm/config/config.toml
Reset chain data
Copy lambdavm tendermint unsafe-reset-all --home $HOME/.lambdavm --keep-addr-book
Deleting a node
Before deleting a node make sure you save priv_validator_key.json
Copy sudo systemctl stop lambdavm && \
sudo systemctl disable lambdavm && \
rm /etc/systemd/system/lambdavm.service && \
sudo systemctl daemon-reload && \
cd $HOME && \
rm -rf lambdavm && \
rm -rf .lambdavm && \
rm -rf $(which lambdavm)
Service setup
Reload service configuration
Copy sudo systemctl daemon-reload
Enable service
Copy sudo systemctl enable lambdavm
Disable service
Copy sudo systemctl disable lambdavm
Start service
Copy sudo systemctl start lambdavm
Stop service
Copy sudo systemctl stop lambdavm
Restart service
Copy sudo systemctl restart lambdavm
Check service status
Copy sudo systemctl status lambdavm
Check service logs
Copy sudo journalctl -u lambdavm -f --no-hostname -o cat
Last updated 2 months ago