Enigmatic Aura
TwitterMediumGithub
  • Welcome
  • 101-CRYPTO-WEB3
    • [101] Crypto and Web3 Basics
    • [101] Linux Commands
  • NEW NODE & TESNET
    • Aztec Public Testnet Guide
  • Node Validator
    • Sonaric AI Node
    • Zenrock Node
      • Update Zenrock Node
    • BrinX AI Node Validator
      • Worker Node Setup
      • Relay Node Setup
    • Drosera CLI Node Guide
  • Testnet Airdrop
    • Monad Testnet Guide
    • Sunrise Testnet v2
    • Inkonchain - The Break
    • Plaza Finance - Testnet
    • Cysic Incentivized Testnet
    • Crypto Faucet List
    • Abstract Chain's L2 Testnet
    • DEPIN - Project
      • Dawn
      • Teneo Node Extension
      • OpenLayer
        • Code
      • Gradient Network
      • Grass Stage 2: Capturing the Web
    • Base Learn - Testnet
      • Deploying Smart Contracts
        • How to Deploy
        • Testnet Base Learn
        • Source Code
      • Join Community
    • Incentivized Testnet - Multipli's
    • Yala Testnet
      • Getting Started on Yala Testnet
      • How to Set Up Your Wallet and Claim the Faucet
      • Testnet Tasks
      • Additional Resources
      • Other Tasks
    • Unichain Testnet
      • Wallet Setup & Faucet
      • Bridge
      • Deploy , Swap & Add LP
      • Additional Tasks
    • Rise Chain
  • Retrodrop
    • Huma Finance, OpenEden & SuperStacks
Powered by GitBook
On this page
  • Snapshot Recovery
  • 📡 State Sync Configuration
  • 🗝 Key Management
  • 👷 Validator Management
  • 💲 Token Management
  • 🗳 Governance Participation
  • ⚡️ Utility Commands
  • 🚨 Maintenance Tasks
  1. Node Validator
  2. Zenrock Node

Update Zenrock Node

Zenrock Node Maintenance Guide

This guide provides step-by-step instructions on essential tasks for managing and updating your Zenrock Node, covering core topics such as stopping services, resetting data, downloading snapshots, and maintaining validator and node security.


📌 Stop the Service

To begin, stop the node service before performing updates or maintenance tasks:

sudo systemctl stop zenrock-testnet.service

📌 Reset Data and Backup Validator State

To reset the data while ensuring the validator state is retained, follow these steps:

cp $HOME/.zrchain/data/priv_validator_state.json $HOME/.zrchain/priv_validator_state.json.backup
rm -rf $HOME/.zrchain/data

Snapshot Recovery

Retrieve the latest snapshot for quick restoration:

curl -L https://snapshots.kjnodes.com/zenrock-testnet/snapshot_latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.zrchain
mv $HOME/.zrchain/priv_validator_state.json.backup $HOME/.zrchain/data/priv_validator_state.json

Restart Service and Monitor Logs

Restart the service and review log outputs:

sudo systemctl start zenrock-testnet.service && sudo journalctl -fu zenrock-testnet.service -o cat

📡 State Sync Configuration

State Sync allows for faster synchronization by using a recent snapshot of application state.

  1. Stop Service and Reset Data:

    sudo systemctl stop zenrock-testnet.service
    cp $HOME/.zrchain/data/priv_validator_state.json $HOME/.zrchain/priv_validator_state.json.backup
    zenrockd comet unsafe-reset-all --keep-addr-book --home $HOME/.zrchain
  2. Set State Sync Variables:

    STATE_SYNC_RPC=https://zenrock-testnet.rpc.kjnodes.com:443
    STATE_SYNC_PEER=d5519e378247dfb61dfe90652d1fe3e2b3005a5b@zenrock-testnet.rpc.kjnodes.com:18256
    LATEST_HEIGHT=$(curl -s $STATE_SYNC_RPC/block | jq -r .result.block.header.height)
    SYNC_BLOCK_HEIGHT=$(echo "$LATEST_HEIGHT" | awk '{printf "%d000\n", $0 / 1000}')
    SYNC_BLOCK_HASH=$(curl -s "$STATE_SYNC_RPC/block?height=$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash)
  3. Configure config.toml:

    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/.zrchain/config/config.toml
  4. Restore Validator State:

    mv $HOME/.zrchain/priv_validator_state.json.backup $HOME/.zrchain/data/priv_validator_state.json
  5. (Optional) Download WASM:

    curl -L https://snapshots.kjnodes.com/zenrock-testnet/wasm_latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.zrchain
  6. Restart Service and Review Logs:

    sudo systemctl start zenrock-testnet.service && sudo journalctl -u zenrock-testnet.service -f --no-hostname -o cat

🗝 Key Management

Easily manage your wallet and keys with the following commands:

  • Add New Key:

    zenrockd keys add wallet
  • Recover Existing Key:

    zenrockd keys add wallet --recover
  • List All Keys:

    zenrockd keys list

👷 Validator Management

Ensure your validator is properly configured and operational:

  • Create New Validator:

    zenrockd tx validation create-validator <validator_config> --from wallet --chain-id gardia-2 --gas auto --gas-prices 0urock -y
  • Edit Validator Information:

    zenrockd tx validation edit-validator --new-moniker "YOUR_MONIKER" --from wallet --chain-id gardia-2 --gas auto --gas-prices 0urock -y

💲 Token Management

Manage tokens efficiently with these commands:

  • Withdraw All Rewards:

    zenrockd tx distribution withdraw-all-rewards --from wallet --chain-id gardia-2 --gas auto --gas-prices 0urock -y

🗳 Governance Participation

Stay active in governance decisions:

  • Vote 'Yes':

    zenrockd tx gov vote <proposal_id> yes --from wallet --chain-id gardia-2 --gas auto --gas-prices 0urock -y

⚡️ Utility Commands

Adjust node settings for optimized performance:

  • Update Ports:

    sed -i -e "s|PORT_VARIABLE|NEW_PORT|" $HOME/.zrchain/config/config.toml
  • Enable Prometheus Monitoring:

    sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.zrchain/config/config.toml

🚨 Maintenance Tasks

  • Get Validator Info:

    zenrockd status 2>&1 | jq .ValidatorInfo
  • List Live Peers:

    curl -sS http://localhost:18257/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"'

PreviousZenrock NodeNextBrinX AI Node Validator

Last updated 6 months ago