Skip to main content

Supernode FAQ

The script complains: cannot find jq

jq is required to parse JSON config files. Install it by running the following commands:

sudo apt-get update -y
sudo apt-get install -y jq

Do I need to install all chains or programs?

If you have been elected as a CR Council member, yes.

If you just wish to run a normal BPoS supernode, only ELA is required.

How to get the public key of a supernode?

# Show ELA wallet address and public key
cd ~/node/ela
cat ~/.config/elastos/ela.txt | ./ela-cli wallet account

or you can check with:

~/node/node.sh ela status

How to check the current height of an ELA node?

~/node/node.sh ela status | grep Height

ELA daemon will verify the database when booting, this may take several minutes. The height will be shown as N/A before the verification is completed.

To check the progress of the verification, you can run:

cd ~/node/ela/elastos/logs/node
tail -f *.log | grep 'BLOCKCHAIN INITIALIZE'
[ ========== BLOCKCHAIN INITIALIZE STARTED ========== ]
[ ========== BLOCKCHAIN INITIALIZE FINISHED ========== ]
# CTRL+C to stop

How to activate an Inactive ELA Supernode?

The ELA BPoS supernode did not have normal consensus work within 1440 blocks, and the node status was set to Inactive. The BPoS supernode and CR's BPoS supernode send the activation transaction and the status is set to Active and Elected after 6 blocks. The BPoS supernode is successfully activated, and will participate in the consensus work normally after 36-72 blocks.

Activate Node

~/node/ela/ela-cli wallet buildtx activate --nodepublickey nodepublickey
/node/ela/ela-cli --rpcuser user123 --rpcpassword pass123 wallet sendtx -f ready_to_send.txn

How to check node normal consensus? How to verify all daemons are working properly?

The ELA main chain is generated by the consensus of BPoS supernodes. The side chain ESC and EID will dynamically perceive the BPoS supernodes of CR and are responsible for the consensus generation of blocks. All side chain nodes need to verify the side chain blocks and reach a consensus.

ELA

  • ELA node height can be synchronized normally and has the highest height
  • The status of the BPoS supernode is obtained by querying the listproducers interface. The node status is Active, which means it is in the active state.
  • The status of the BPoS supernode of CR is obtained by querying the listcurrentcrs interface. The node status is Elected, which means it is active.
  • CR's BPoS supernode needs to obtain the BPoS supernode of the current consensus, which can be obtained through the getarbiterpeersinfo interface, and the return is empty. Its own CR BPoS supernode does not participate in the consensus

DID

  • DID node height can be synchronized normally and has the highest height

ESC

  • ESC node height can be synchronized normally and has the highest height
  • CR's BPoS supernode needs to obtain the ESC node that is on-duty consensus, which can be obtained through the pbft_getAtbiterPeersInfo interface. If an error is returned, its own ESC node does not participate in the consensus.

EID

  • EID node height can be synchronized normally and has the highest height
  • CR's BPoS supernode needs to obtain the EID node that is on-duty consensus, which can be obtained through the pbft_getAtbiterPeersInfo interface. If an error is returned, its own EID node does not participate in the consensus.

Arbiter

  • ELA, DID, ESC, EID, ELA SPV heights of Arbiter nodes can be synchronized normally and have the highest height

What to do if a chain node is out of sync?

The possible reasons may include:

  • The version is out of date.

Check versions and issue an update if required.

 node/node.sh status
  • The disk space is not sufficient.

Check the disk usage and increase it if required.

 df -h
  • The database is corrupted.

This error may occur because of abnormal shutting down of the server or daemon processes. It may require purging the database folder to make it synchronize from the very beginning.

Chain DaemonDatabase Directory
ELA~/node/ela/elastos/data
DID~/node/did/elastos_did/data
ESC~/node/esc/data/geth (without logs)
~/node/esc/data/header
~/node/esc/data/spv_transaction_info.db
~/node/esc/data/store
EID~/node/eid/data/geth (without logs)
~/node/eid/data/header
~/node/eid/data/spv_transaction_info.db
~/node/eid/data/store
Arbiter~/node/arbiter/elastos_arbiter/data

Warning: be careful about deleting any files on your servers. Consult the developer if you are not sure how to do it and think twice before the operation.

Take ELA as an example, you need to stop the daemon, purge the database related folder, and restart it.

 ~/node/node.sh ela stop
rm -rf ~/node/ela/elastos/data
~/node/node.sh ela start

What to do if a chain daemon is not started?

Check the free memory and disk space:

 free -h
df -h

Can't find what you're looking for?

Try the official Github repository.

You can also consult Gelaxy Team on Discord.