Key management
Add new key
Copy junctiond keys add $AIRCHAIN_WALLET
Recover existing key
Copy junctiond keys add $AIRCHAIN_WALLET --recover
List all keys
Delete key
Copy junctiond keys delete $AIRCHAIN_WALLET
Export key to the file
Copy junctiond keys export $AIRCHAIN_WALLET
Import key from the file
Copy junctiond keys import $AIRCHAIN_WALLETwallet.backup
Query wallet balance
Copy junctiond q bank balances $(junctiond keys show $AIRCHAIN_WALLET -a)
Validator management
Please make sure you have adjusted moniker , identity and details to match your values.
Create new validator
Copy cd $HOME
# Create validator.json file
echo "{\"pubkey\":{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"$(junctiond comet show-validator | grep -Po '\"key\":\s*\"\K[^"]*')\"},
\"amount\": \"1000000amf\",
\"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
junctiond tx staking create-validator validator.json \
--from $AIRCHAIN_WALLET \
--chain-id junction \
--fees 200amf \
Edit existing validator
Copy junctiond tx staking edit-validator \
--commission-rate 0.1 \
--new-moniker "" \
--identity "" \
--details "" \
--from $AIRCHAIN_WALLET \
--chain-id junction \
--fees 200amf \
-y
Unjail validator
Copy junctiond tx slashing unjail --from $AIRCHAIN_WALLET --chain-id junction --fees 200amf -y
List all active validators
Copy junctiond 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
View validator details
Copy junctiond q staking validator $(junctiond keys show $AIRCHAIN_WALLET --bech val -a)
Token management
Withdraw rewards from all validators
Copy junctiond tx distribution withdraw-all-rewards --from $WALLET --chain-id junction --fees 200amf
Withdraw commission and rewards from your validator
Copy junctiond tx distribution withdraw-rewards $VALOPER_ADDRESS --from $WALLET --commission --chain-id junction --fees 200amf -y
Delegate tokens to yourself
Copy junctiond tx staking delegate $(junctiond keys show $WALLET --bech val -a) 1000000amf --from $WALLET --chain-id junction --fees 200amf -y
Delegate tokens to validator
Copy junctiond tx staking delegate <TO_VALOPER_ADDRESS> 1000000amf --from $WALLET --chain-id junction --fees 200amf -y
Redelegate tokens to another validator
Copy junctiond tx staking redelegate $VALOPER_ADDRESS <TO_VALOPER_ADDRESS> 1000000amf --from $WALLET --chain-id junction --fees 200amf -y
Unbond tokens from your validator
Copy junctiond tx staking unbond $(junctiond keys show $WALLET --bech val -a) 1000000amf --from $WALLET --chain-id junction --fees 200amf -y
Send tokens to the wallet
Copy junctiond tx bank send $WALLET_ADDRESS <TO_WALLET_ADDRESS> 1000000amf --fees 200amf -y
Governance
List all proposals
Copy junctiond query gov proposals
View proposal by id
Copy junctiond query gov proposal 1
Vote 'Yes'
Copy junctiond tx gov vote 1 yes --from $WALLET --chain-id junction --fees 200amf -y
Vote 'No'
Copy junctiond tx gov vote 1 no --from $WALLET --chain-id junction --fees 200amf -y
Vote 'Abstain'
Copy junctiond tx gov vote 1 abstain --from $WALLET --chain-id junction --fees 200amf -y
Vote 'NoWithVeto'
Copy junctiond tx gov vote 1 no_with_veto --from $WALLET --chain-id junction --fees 200amf -y
Utility
Update ports
Copy CUSTOM_PORT=110
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${CUSTOM_PORT}58\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${CUSTOM_PORT}57\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${CUSTOM_PORT}60\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${CUSTOM_PORT}56\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${CUSTOM_PORT}66\"%" $HOME/.junction/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${CUSTOM_PORT}17\"%; s%^address = \":8080\"%address = \":${CUSTOM_PORT}80\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${CUSTOM_PORT}90\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${CUSTOM_PORT}91\"%" $HOME/.junction/config/app.toml
🚨 Maintenance
Get validator info
Copy junctiond status 2>&1 | jq .ValidatorInfo
Get sync info
Copy junctiond status 2>&1 | jq .SyncInfo
Get node peer
Copy echo $(junctiond tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.0gchain/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Check if validator key is correct
Copy [[ $(junctiond q staking validator $(0gchaind keys show wallet --bech val -a) -oj | jq -r .consensus_pubkey.key) = $(stchaind status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "\n\e[1m\e[32mTrue\e[0m\n" || echo -e "\n\e[1m\e[31mFalse\e[0m\n"
Get live peers
Copy curl -sS http://localhost:26657/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}'
Reset chain data
Copy junctiond tendermint unsafe-reset-all --keep-addr-book --home $HOME/.junctiond --keep-addr-book
Remove node
Please, before proceeding with the next step! All chain data will be lost! Make sure you have backed up your priv_validator_key.json !
Copy sudo systemctl stop junctiond
sudo systemctl disable 0junctiond
sudo rm -rf /etc/systemd/system/junctiond.service
sudo rm $(which junctiond)
sudo rm -rf $HOME/.junctiond
sed -i "/AIRCHAIN_/d" $HOME/.bash_profile
Service Management
Reload service configuration
Copy sudo systemctl daemon-reload
Enable service
Copy sudo systemctl enable junctiond
Disable service
Copy sudo systemctl disable junctiond
Start service
Copy sudo systemctl start junctiond
Stop service
Copy sudo systemctl stop junctiond
Restart service
Copy sudo systemctl restart junctiond
Check service status
Copy sudo systemctl status junctiond
Check service logs
Copy sudo journalctl -u junctiond -f --no-hostname -o cat
Last updated 9 months ago