Monkey Labs Services
  • Services Mainnet
    • Mantra
  • Services Testnet
    • Fiamma
      • 🌪️Installation
      • Upgrade
      • Snapshot
      • Useful commands
    • Mantra
      • Installation
      • Upgrade
      • Snapshot
      • State sync
      • Useful commands
      • Peers -> Seeds -> Addrbook
    • Nillion
      • Installation
      • Upgrade
      • Snapshot
      • State sync
      • Peers -> Seeds -> Addrbook
      • Useful commands
    • Prysm
      • Installation
      • Upgrade
      • Snapshot
      • State sync
      • Peers -> Seeds -> Addrbook
      • Useful commands
    • Pryzm
      • Installation
      • Upgrade
      • Snapshot
      • State sync
      • Useful commands
    • Titan Network
      • Installation
      • Upgrade
      • Snapshot
      • State sync
      • Peers -> Seeds -> Addrbook
      • Useful commands
    • Zenrock
      • Installation
      • Upgrade
      • Snapshot
      • State sync
      • Peers -> Seeds -> Addrbook
      • Useful commands
    • Xrpd
      • Installation
      • Upgrade
      • Snapshot
      • State sync
      • Peers -> Seeds -> Addrbook
      • Useful commands
Powered by GitBook
On this page
  1. Services Testnet
  2. Pryzm

State sync

sudo systemctl stop pryzmd

cp $HOME/.pryzm/data/priv_validator_state.json $HOME/.pryzm/priv_validator_state.json.backup
pryzmd tendermint unsafe-reset-all --home $HOME/.pryzm

peers="713307ce72306d9e86b436fc69a03a0ab96b678f@pryzm-testnet-peer.itrocket.net:41656,b3a4daf60680c164b3cd0e0700e640a8ee097bd2@100.42.184.232:41656,fb86984e8d633cc23bfd1187f39cb8bd95e686b9@84.247.136.140:23256,6e0ac6daac63bc2bedbad8c783b20bd3141c0556@79.133.57.214:26656,cdcd86ca01858275d0e78ee66b82109ee06df454@65.108.72.253:40656,486c8e5c2f128cc6424773891b8bfa2b02890495@194.163.137.83:23256,77742736883a4ca761d6a49dca5958365faceb75@62.169.29.219:23256,35b694e524e18b3cdbc591e9718a2eb7d691612a@185.208.206.180:41656,db0e0cff276b3292804474eb8beb83538acf77f5@195.14.6.192:26656"  
SNAP_RPC="https://pryzm-testnet-rpc.itrocket.net:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.pryzm/config/config.toml 

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) 

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && sleep 2

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/.pryzm/config/config.toml

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

sudo systemctl restart pryzmd && sudo journalctl -u pryzmd -f

Wasm

Sorry, this project does not support WebAssembly.

PreviousSnapshotNextUseful commands

Last updated 5 months ago