RPC Endpoint
URL:
Description: This endpoint is used for connecting to the blockchain network via RPC (Remote Procedure Call).
API Endpoint
URL:
Description: This endpoint provides access to the REST API for interacting with the blockchain network.
GRPC Endpoint
Description: This endpoint is used for connecting to the blockchain network via gRPC (Google Remote Procedure Call).
Stop the service and reset the data
sudo systemctl stop {{appName}} && \
{{appName}} tendermint unsafe-reset-all --home /root/.{{dirName}} --keep-addr-book
Configure state sync information
SNAP_RPC="https://rpc.{{chainName}}.stakeup.tech:443" && \
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) && \
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && \
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.{{appName}}/config/config.toml
Restart the service and check the log
sudo systemctl restart {{appName}} && journalctl -u {{appName}} -f -o cat
Block |
Size |
Snapshot Time |
Download |
Install lz4 if needed
sudo apt install lz4
Stop service
sudo systemctl stop {{appName}}.service
Backup priv_validator_state.json
cp $HOME/.{{dirName}}/data/priv_validator_state.json $HOME/priv_validator_state.json
Remove old data and wasm
rm -rf ~/.{{dirName}}/data; \
rm -r ~/.{{dirName}}/wasm
Download snapshot
wget https://snapshots.stakeup.tech/{{chainName}}/{{chainId}}_latest.tar.lz4
lz4 -d -c {{chainId}}_latest.tar.lz4 | tar -xf - -C $HOME/.{{dirName}}
Download wasm
wget https://snapshots.stakeup.tech/{{chainName}}/wasm.tar.lz4
lz4 -d -c wasm.tar.lz4 | tar -xf - -C $HOME/.{{dirName}}
Return your priv_validator_state.json
mv $HOME/priv_validator_state.json $HOME/.{{dirName}}/data/priv_validator_state.json
Download addrbook
wget -O $HOME/.{{dirName}}/config/addrbook.json "https://snapshots.stakeup.tech/{{chainName}}/addrbook.json"
Start service and check logs
sudo systemctl restart {{appName}} && journalctl -u {{appName}} -f -o cat
Peers:
PEERS={{peersChain}}
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" ~/.{{dirName}}/config/config.toml
Seed:
SEED=6b0ffcce9b59b91ceb8eea5d4599e27707e3604a@seeds.stakeup.tech:10217
sed -i.bak -e "s/^seeds =.*/seeds = \"$SEED\"/" ~/.{{dirName}}/config/config.toml
Addrbook:
wget -O $HOME/.{{dirName}}/config/addrbook.json https://snapshots.stakeup.tech/{{chainName}}/addrbook.json
Add new wallet
{{appName}} keys add wallet
Recover wallet
{{appName}} keys add wallet --recover
List all wallets
{{appName}} keys list
Delete wallet
{{appName}} keys delete wallet
Export wallet as file
{{appName}} keys export wallet
Import wallet from a file
{{appName}} keys import wallet wallet.backup
Wallet balances
{{appName}} q bank balances $({{appName}} keys show wallet -a)
Validator operations
New validator
{{appName}} tx staking create-validator \
--amount 1000000{{tokenName}} \
--pubkey $({{appName}} tendermint show-validator) \
--moniker "YOUR_MONIKER" \
--identity "YOUR_KEYBASE" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE" \
--chain-id {{chainId}} \
--commission-rate 0.05 \
--commission-max-rate 0.20 \
--commission-max-change-rate 0.05 \
--from wallet \
--gas auto \
--fees {{feesChain}}{{tokenName}} -y
Edit validator
{{appName}} tx staking edit-validator \
--new-moniker "NEW_MONIKER" \
--identity "YOUR_KEYBASE" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE" \
--chain-id {{chainId}} \
--commission-rate 0.05 \
--from wallet \
--gas auto \
--fees {{feesChain}}{{tokenName}} -y
Unjail validator
{{appName}} tx slashing unjail --from wallet --chain-id {{chainId}} --gas auto --fees {{feesChain}}{{tokenName}} -y
Reason a jail
{{appName}} query slashing signing-info $({{appName}} tendermint show-validator)
List all active validators
{{appName}} q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
List all inactive validators
{{appName}} q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
Validator details
{{appName}} q staking validator $({{appName}} keys show wallet --bech val -a)
Token operations
Withdraw-all-rewards from validators
{{appName}} tx distribution withdraw-all-rewards --from wallet --chain-id {{chainId}} --gas auto --fees {{feesChain}}{{tokenName}} -y
Withdraw commission and reward from validator
{{appName}} tx distribution withdraw-rewards $({{appName}} keys show wallet --bech val -a) --commission --from wallet --chain-id {{chainId}} --gas auto --fees {{feesChain}}{{tokenName}} -y
Delegate to self validator
{{appName}} tx staking delegate $({{appName}} keys show wallet --bech val -a) 1000000{{tokenName}} --from wallet --chain-id {{chainId}} --gas auto --fees {{feesChain}}{{tokenName}} -y
Delegate to validator
{{appName}} tx staking delegate TO_VALOPER_ADDRESS 1000000{{tokenName}} --from wallet --chain-id {{chainId}} --gas auto --fees {{tokenName}} -y
Redelegate to other validator
{{appName}} tx staking redelegate $({{appName}} keys show wallet --bech val -a) TO_VALOPER_ADDRESS 1000000{{tokenName}} --from wallet --chain-id {{chainId}} --gas auto --fees {{feesChain}}{{tokenName}} -y
Unbond from self validator
{{appName}} tx staking unbond $({{appName}} keys show wallet --bech val -a) 1000000{{tokenName}} --from wallet --chain-id {{chainId}} --gas auto --fees {{feesChain}}{{tokenName}} -y
Transfer tokens
{{appName}} tx bank send wallet TO_WALLET_ADDRESS 1000000{{tokenName}} --from wallet --chain-id {{chainId}} --gas auto --fees {{feesChain}}{{tokenName}} -y
Governance
List all proposals
{{appName}} query gov proposals
Details for proposal
{{appName}} query gov proposal 1
Vote yes for proposal
{{appName}} tx gov vote 1 yes --from wallet --chain-id {{chainId}} --gas auto --fees {{feesChain}}{{tokenName}} -y
Vote no for proposal
{{appName}} tx gov vote 1 no --from wallet --chain-id {{chainId}} --gas auto --fees {{feesChain}}{{tokenName}} -y
Vote abstain for proposal
{{appName}} tx gov vote 1 abstain --from wallet --chain-id {{chainId}} --gas auto --fees {{feesChain}}{{tokenName}} -y
Vote veto for proposal
{{appName}} tx gov vote 1 NoWithVeto --from wallet --chain-id {{chainId}} --gas auto --fees {{feesChain}}{{tokenName}} -y
Node operations
Validator info
{{appName}} status 2>&1 | jq .ValidatorInfo
Sync info
{{appName}} status 2>&1 | jq .SyncInfo
Node peer
echo $({{appName}} tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.{{dirName}}/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Check correct privkey validator
[[ $({{appName}} q staking validator $({{appName}} keys show wallet --bech val -a) -oj | jq -r .consensus_pubkey.key) = $({{appName}} 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
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 database
{{appName}} tendermint unsafe-reset-all --keep-addr-book --home $HOME/.{{dirName}} --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!
cd $HOME
sudo systemctl stop {{appName}}.service
sudo systemctl disable {{appName}}.service
sudo rm /etc/systemd/system/{{appName}}.service
sudo systemctl daemon-reload
rm -f $(which {{appName}})
rm -rf $HOME/.{{dirName}}
rm -rf $HOME/{{dirName}}
Service operations
Reload all services
sudo systemctl daemon-reload
Enable service
sudo systemctl enable {{appName}}.service
Disable service
sudo systemctl disable {{appName}}.service
Start service
sudo systemctl start {{appName}}.service
Stop service
sudo systemctl stop {{appName}}.service
Restart Service
sudo systemctl restart {{appName}}.service
Check service status
sudo systemctl status {{appName}}.service
Check service logs
sudo journalctl -u {{appName}}.service -f --no-hostname -o cat