CryptoNodeID
  • Introduction
  • Basics
    • Server Preparation
    • Setting up DNS
    • Routing using NGINX
    • Setting up SSL
    • Security Setup
  • Advance
    • Proxmox Setup with 1 Public IP
  • Mainnet
    • Humanode
      • Installation
      • Node Activation
      • Monitoring
    • CrossFi
      • Endpoints and Sync
      • Installation
      • Validator Setup
      • Cheat Sheet
  • Testnet
    • Airchain
      • Endpoints and Sync
      • Installation
      • Validator Setup
    • Cortensor
      • Installation
      • Multiple Node Setup
        • VM Method
        • Docker Method
    • CrossFi
      • Endpoints and Sync
      • Installation
      • Validator Setup
      • Cheat Sheet
      • User ITN Guide
    • Empeiria
      • Endpoints and Sync
      • Installation
      • Validator Setup
      • Cheat Sheet
    • Ethereum and Arbitrum Sepolia
      • Installation
    • Symphony
      • Endpoints and Sync
      • Installation
      • Validator Setup
      • Cheat Sheet
    • NuLink
    • Shardeum
    • Warden Protocol
      • Endpoints and Sync
      • Installation
      • Validator Setup
      • Cheat Sheet
  • Supporting Tools
    • Cosmos Explorer
      • Installation
  • Archived
    • Galactica
      • Endpoints and Sync
      • Installation
    • Initia
      • Endpoints and Sync
      • Installation
    • Mantrachain
      • Endpoints and Sync
      • Installation
    • Side Protocol
      • Endpoints and Sync
      • Installation
    • Stratis EVM
Powered by GitBook
On this page
  • State Sync
  • Snapshot Restore

Was this helpful?

  1. Archived
  2. Mantrachain

Endpoints and Sync

RPC: https://mantra-testnet-rpc.cryptonode.id

API: https://mantra-testnet-api.cryptonode.id

Peers
e6300da0cd93bcea978bb17a40e8f177272fea94@mantra-testnet-peer.cryptonode.id:23656

State Sync

DAEMON_HOME="${HOME}/.mantrachain"
SERVICE_NAME="mantrachaind"

sudo systemctl stop ${SERVICE_NAME}

cp ${DAEMON_HOME}/data/priv_validator_state.json ${DAEMON_HOME}/data/priv_validator_state.json.backup
cp ${DAEMON_HOME}/config/priv_validator_key.json ${DAEMON_HOME}/config/priv_validator_key.json.backup

mantrachaind tendermint unsafe-reset-all --home ${DAEMON_HOME}

PEERS="d5bd5ea9c3fab054d6cd1fee92fc3ac79827f391@mantra-testnet-peer.cryptonode.id:23656,1a46b1db53d1ff3dbec56ec93269f6a0d15faeb4@mantra-testnet-peer.itrocket.net:22656,f8352e2f7d9e6f71a431a77cefe9a84bcab3bbac@testnet-mantra-konsortech.xyz:32656,d2d67040b3bdbe7378210a51edf6a17fce405243@23.88.5.169:32656"
SNAP_RPC="https://mantra-testnet-rpc.cryptonode.id:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" ${DAEMON_HOME}/config/config.toml 
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 5000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) 

sed -i \
  -e "s|^.*enable *=.*|enable = "true"|" \
  -e "s|^.*rpc_servers *=.*|rpc_servers = \"$SNAP_RPC,$SNAP_RPC\"|" \
  -e "s|^.*trust_height *=.*|trust_height = $BLOCK_HEIGHT|" \
  -e "s|^.*trust_hash *=.*|trust_hash = \"$TRUST_HASH\"|" \
  -e "s|^.*seeds *=.*|seeds = \"\"|" \
  ${DAEMON_HOME}/config/config.toml
  
mv ${DAEMON_HOME}/data/priv_validator_state.json.backup ${DAEMON_HOME}/data/priv_validator_state.json
mv ${DAEMON_HOME}/config/priv_validator_key.json.backup ${DAEMON_HOME}/config/priv_validator_key.json

sudo systemctl restart ${SERVICE_NAME}
sudo journalctl -fu ${SERVICE_NAME} --no-hostname -o cat

Snapshot Restore

DAEMON_HOME=$HOME/.mantrachain
SERVICE_NAME=mantrachaind
NETWORK=mantra-testnet

sudo systemctl stop ${SERVICE_NAME}
cp ${DAEMON_HOME}/data/priv_validator_state.json ${DAEMON_HOME}/priv_validator_state.json.backup
rm -rf ${DAEMON_HOME}/data
mkdir -p ${DAEMON_HOME}/data

SNAP_NAME=$(curl -s https://snapshot.cryptonode.id/${NETWORK}/ | egrep -o ">${NETWORK}-snapshot.*\.tar.lz4" | tr -d ">")
curl https://snapshot.cryptonode.id/${NETWORK}/${SNAP_NAME} | lz4 -dc - | tar -xf - -C ${DAEMON_HOME}/data
mv ${DAEMON_HOME}/priv_validator_state.json.backup ${DAEMON_HOME}/data/priv_validator_state.json

sudo systemctl restart ${SERVICE_NAME}
sudo journalctl -fu ${SERVICE_NAME} --no-hostname -o cat
PreviousMantrachainNextInstallation

Last updated 11 months ago

Was this helpful?