Indonode
Explorer
  • Home
  • Mainnet
    • Planq
      • Node Installation
      • Snapshot
      • Upgrade
      • CLI Cheatsheet
    • Chain4Energy
      • Node Installation
      • Upgrade
      • CLI Cheatsheet
    • Bitcanna
      • Node Installation
      • Snapshot
      • Statesync
      • Upgrade
      • CLI Cheatsheet
    • Band
      • Node Installation
      • Yoda Configuration
      • Snapshot
      • Upgrade
      • CLI Cheatsheet
    • Source
      • Node Installation
      • Snapshot
      • Statesync
      • Upgrade
      • CLI Cheatsheet
    • SGE
      • Node Installation
      • Snapshot
      • Statesync
      • Upgrade
      • CLI Cheatsheet
  • Testnet
    • Chain4Energy
      • Node Installation
      • Upgrade
      • CLI Cheatsheet
    • Selfchain
      • Node Installation
      • Upgrade
      • CLI Cheatsheet
    • Entangle
      • Node Installation
      • Snapshot
      • Upgrade
      • CLI Cheatsheet
    • Mantra
      • Node Installation
      • Snapshot
      • Upgrade
      • CLI Cheatsheet
    • Entrypoint
      • Node Installation
      • Snapshot
      • Statesync
      • Upgrade
      • CLI Cheatsheet
    • Nulink
      • Worker Installation
      • Bond Worker
      • Update Worker
    • Namada
      • Node Installation
      • Useful Commands
  • Other
Powered by GitBook
On this page
  • Statesync
  • Download WASM
PreviousSnapshotNextUpgrade

Last updated 1 year ago

Statesync


Latest Version
Chain-id
Wasm

v3.0.0

source-1

ENABLED

Statesync

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


STATE_SYNC_RPC=https://rpc.source.indonode.net:443
STATE_SYNC_PEER=7e153e83fbe2f5618fffbdfd803f70ee78ad797d@rpc.source.indonode.net:12656
LATEST_HEIGHT=$(curl -s $STATE_SYNC_RPC/block | jq -r .result.block.header.height)
SYNC_BLOCK_HEIGHT=$(($LATEST_HEIGHT - 1000))
SYNC_BLOCK_HASH=$(curl -s "$STATE_SYNC_RPC/block?height=$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash)

sed -i \
  -e "s|^enable *=.*|enable = true|" \
  -e "s|^rpc_servers *=.*|rpc_servers = \"$STATE_SYNC_RPC,$STATE_SYNC_RPC\"|" \
  -e "s|^trust_height *=.*|trust_height = $SYNC_BLOCK_HEIGHT|" \
  -e "s|^trust_hash *=.*|trust_hash = \"$SYNC_BLOCK_HASH\"|" \
  -e "s|^persistent_peers *=.*|persistent_peers = \"$STATE_SYNC_PEER\"|" \
  $HOME/.source/config/config.toml

mv $HOME/.source/priv_validator_state.json.backup $HOME/.source/data/priv_validator_state.json

Download WASM

curl -L https://snapshots.indonode.net/source/wasm.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.source
sudo systemctl start sourced && sudo journalctl -u sourced -f