CosmoBook nodes
  • README
  • Cosmos validator node guides
    • defund
      • defund_on_akash
      • old_defund-private-1
        • install_node
    • haqq
      • install_node
    • humans
      • commands
      • install_mainnet
      • install_testnet
      • Statesync instructions
      • Upgrade mainnet validator node
    • hypersign
      • install_node
    • ollo
      • install_node
    • paloma
      • install_node
    • quicksilver
      • install_node
    • rebus
      • install_node
      • install_with_cosmovisor
    • sei
      • Gentx for Sei Incentivized testnet (chain-id atlantic-1)
      • install_node
      • old_sei-testnet-2
        • install_node
    • stafi
      • install_node
    • stride
      • install_node
      • old_stride1
        • install_node
      • old_stride2
        • install_node
    • ununifi
      • install_node
  • polkadot
    • subspace
      • install_node
  • starknet
    • StarkNet node
  • usefull utils
    • List of usefull commands
    • cosmos_monitoring
      • install_guide
    • relayer_hermes
      • Hermes relayer
    • relayer_ibc_go_v.2.0.0
    • Faucet
  • blockclique
    • massa
      • install_node
  • ethereum
    • masa_finance
      • install_node
    • obol
      • Charon Distributed Validator Node
Powered by GitBook
On this page
  • Get state sync information
  • Configure the state sync
  • Set peers
  • Stop the service and reset the data
  • Restart the service and check the log
  1. Cosmos validator node guides
  2. humans

Statesync instructions

Get state sync information

RPC=https://humans-rpc.creeptah.xyz:443 && \
LATEST_HEIGHT=$(curl -s $RPC/block | jq -r .result.block.header.height) && \
SYNC_BLOCK_HEIGHT=$(($LATEST_HEIGHT - 1000)) && \
SYNC_BLOCK_HASH=$(curl -s "$RPC/block?height=$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash) && \
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH

Configure the state sync

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$RPC,$RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ; \
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.humansd/config/config.toml

Set peers

peers="78957f3ca436c1086d08b713b9eb81d55998b1f5@65.109.159.94:15656" && \
sed -i "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/;" $HOME/.humansd/config/config.toml

Stop the service and reset the data

sudo systemctl stop humansd
cp $HOME/.humansd/data/priv_validator_state.json $HOME/.humansd/priv_validator_state.json.backup
humansd tendermint unsafe-reset-all --keep-addr-book --home $HOME/.humansd
mv $HOME/.humansd/priv_validator_state.json.backup $HOME/.humansd/data/priv_validator_state.json

Restart the service and check the log

sudo systemctl restart humansd && sudo journalctl -u humansd -f --no-hostname -o cat
Previousinstall_testnetNextUpgrade mainnet validator node

Last updated 1 year ago