CodeBlockLabs
CommunityPromo VPS
  • Welcome
  • Getting Started
    • What is Node?
    • Your First Nodes
  • Blockchain Nodes
    • Banano
      • Installation
      • Node Configuration
      • RPC Command
      • Cli Command
      • Other
    • BlockCast
      • Installation
    • BlockX
      • Installation
      • Useful Command
    • Elys
      • Installation
      • Useful Command
    • LayerEdge
      • Installation
      • Automation
    • Lumera
      • Installation
      • Useful Command
      • Snapshot
    • RaiBlocksOne
      • Installation
      • RPC Command
      • Other
    • RaiCoin
      • Installation
      • Node Configuration
      • RPC Command
      • Other
    • Selfchain
      • Installation
      • Useful Command
      • Snapshot
    • Symphony
      • Installation
      • Useful Command
      • Snapshot
      • Oracle
      • Patch
  • Other
    • Automation Scripts
      • Auto Send
    • Blockchain Explorer
    • Go Version Manager (Multi Go)
    • NodeJS
    • Proxmox
      • Proxmox Installation
      • Proxmox FAQ
    • WSL
      • Linux Packages
Powered by GitBook
On this page
  • Key Management
  • Validator Management
  • Token Management
  • Governance
  • Utility
  • Services Management
  1. Blockchain Nodes
  2. Elys

Useful Command

Useful set of commands for node operators. From key management to chain governance.

Key Management

Add new key

elysd keys add wallet

Recover existing key

elysd keys add wallet --recover

List All key

elysd keys list

Delete key

elysd keys delete wallet

Export Key (save to wallet.backup)

elysd keys export wallet

Import key

elysd keys import wallet wallet.backup

Query Wallet Balance

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

Validator Management

Create Validator

elysd tx staking create-validator \
  --amount "1000000uelys" \
  --pubkey $(elysd tendermint show-validator) \
  --moniker "My Node Name" \
  --identity "My Keybase ID" \
  --details "My Node Details" \
  --website "YOUR WEBSITE" \
  --chain-id elys-1 \
  --commission-rate "0.05" \
  --commission-max-rate "0.2" \
  --commission-max-change-rate "0.01" \
  --min-self-delegation "1" \
  --gas-prices 0.0003uelys \
  --gas "auto" \
  --gas-adjustment "1.5" \
  --from wallet \
  -y

Edit Validator

elysd tx staking edit-validator \
--new-moniker "My Node Name" \
--identity "My Keybase ID" \
--details "My Node Details" \
--website "YOUR WEBSITE" \
--chain-id elys-1 \
--commission-rate "0.05" \
--gas-prices 0.0003uelys \
--gas "auto" \
--gas-adjustment "1.5" \
--from wallet \
-y

Unjail Validator

elysd tx slashing unjail \
--chain-id elys-1 \
--gas-prices 0.0003uelys \
--gas-adjustment 1.5 \
--gas "auto" \
--from wallet \
-y 

Signing Info

elysd query slashing signing-info $(elysd tendermint show-validator) 

List all inactive validators

elysd q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl 

List all active validators

elysd q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED") or .status=="BOND_STATUS_UNBONDING")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " 	 " + .description.moniker' | sort -gr | nl 

View validators details

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

Token Management

Withdraw rewards from all validators

elysd tx distribution withdraw-all-rewards --from wallet --chain-id elys-1 --gas-prices 0.0003uelys  --gas-adjustment 1.5 --gas "auto" -y 

Withdraw comission and rewards from your validator

elysd tx distribution withdraw-rewards $(elysd keys show wallet --bech val -a) --commission --from wallet --chain-id elys-1 --gas-prices 0.0003uelys  --gas-adjustment 1.5 --gas "auto" -y 

Delegate to your validator

elysd tx staking delegate $(elysd keys show wallet --bech val -a) 1000000uelys --from wallet --chain-id elys-1 --gas-prices 0.0003uelys  --gas-adjustment 1.5 --gas "auto" -y 

Delegate to other

elysd tx staking delegate TO_VALOPER_ADDRESS 1000000uelys --from wallet --chain-id elys-1 --gas-prices 0.0003uelys  --gas-adjustment 1.5 --gas "auto" -y 

Redelegate your stake to other validators

elysd tx staking redelegate $(elysd keys show wallet --bech val -a) TO_VALOPER_ADDRESS 1000000uelys --from wallet --chain-id elys-1 --gas-prices 0.0003uelys  --gas-adjustment 1.5 --gas "auto" -y 

Unbond stake

elysd tx staking unbond $(elysd keys show wallet --bech val -a) 1000000uelys --from wallet --chain-id elys-1 --gas-prices 0.0003uelys  --gas-adjustment 1.5 --gas "auto" -y 

Send tokens

elysd tx bank send wallet TO_WALLET_ADDREESS 1000000uelys --from wallet --chain-id elys-1 --gas-prices 0.0003uelys  --gas-adjustment 1.5 --gas "auto" -y 

Governance

Create new text proposal

elysd tx gov submit-proposal \
--title "New Prosposals" \
--description "Detailed Proposal Information" \
--deposit "1000000uelys" \
--type "Text" \
--from wallet \
--gas-prices 0.0003uelys \ 
--gas-adjustment 1.5 \
--gas "auto" \
-y 

List all proposals

elysd query gov proposals

Vote

elysd tx gov vote PROPOSAL_NUMBER yes \
--from wallet \
--chain-id elys-1 \
--gas-prices 0.0003uelys \
--gas-adjustment 1.5 \
--gas "auto" \
-y 

Utility

Set Indexer to NULL

sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.elys/config/config.toml

Set Custom Port

CUSTOM_PORT=13
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/.elys/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"%; s%^address = "0.0.0.0:8545"%address = "0.0.0.0:${CUSTOM_PORT}545"%; s%^ws-address = "0.0.0.0:8546"%ws-address = "0.0.0.0:${CUSTOM_PORT}546"%" $HOME/.elys/config/app.toml

Get Validator info

elysd status 2>&1 | jq .ValidatorInfo

Get denom info

elysd q bank denom-metadata -oj | jq

Get sync status

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

Get latest height

elysd status 2>&1 | jq .SyncInfo.latest_block_height

Reset Node

elysd tendermint unsafe-reset-all --home $HOME/.elys --keep-addr-book

Delete Node

cd $HOME && sudo systemctl stop elysd && sudo systemctl disable elysd && sudo rm /etc/systemd/system/elysd.service && sudo systemctl daemon-reload && sudo rm -rf $(which elysd) && sudo rm -rf $HOME/.elys && sudo rm -rf $(which elysd) 

Services Management

Reload Service

sudo systemctl daemon-reload

Enable Service

sudo systemctl enable elysd

Disable Service

sudo systemctl disable elysd

Start Service

sudo systemctl start elysd

Stop Service

sudo systemctl stop elysd

Restart Service

sudo systemctl restart elysd

Check Service Status

sudo systemctl status elysd

Check Service Logs

sudo journalctl -u elysd -f --no-hostname -o cat
PreviousInstallationNextLayerEdge

Last updated 1 month ago