๐ก Useful commands
โ๏ธ Service Commands
Check Logs
sudo journalctl -u emped -f -o cat
Start service
sudo systemctl start emped
Stop service
sudo systemctl stop emped
Restart service
sudo systmctl restart emped
Check status
sudo systemctl status emped
Enable Service
sudo systemctl enable emped
Reload service
sudo systemctl daemon-reload
Disable service
sudo systemctl disable emped
Check synchronization status
while true; do
local_height=$(emped status | jq -r .sync_info.latest_block_height)
network_height=$(curl -s https://rpc.empeiria-testnet.unitynodes.com/status | jq -r '.result.sync_info.latest_block_height')
blocks_left=$((network_height - local_height))
echo -e "\033[1;33m[Sync Status]\033[0m \033[1;32mNode Height:\033[0m \033[1;37m$local_height\033[0m | \033[1;32mNetwork Height:\033[0m \033[1;37m$network_height\033[0m | \033[1;32mBlocks Left:\033[0m \033[1;31m$blocks_left\033[0m"
sleep 5
done
If "Block left - 0" - synchronized
Check the latest block of your validator
emped status | jq '.SyncInfo.latest_block_height // .sync_info.latest_block_height'
View the ports used node
ss -tulpn | grep emped
โ๏ธ Key Command
Create new wallet
emped keys add wallet
Recovery wallet
emped keys add wallet --recover
List all wallet
emped keys list
Delete wallet
emped keys delete wallet
Export wallet
emped keys export wallet
Import wallet
emped keys import wallet wallet.backup
Check wallet balance
emped q bank balances $(emped keys show wallet -a)
emped q bank balances "Any other or your wallet"
โ๏ธ Validator Commands
Create validator
emped tx staking create-validator \
--amount 1000000uempe \
--commission-max-change-rate "0.05" \
--commission-max-rate "0.10" \
--commission-rate "0.05" \
--min-self-delegation "1" \
--pubkey=$(emped tendermint show-validator) \
--moniker '' \ #Validator name, displayed in explorers.
--website "" \ #Your website is available, or leave the field blank
--identity "" \ #Use your KeyBase ID. If you don't have one, leave it empty.
--details "" \ #Any details about your validator.
--security-contact="" \
--chain-id empe-testnet-2 \
--from wallet #Wallet name, as specified during creation, or typically 'wallet'.
โฝ Replace the following values with your own: WALLET - usually it's 'wallet', or your wallet's name. MONIKER - any convenient name for your validator, displayed in the explorer. IDENTITY - validator's avatar, displayed in the explorer. Create a KeyBase ID following the instructions or leave it empty, and it will default to a standard one. DETAILS - details about your validator, also displayed in the explorer.
WEBSITE - your website/github/twitter, etc., if you don't want to specify anything - leave it blank
Replace all necessary values indicated above with the $ sign to successfully create your validator. โฝ Example:
emped tx staking create-validator \
--amount 1000000uempe \
--commission-max-change-rate "0.05" \
--commission-max-rate "0.10" \
--commission-rate "0.05" \
--min-self-delegation "1" \
--pubkey=$(emped tendermint show-validator) \
--moniker '' \ #Validator name, displayed in explorers.
--website "" \ #Your website is available, or leave the field blank
--identity "" \ #Use your KeyBase ID. If you don't have one, leave it empty.
--details "" \ #Any details about your validator.
--security-contact="" \
--chain-id empe-testnet-2 \
--from wallet #Wallet name, as specified during creation, or typically 'wallet'.
Update validator information
emped tx staking edit-validator \
--new-moniker "" \
--identity "" \
--details "" \
--website "" \
--chain-id empe-testnet-2 \
--commission-rate 0.05 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices \
-y
Validator details
emped q staking validator $(emped keys show wallet --bech val -a)
Jailing info
emped q staking validator $(emped keys show wallet --bech val -a) | grep -E "jailed"
If "true" - your validator is jailed // "false" - your validator is not jailed
Jail reason
emped q slashing signing-info $(emped tendermint show-validator)
Unjail command
emped tx slashing unjail --from wallet --chain-id empe-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices -y
Information about delegation at your validator
emped q staking validator $(emped keys show wallet --bech val -a) | grep -E "tokens"
Active Validators list
emped q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " " + .description.moniker' | sort -gr | nl
Inactive Validator list
emped q staking validators -oj --limit=2000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED" or .status=="BOND_STATUS_UNBONDING")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
Signing Info
emped query slashing signing-info $(emped tendermint show-validator)
โ๏ธ Tokens Commands
Delegate to yourself
emped tx staking delegate $(emped keys show wallet --bech val -a) --from wallet --chain-id empe-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices -y
Delegate to another validator
emped tx staking redelegate $(emped keys show wallet --bech val -a) TO_VALOPER_ADDRESS --from wallet --chain-id empe-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices -y
Redelegate your stake to other validator
emped tx staking redelegate $(emped keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> --from wallet --chain-id empe-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices -y
Unbond stake
emped tx staking unbond $(emped keys show wallet --bech val -a) --from wallet --chain-id empe-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices -y
Send tokens
emped tx bank send wallet <TO_WALLET_ADDRESS> --from wallet --chain-id empe-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices -y
Check wallet balance
emped q bank balances $(emped keys show wallet -a)
Transaction details
emped query tx HASH_TX
Withdraw all rewards
emped tx distribution withdraw-all-rewards --from wallet --chain-id empe-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices -y
Withdraw rewards and commission from your validator
emped tx distribution withdraw-rewards $(emped keys show wallet --bech val -a) --commission --from wallet --chain-id empe-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices -y
โ๏ธ Governance
List All Proposals
emped query gov proposals
View proposal by ID
emped query gov proposal ID
Vote "YES"
emped tx gov vote 1 yes --from wallet --chain-id empe-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices -y
Vote "NO"
emped tx gov vote 1 no --from wallet --chain-id empe-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices -y
Vote "NO_WITH_VETO"
emped tx gov vote 1 NoWithVeto --from wallet --chain-id empe-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices -y
Vote "ABSTAIN"
emped tx gov vote 1 abstain --from wallet --chain-id empe-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices -y
Create new text proposal
emped tx gov submit-proposal \
--title="Title" \ #Change Title
--description="Description" \
--deposit=1000000uempe \
--type="Text" \ #Change text proposal
--from=wallet \ #Change name wallet
--fees 500uempe
-y
โ๏ธ Utility
Set Custom Port
#PORT 29
sed -i.bak -e "s%:1317%:1617%g;
s%:8080%:8380%g;
s%:9090%:9390%g;
s%:9091%:9391%g;
s%:8545%:8845%g;
s%:8546%:8846%g;
s%:6065%:6365%g" $HOME/.empe-chain/config/app.toml
sed -i.bak -e "s%:26658%:29658%g;
s%:26657%:29657%g;
s%:6060%:6360%g;
s%tcp://0.0.0.0:26656%tcp://0.0.0.0:29656%g;
s%:26660%:29660%g" $HOME/.empe-chain/config/config.toml
sed -i.bak -e "s%:26657%:29657%g" $HOME/.empe-chain/config/client.toml
sudo systemctl restart emped && sudo journalctl -u emped -f -o cat
Set Indexer
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.empe-chain/config/config.toml
sed -i 's|^indexer *=.*|indexer = "kv"|' $HOME/.empe-chain/config/config.toml
Update Pruning
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 = "17"|' $HOME/.empe-chain/config/app.toml
Reset node
emped tendermint unsafe-reset-all --home $HOME/.empe-chain --keep-addr-book
Get denom info
emped q bank denom-metadata -oj | jq
Get Node Peer
echo $(emped tendermint show-node-id)'@'$(curl -4 -s ifconfig.me)':'$(cat $HOME/.empe-chain/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Update server name
sudo hostnamectl set-hostname server_name
How much SSD use node (currently)
du -sh $HOME/.empe-chain/
How much RAM use node (currently)
sudo systemctl status emped | grep "Memory:"
How much CPU use node (currently)
ps -C emped -o %cpu --no-headers | awk '{print $1"% CPU"}'
Delete node
sudo systemctl stop emped
sudo systemctl disable emped
sudo rm -rf /etc/systemd/system/emped.service
sudo rm $(which emped)
sudo rm -rf $HOME/.empe-chain
sudo rm -rf $HOME/emped
Last updated