NodesHub Services
  • About Us
  • Mainnet
    • Atomone
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Celestia
      • Celestia-app
        • Installation
        • Upgrade
        • State Sync
        • Snapshot
          • Archive
          • Pruned
        • Public RPC
      • Bridge Node
        • Installation
        • Upgrade
        • Snapshot
    • Chihuahua
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Elys
      • Installation
      • Upgrade
      • State Sync
      • Snapshot-Pruned
      • Snapshot-Archive
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Firmachain
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Functionx
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Juno
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Kopi
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Kyve
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Mantra
      • Installation
      • Upgrade
      • State Sync
      • Snapshot-Pruned
      • Snapshot-Archive
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Nibiru
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Router
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Zetachain
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
  • Testnet
    • Og-chain
      • Full Node
        • Installation
      • Upgrade
        • State Sync
        • Snapshot
        • Public RPC
        • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
      • DA Node
        • Installation
        • Troubleshooting
        • Upgrades
      • Storage Node
        • Installation
        • Troubleshooting
        • Upgrades
      • Storage-KV
        • Installation
        • Troubleshooting
        • Upgrades
      • Storage-Cli
    • Atomone
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Celestia
      • Celestia-app
        • Installation
        • Upgrade
        • State Sync
        • Snapshot
          • Archive
          • Pruned
        • Public RPC
      • Bridge Node
        • Installation
        • Upgrade
        • Snapshot
    • Elys
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Empe
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Functionx
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Juno
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Lumera
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Mantra
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Pell
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Prysm
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Selfchain
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Symphony
      • Installation
      • Upgrade
      • Oracle
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Tellor
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Titan
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Warden
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • XRPL
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Zenrock
      • Installation
      • Upgrade
      • Sidecar Setup
        • config.yaml
        • eigen_operator_config.yaml
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Zetachain
      • Installation
      • Upgrade
      • State Sync
      • Snapshot
      • Public RPC
      • Useful commands
        • Validator Operations
        • Node Management
        • Wallet Management
        • Governance
    • Port Prefixes
Powered by GitBook
On this page
  1. Testnet
  2. Og-chain
  3. Upgrade

State Sync

Endpoints:

https://og.test.rpc.nodeshub.online

Address Book Updates every 5 hour

wget -O $HOME/.0gchain/config/addrbook.json https://files.nodeshub.online/testnet/0gchain/addrbook.json

State Sync

If you don't want to wait for a long synchronization you can use:

sudo systemctl stop 0gchain

# Back up priv_validator_state.json if needed
cp ~/.0gchain/data/priv_validator_state.json  ~/.0gchain/priv_validator_state.json.backup

# Reset Data folder
0gchaind tendermint unsafe-reset-all --home $HOME/.0gchain --keep-addr-book

SNAP_RPC="https://og.test.rpc.nodeshub.online:443"

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

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 && 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/.0gchain/config/config.toml

mv $HOME/.0gchain/priv_validator_state.json.backup $HOME/.0gchain/data/priv_validator_state.json

sudo systemctl restart 0gchain && sudo journalctl -u 0gchain -f -o cat

Last updated 3 months ago