๐ก Useful commands
โ๏ธ Service Commands
Check Logs
sudo journalctl -u pellcored -f -o cat
Node Sync Status
while true; do
rpc_endpoint=$(grep -m 1 -oP '^laddr = "\K[^"]+' "$HOME/.pellcored/config/config.toml" | cut -d ':' -f 3)
local_height=$(curl -s localhost:$rpc_endpoint/status | jq -r '.result.sync_info.latest_block_height')
network_height=$(curl -s https://rpc.unitynodes.com/pell-testnet/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
Start service
sudo systemctl start pellcored
Stop service
sudo systemctl stop pellcored
Restart service
sudo systmctl restart pellcored
Check status
sudo systemctl status pellcored
Enable Service
sudo systemctl enable pellcored
Reload service
sudo systemctl daemon-reload
Disable service
sudo systemctl disable pellcored
View the ports used node
ss -tulpn | grep pellcored
โ๏ธ Key Command
Create new wallet
pellcored keys add wallet
Recovery wallet
pellcored keys add wallet --recover
List all wallet
pellcored keys list
Delete wallet
pellcored keys delete wallet
Export wallet
pellcored keys export wallet
Import wallet
pellcored keys import wallet wallet.backup
Check wallet balance
pellcored q bank balances $(pellcored keys show wallet -a)
pellcored q bank balances "Any other or your wallet"
โ๏ธ Validator Commands
Create validator
cd $HOME
echo "{\"pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"$(pellcored tendermint show-validator)\"},
\"amount\": \"1000000apell\",
\"moniker\": \"\",
\"identity\": \"\",
\"website\": \"\",
\"security\": \"\",
\"details\": \"\",
\"commission-rate\": \"0.1\",
\"commission-max-rate\": \"0.2\",
\"commission-max-change-rate\": \"0.01\",
\"min-self-delegation\": \"1\"
}" > $HOME/.pellcored/config/validator.json
pellcored tx staking create-validator validator.json \
--from wallet \
--chain-id ignite_186-1 \
--gas auto --gas-adjustment 1.5 --fees 50apell
โฝ 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:
cd $HOME
echo "{\"pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"$(pellcored tendermint show-validator)\"},
\"amount\": \"1000000apell\",
\"moniker\": \"Unity\", #Validator name, displayed in explorers.
\"identity\": \"\", #Use your KeyBase ID. If you don't have one, leave it empty.
\"website\": \"mywebsite.com\", #Your website is available, or leave the field blank
\"security\": \"\",
\"details\": \"\",
\"commission-rate\": \"0.1\",
\"commission-max-rate\": \"0.2\",
\"commission-max-change-rate\": \"0.01\",
\"min-self-delegation\": \"1\"
}" > $HOME/.pellcored/config/validator.json
pellcored tx staking create-validator validator.json \
--from wallet \
--chain-id ignite_186-1 \
--gas auto --gas-adjustment 1.5 --fees 50apell
Update validator information
pellcored tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "$MONIKER" \
--identity "" \
--details "" \
--from $WALLET \
--chain-id ignite_186-1 \
--gas auto --gas-adjustment 1.5 \
-y
Validator details
pellcored q staking validator $(pellcored keys show $WALLET --bech val -a)
Jailing info
pellcored q staking validator $(pellcored keys show wallet --bech val -a) | grep -E "jailed"
If "true" - your validator is jailed // "false" - your validator is not jailed
Unjail command
pellcored tx slashing unjail --from $WALLET --chain-id ignite_186-1 --gas auto --gas-adjustment 1.5 -y
Information about delegation at your validator
pellcored q staking validator $(pellcored keys show wallet --bech val -a) | grep -E "tokens"
Signing Info
pellcored query slashing signing-info $(pellcored tendermint show-validator)
โ๏ธ Tokens Commands
Delegate to yourself
pellcored tx staking delegate $(pellcored keys show $WALLET --bech val -a) 1000000apell --from $WALLET --chain-id ignite_186-1 --gas auto --gas-adjustment 1.5 -y
Delegate to another validator
pellcored tx staking delegate <TO_VALOPER_ADDRESS> 1000000apell --from $WALLET --chain-id ignite_186-1 --gas auto --gas-adjustment 1.5 -y
Redelegate your stake to other validator
pellcored tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000apell --from $WALLET --chain-id ignite_186-1 --gas auto --gas-adjustment 1.5 -y
Unbond stake
pellcored tx staking unbond $(pellcored keys show $WALLET --bech val -a) 1000000apell --from $WALLET --chain-id ignite_186-1 --gas auto --gas-adjustment 1.5 -y
Send tokens
pellcored tx bank send wallet <TO_WALLET_ADDRESS> --from wallet --chain-id ignite_186-1 --gas-adjustment 1.5 --gas auto --gas-prices -y
Check wallet balance
pellcored q bank balances $(pellcored keys show wallet -a)
Withdraw all rewards
pellcored tx distribution withdraw-all-rewards --from $WALLET --chain-id ignite_186-1 --gas auto --gas-adjustment 1.5
Withdraw rewards and commission from your validator
pellcored tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id ignite_186-1 --gas auto --gas-adjustment 1.5 -y
โ๏ธ Governance
List All Proposals
pellcored query gov proposals
View proposal by ID
pellcored query gov proposal ID
Vote "YES"
pellcored tx gov vote 1 yes --from wallet -chain-id ignite_186-1 --gas auto --gas-adjustment 1.5 -y
Vote "NO"
pellcored tx gov vote 1 no --from wallet -chain-id ignite_186-1 --gas auto --gas-adjustment 1.5 -y
Vote "NO_WITH_VETO"
pellcored tx gov vote 1 NoWithVeto --from wallet -chain-id ignite_186-1 --gas auto --gas-adjustment 1.5 -y
Vote "ABSTAIN"
pellcored tx gov vote 1 abstain --from wallet -chain-id ignite_186-1 --gas auto --gas-adjustment 1.5 -y
Create new text proposal
pellcored tx gov submit-proposal \
--title="Title" \ #Change Title
--description="Description" \
--deposit=1000000apell \
--type="Text" \ #Change text proposal
--from=wallet \ #Change name wallet
--gas auto --gas-adjustment 1.5 \
-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/.pellcored/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/.pellcored/config/config.toml
sed -i.bak -e "s%:26657%:29657%g" $HOME/.pellcored/config/client.toml
sudo systemctl restart pellcored && sudo journalctl -u pellcored -f -o cat
Set Indexer
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.pellcored/config/config.toml
sed -i 's|^indexer *=.*|indexer = "kv"|' $HOME/.pellcored/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/.pellcored/config/app.toml
Reset node
pellcored tendermint unsafe-reset-all --home $HOME/.pellcored --keep-addr-book
Get Node Peer
echo $(pellcored tendermint show-node-id)'@'$(wget -qO- eth0.me)':'$(cat $HOME/.pellcored/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Resource usage (CPU, RAM, SSD) of a node.
echo "Used:"
echo "CPU: $(ps -C pellcored -o %cpu --no-headers 2>/dev/null | awk '{printf("%.2f%%\n", $1)}')"
echo "RAM: $(ps -p $(pgrep pellcored) -o rss= 2>/dev/null | awk '{printf("%.2f MB\n", $1/1024)}')"
echo "SSD: $(du -sh $HOME/.pellcored/ 2>/dev/null | awk '{print $1}')"
Delete node
sudo systemctl stop pellcored
sudo systemctl disable pellcored
sudo rm -rf /etc/systemd/system/pellcored.service
sudo rm $(which pellcored)
sudo rm -rf $HOME/.pellcored
Last updated