RPC Status Server Guide

#1

Please follow these steps in order to setup the RPC server for you to query your own node using the following exposed methods:

  • GetCurrentMiniEpoch (Current Transaction Block number)
  • GetCurrentDSEpoch (Current Directory Block number)
  • GetNodeType (Current type of node you are, there are 3 types: normal | shard | ds)
  • GetDSCommittee (Current identities of DS committee)
  • GetNodeState (Check if you are synced to the network or not)

Quick guide to setup RPC node

  1. Edit the constants.xml by enabling the status RPC mode :

    <ENABLE_STATUS_RPC>true<ENABLE_STATUS_RPC>
    
  2. The server runs on localhost by default, however the IP that is binded can be changed by changing the IP_TO_BIND parameter.

  3. Download the miner_info.py script in your “join” folder:

    wget https://github.com/Zilliqa/Zilliqa/raw/v4.5.0/scripts/miner_info.py
    
  4. You can query the node using several option flags, check out all available option via:

    python miner_info.py --help 
    

    Example query for GetCurrentMiniEpoch method:

    python miner_info.py epoch
    

Available methods in the Python script:

Method Description
whitelist_add Add an IP to the whitelist (This IP wouldn’t be blacklisted by your node). Requires a parameter to be passed.
For eg. python whitelist_add -pm 142.23.12.1
whitelist_remove Remove an IP from whitelist. Requires a parameter to be passed.
For eg. python miner_info.py whitelist_remove -pm 142.23.12.1
checktxn Query if a transaction hash is in the node’s mempool. Requires a parameter to be passed.
For eg. python miner_info.py checktxn -pm <TXN_ID>
epoch Query the current TX epoch which the node is synced in with
dsepoch Query the current DS epoch which the node is synced in with
type Query the type of node (i.e. DS or Shard or Seed or Backup)
ds Query the list of current DS committee members
state Query the current state of the node
0 Likes

#2

Not working at all with half of the options ds and dsnode

0 Likes