Useful Commands

Service Management

Reload service configuration

sudo systemctl daemon-reload

Enable service

sudo systemctl enable prysmd

Disable service

sudo systemctl disable prysmd

Start service

sudo systemctl start prysmd

Stop service

sudo systemctl stop prysmd

Restart service

sudo systemctl restart prysmd

Check service status

sudo systemctl status prysmd

Check service logs

sudo journalctl -u prysmd -f

Key management

Add New Wallet

prysmd keys add wallet

Restore executing wallet

prysmd keys add wallet --recover

List All Wallets

prysmd keys list

Delete wallet

prysmd keys delete wallet

Check Balance

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

Export key to a file

prysmd keys export wallet

View EVM Prived Key

prysmd keys unsafe-export-eth-key wallet

Import key from a file

prysmd keys import wallet wallet.backup

Token management

Withdraw rewards from all validators

prysmd tx distribution withdraw-all-rewards --from wallet --chain-id prysm-devnet-1 --gas auto --gas-adjustment 1.5 --fees 6000uprysm 

Withdraw commission and rewards from your validator

prysmd tx distribution withdraw-rewards $(prysmd keys show wallet --bech val -a) --commission --from wallet --chain-id prysm-devnet-1 --gas auto --gas-adjustment 1.5 --fees 6000uprysm -y 

Delegate tokens to yourself

prysmd tx staking delegate $(prysmd keys show wallet --bech val -a) 1000000uprysm --from wallet --chain-id prysm-devnet-1 --gas auto --gas-adjustment 1.5 --fees 6000uprysm -y 

Delegate tokens to validator

prysmd tx staking delegate <TO_VALOPER_ADDRESS> 1000000uprysm --from wallet --chain-id prysm-devnet-1 --gas auto --gas-adjustment 1.5 --fees 6000uprysm -y 	

Redelegate tokens to another validator

prysmd tx staking redelegate $(prysmd keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uprysm --from wallet --chain-id prysm-devnet-1 --gas auto --gas-adjustment 1.5 --fees 6000uprysm -y 	

Unbond tokens from your validator

prysmd tx staking unbond $(prysmd keys show wallet --bech val -a) 1000000uprysm --from walletT --chain-id prysm-devnet-1 --gas auto --gas-adjustment 1.5 --fees 6000uprysm -y 

Send tokens to the wallet

prysmd tx bank send wallet <TO_WALLET_ADDRESS> 1000000uprysm --gas auto --gas-adjustment 1.5 --fees 6000uprysm -y 

Validator operations

Create New Validator

gcd $HOME
# Create validator.json file
echo "{\"pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"$(prysmd comet show-validator | grep -Po '\"key\":\s*\"\K[^"]*')\"},
    \"amount\": \"1000000uprysm\",
    \"moniker\": \"test\",
    \"identity\": \"\",
    \"website\": \"\",
    \"security\": \"\",
    \"details\": \"\",
    \"commission-rate\": \"0.1\",
    \"commission-max-rate\": \"0.2\",
    \"commission-max-change-rate\": \"0.01\",
    \"min-self-delegation\": \"1\"
}" > validator.json
# Create a validator using the JSON configuration
prysmd tx staking create-validator validator.json \
    --from wallet \
    --chain-id prysm-devnet-1 \
	--gas auto --gas-adjustment 1.5 --fees 6000uprysm

Edit Existing Validator

prysmd tx staking edit-validator \
--new-moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id prysm-devnet-1 \
--commission-rate 0.05 \
--from Wallet_Name \
--gas 350000 -y

Get sync info

prysmd status 2>&1 | jq .SyncInfo

Validator info

prysmd status 2>&1 | jq .ValidatorInfo

Validator Details

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

Jailing info

prysmd q slashing signing-info $(prysmd tendermint show-validator) 

Slashing parameters

prysmd q slashing params 

Unjail validator

prysmd tx slashing unjail --from wallet --chain-id prysm-devnet-1 --gas auto --gas-adjustment 1.5 --fees 6000uprysm -y 

Delete node

cd $HOME
sudo systemctl stop prysmd
sudo systemctl disable prysmd
sudo rm -rf /etc/systemd/system/prysmd.service
sudo rm $(which prysmd)
sudo rm -rf $HOME/.prysm
sed -i "/PRYSM_/d" $HOME/.bash_profile

Last updated