Skip to content

Instantly share code, notes, and snippets.

View asverty's full-sized avatar

alekh_w asverty

View GitHub Profile
#list of validators in one cmd:
iond q staking validators -o json --limit=2000 --node $DP_TCP \
| jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' \
| jq -r '.tokens + " - " + .description.moniker' \
| sort -gr | nl
#validator info:
iond q staking validator $DP_VLPR --node $DP_TCP
#I added to main cmd: --identity, --details, --security-contact, #--website
iond tx staking create-validator \
--amount=10000000000idep \
--pubkey=$(iond tendermint show-validator) \
--moniker="$DP_NDNM" \
--chain-id="$DP_CHN" \
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
#wait for sync status "catching_up": false
curl -s localhost:26652/status
#display wallet address
iond keys show $DP_WLLT
#check the balance
#update variable with wallet address
DP_WLLT="PASTE_MY_WALLET_ADDRESS"
#keybase PGP key for identity
DP_PGPK="PASTE_MY_PGP_KEY"
#tcp variable for --node
iond keys add $DP_WLLT
#reload daemon, enable service, restrat service in one cmd
sudo systemctl daemon-reload && sudo systemctl enable iond && sudo systemctl restart iond
#check logs
journalctl -u iond -f
#check status in my case 26652 instead 26657
cat $HOME/.ion/config/config.toml | grep "tcp"
cat $HOME/.ion/config/config.toml | grep "pprof_laddr"
cat $HOME/.ion/config/config.toml | grep "prometheus_listen_addr"
cat $HOME/.ion/config/app.toml | grep "tcp"
cat $HOME/.ion/config/app.toml | grep "address"
#check the ports
netstat -ntlp | grep LISTEN
#if ports open, set from -> to in config.toml
#26658 -> 26653
#26657 -> 26652
#6060 -> 6061
#26656 -> 26651
#26660 -> 26655
sudo tee <<EOF >/dev/null /etc/systemd/system/iond.service
[Unit]
Description=IDEP_NODE
After=network-online.target
[Service]
User=$USER
ExecStart=$(which iond) start
Restart=always
RestartSec=10
LimitNOFILE=65535
#delete old genesis
rm $HOME/.ion/config/genesis.json
#download new genesis
wget -O $HOME/.ion/config/genesis.json "https://raw.githubusercontent.com/IDEP-network/incentivized-testnet/main/binary/genesis.json"
#reset the state of database