πŸ’‘ Useful commands

βš™οΈ Service Commands

Check Logs

sudo journalctl -u symphonyd -f -o cat

Start service

sudo systemctl start symphonyd

Stop service

sudo systemctl stop symphonyd 

Restart service

sudo systmctl restart symphonyd 

Check status

sudo systemctl status symphonyd 

Enable Service

sudo systemctl enable symphonyd 

Reload service

sudo systemctl daemon-reload

Disable service

sudo systemctl disable symphonyd 

Check synchronization status

symphonyd status | jq | grep "catching_up"

If "true" - not synchronized // "false" - synchronized

Check the latest block of your validator and the last block of the network

local_height=$(symphonyd status | jq -r .sync_info.latest_block_height); network_height=$(curl -s https://rpc.symphony-testnet.unitynodes.com/status | jq -r .result.sync_info.latest_block_height); blocks_left=$((network_height - local_height)); echo "Your node height: $local_height"; echo "Network height: $network_height"; echo "Blocks left: $blocks_left"

Example:

View the ports used node

ss -tulpn | grep symphonyd 

βš™οΈ Key Command

Create new wallet

symphonyd keys add wallet

Recovery wallet

symphonyd keys add wallet --recover

List all wallet

symphonyd keys list

Delete wallet

symphonyd keys delete wallet

Export wallet

symphonyd keys export wallet

Import wallet

symphonyd keys import wallet wallet.backup 

Check wallet balance

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

βš™οΈ Validator Commands

Create validator

symphonyd tx staking create-validator \
--amount 1000000note \
--pubkey $(symphonyd tendermint show-validator) \
--moniker "$YOUR_MONIKER" \ #Validator name, displayed in explorers.
--identity "" \ #Use your KeyBase ID. If you don't have one, leave it empty.
--website "" \ #Your website is available, or leave the field blank
--details "" \ #Any details about your validator.
--from wallet \ # Change the wallet name if you have a different one
--chain-id symphony-testnet-3 \
--gas-adjustment 1.4 \
--gas auto \
--fees 5000note \
-y

You can leave the text after # unchanged - it's a commented hint that won't affect validator creation.

β—½ 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.

Replace all necessary values indicated above with the $ sign to successfully create your validator. β—½ Example:

symphonyd tx staking create-validator \
--amount 1000000note \
--pubkey $(symphonyd tendermint show-validator) \
--moniker "Unity Nodes" \ #Validator name, displayed in explorers.
--identity "" \ #Use your KeyBase ID. If you don't have one, leave it empty.
--website "https://unitynodes.com" \ #Your website is available, or leave the field blank
--details "A reliable validator of your network" \ #Any details about your validator.
--from wallet \ # Change the wallet name if you have a different one
--chain-id symphony-testnet-3 \
--gas-adjustment 1.4 \
--gas auto \
--fees 5000note \
-y

Update validator information

symphonyd tx staking edit-validator --new-moniker "" --identity "" --details "" --website "" --chain-id symphony-testnet-2 --commission-rate 0.05 --from wallet --gas-adjustment 1.4 --gas auto --gas-prices 0.025note -y

Validator details

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

Jailing info

symphonyd q mstaking validator $(symphonyd keys show wallet --bech val -a) | grep -E "jailed"

If "true" - your validator is jailed // "false" - your validator is not jailed

Jail reason

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

Unjail command

symphonyd tx slashing unjail --from wallet --chain-id symphony-testnet-2 --gas-adjustment 1.4 --gas auto --gas-prices 0.025note -y

Information about delegation at your validator

symphonyd q staking validator $(symphonyd keys show wallet --bech val -a) | grep -E "tokens"

Active Validators list

symphonyd 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

symphonyd 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

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

βš™οΈ Tokens Commands

Delegate to yourself

symphonyd tx staking delegate $(symphonyd keys show wallet --bech val -a) 1000000note --from wallet --chain-id symphony-testnet-3 --gas-adjustment 1.4 --gas auto --gas-prices 0.025note -y

Delegate to another validator

symphonyd tx staking delegate TO_VALOPER_ADDRESS 1000000note --from wallet --chain-id symphony-testnet-3 --gas-adjustment 1.4 --gas auto --gas-prices 0.025note -y

Redelegate your stake to other validator

symphonyd tx staking redelegate $(symphonyd keys show wallet --bech val -a) TO_VALOPER_ADDRESS 1000000note --from wallet --chain-id symphony-testnet-3 --gas-adjustment 1.4 --gas auto --gas-prices 0.025note -y

Unbond stake

symphonyd tx staking unbond $(symphonyd keys show wallet --bech val -a) 1000000note --from wallet --chain-id symphony-testnet-3 --gas-adjustment 1.4 --gas auto --gas-prices 0.025note -y

Send tokens

symphonyd tx bank send wallet TO_WALLET_ADDRESS 1000000note --from wallet --chain-id symphony-testnet-3 --gas-adjustment 1.4 --gas auto --gas-prices 0.025note -y

Check wallet balance

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

Transaction details

symphonyd query tx HASH_TX

Withdraw all rewards

symphonyd tx distribution withdraw-all-rewards --from $WALLET --chain-id symphony-testnet-3 --gas=auto -y

Withdraw rewards and commission from your validator

symphonyd tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id symphony-testnet-3 --gas=auto -y

βš™οΈ Governance

List All Proposals

symphonyd query gov proposals

View proposal by ID

symphonyd query gov proposal ID

Vote "YES"

symphonyd tx gov vote PROPOSAL_ID yes --from wallet --chain-id symphony-testnet-3 --gas-adjustment 1.4 --gas "auto" -y

Vote "NO"

symphonyd tx gov vote PROPOSAL_ID no --from wallet --chain-id symphony-testnet-3 --gas-adjustment 1.4 --gas "auto" -y

Vote "NO_WITH_VETO"

symphonyd tx gov vote PROPOSAL_ID no_with_veto --from wallet --chain-id symphony-testnet-3 --gas-adjustment 1.4 --gas "auto" -y

Vote "ABSTAIN"

symphonyd tx gov vote PROPOSAL_ID abstain --from wallet --chain-id symphony-testnet-3 --gas-adjustment 1.4 --gas "auto" -y

Create new text proposal

symphonyd tx gov submit-proposal \
--title="Title" \ #Change Title
--description="Description" \
--deposit=1000000note \
--type="Text" \   #Change text proposal
--from=wallet \   #Change name wallet
--gas-prices 0note \ 
--gas-adjustment 1.4 \
--gas "auto" \
-y 

βš™οΈ Utility

Set Custom Port

# Change CUSTOM_PORT to any other value, or leave it as is.
CUSTOM_PORT=25
sed -i.bak -e "s%:26658%:${CUSTOM_PORT}658%; s%:26657%:${CUSTOM_PORT}657%; s%:6060%:${CUSTOM_PORT}060%; s%:26656%:${CUSTOM_PORT}656%; s%:26660%:${CUSTOM_PORT}660%" $HOME/.symphonyd/config/config.toml && sed -i.bak -e "s%:9090%:${CUSTOM_PORT}090%; s%:9091%:${CUSTOM_PORT}091%; s%:1317%:${CUSTOM_PORT}317%; s%:8545%:${CUSTOM_PORT}545%; s%:8546%:${CUSTOM_PORT}546%; s%:6065%:${CUSTOM_PORT}065%" $HOME/.symphonyd/config/app.toml && sed -i.bak -e "s%:26657%:${CUSTOM_PORT}657%" $HOME/.symphonyd/config/client.toml
sudo systemctl restart symphonyd
journalctl -u symphonyd -f -o cat

Set Indexer

  • null: Disables indexing, reducing the use of server resources, but does not allow fast data searches.

  • kv: Enables key-value indexing, which increases CPU and disk usage, but improves the speed of indexed data queries.

Indexing allows faster processing of requests, but can increase the load on server resources.

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

Update Pruning

Prunig allows blockchain nodes to delete old transaction data to reduce disk space usage, while retaining the information necessary to ensure the security and operation of the network.

Pruning configuration - 100/0/10

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 = "10"|' $HOME/.symphonyd/config/app.toml

Reset node

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

Get denom info

symphonyd q bank denom-metadata -oj | jq

Get Node Peer

echo $(symphonyd tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.symphonyd/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/.symphonyd/

How much RAM use node (currently)

ps -p $(pgrep symphonyd) -o rss= | awk '{printf("The process uses memory:: %.2f MB\n", $1/1024)}'

How much CPU use node (currently)

ps -C symphonyd -o %cpu --no-headers | awk '{print $1"% CPU"}'

Delete node

sudo systemctl stop symphonyd
sudo systemctl disable symphonyd
sudo rm -rf /etc/systemd/system/symphonyd.service
sudo rm $(which symphonyd)
sudo rm -rf $HOME/.symphonyd
sudo rm -rf $HOME/symphony

Last updated