Useful commands
Service operations ⚙️
Check logs
sudo journalctl -u blockxd -f
Start service
sudo systemctl start blockxd
Stop service
sudo systemctl stop blockxd
Restart service
sudo systemctl restart blockxd
Check service status
sudo systemctl status blockxd
Reload services
sudo systemctl daemon-reload
Enable Service
sudo systemctl enable blockxd
Disable Service
sudo systemctl disable blockxd
Sync info
blockxd status 2>&1 | jq .SyncInfo
Node info
blockxd status 2>&1 | jq .NodeInfo
Your node peer
echo $(blockxd tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.blockxd/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Key management
Add New Wallet
blockxd keys add $WALLET
Restore executing wallet
blockxd keys add $WALLET --recover
List All Wallets
blockxd keys list
Delete wallet
blockxd keys delete $WALLET
Check Balance
blockxd q bank balances $(blockxd keys show $WALLET -a)
Export Key (save to wallet.backup)
blockxd keys export $WALLET
View EVM Prived Key
blockxd keys unsafe-export-eth-key $WALLET
Import Key (restore from wallet.backup)
blockxd keys import $WALLET wallet.backup
Tokens
To valoper addressTo wallet addressAmount, abcx
Withdraw all rewards
blockxd tx distribution withdraw-all-rewards --from $WALLET --chain-id blockx_100-1 --gas=300000 --gas-prices=1000000000abcx
Withdraw rewards and commission from your validator
blockxd tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id blockx_100-1 --gas=300000 --gas-prices=1000000000abcx -y
Check your balance
blockxd query bank balances $WALLET_ADDRESS
Delegate to Yourself
blockxd tx staking delegate $(blockxd keys show $WALLET --bech val -a) 1000000abcx --from $WALLET --chain-id blockx_100-1 --gas=300000 --gas-prices=1000000000abcx -y
Delegate
blockxd tx staking delegate <TO_VALOPER_ADDRESS> 1000000abcx --from $WALLET --chain-id blockx_100-1 --gas=300000 --gas-prices=1000000000abcx -y
Redelegate Stake to Another Validator
blockxd tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000abcx --from $WALLET --chain-id blockx_100-1 --gas=300000 --gas-prices=1000000000abcx -y
Unbond
blockxd tx staking unbond $(blockxd keys show $WALLET --bech val -a) 1000000abcx --from $WALLET --chain-id blockx_100-1 --gas=300000 --gas-prices=1000000000abcx -y
Transfer Funds
blockxd tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000abcx --gas=300000 --gas-prices=1000000000abcx -y
Validator operations
MonikerIdentityDetailsAmount, abcxCommission rateCommission max rateCommission max change rate
Create New Validator
blockxd tx staking create-validator \
--amount 1000000abcx \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(blockxd tendermint show-validator) \
--moniker "$MONIKER" \
--identity "" \
--details "I love blockchain 💚" \
--chain-id blockx_100-1 \
--gas=300000 --gas-prices=1000000000abcx \
-y
Edit Existing Validator
blockxd tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "I love blockchain 💚" \
--from $WALLET \
--chain-id blockx_100-1 \
--gas=300000 --gas-prices=1000000000abcx \
-y
Validator info
blockxd status 2>&1 | jq .ValidatorInfo
Validator Details
blockxd q staking validator $(blockxd keys show $WALLET --bech val -a)
Jailing info
blockxd q slashing signing-info $(blockxd tendermint show-validator)
Slashing parameters
blockxd q slashing params
Unjail validator
blockxd tx slashing unjail --from $WALLET --chain-id blockx_100-1 --gas=300000 --gas-prices=1000000000abcx -y
Active Validators List
blockxd 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
Check Validator key
[[ $(blockxd q staking validator $VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(blockxd status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "Your key status is ok" || echo -e "Your key status is error"
Signing info
blockxd q slashing signing-info $(blockxd tendermint show-validator)
Governance
TitleDescriptionDeposit, abcx
Create New Text Proposal
blockxd tx gov submit-proposal \
--title "" \
--description "" \
--deposit 1000000abcx \
--type Text \
--from $WALLET \
--gas=300000 --gas-prices=1000000000abcx \
-y
Proposals List
blockxd query gov proposals
Proposal IDProposal optionYesNoNo with vetoAbstain
View proposal
blockxd query gov proposal 1
Vote
blockxd tx gov vote 1 yes --from $WALLET --chain-id blockx_100-1 --gas=300000 --gas-prices=1000000000abcx -y
Last updated