๐Ÿ“– AddrBook

Updated every 20 minutes.

โ—ป๏ธ How to use?

Copy and paste the command on your server.

curl -Ls https://snapshots-testnet.unitynodes.com/nillion-testnet/addrbook.json > $HOME/.nillionapp/config/addrbook.json

sudo systemctl restart nilchaind 
sudo journalctl -u nilchaind -f -o cat

โ—ป๏ธ How to check?

After uploading addrbook to your server, you can see if your node is syncing with the following command:

while true; do 
  local_height=$(nilchaind status | jq -r .sync_info.latest_block_height)
  network_height=$(curl -s https://rpc.nillion-testnet.unitynodes.com/status | jq -r '.result.sync_info.latest_block_height')
  blocks_left=$((network_height - local_height))

  echo -e "\033[1;33m[Sync Status]\033[0m \033[1;32mNode Height:\033[0m \033[1;37m$local_height\033[0m | \033[1;32mNetwork Height:\033[0m \033[1;37m$network_height\033[0m | \033[1;32mBlocks Left:\033[0m \033[1;31m$blocks_left\033[0m"

  sleep 5
done
  • Your node height - the current block of your node

  • Network height - the last block of the network

  • Blocks left - how many blocks your node has left to sync.

โ—ป๏ธ How does it work?

The address book is a local database or record maintained by a node to store information about all the peers it has contacted or learned about. This helps in the process of discovering new peers. Peers are essential for ensuring the stable and reliable operation of the network, as they allow nodes to exchange data, synchronize the blockchain, and maintain consensus.

โ—ฝ Advantages of using addrbook

  1. Improved Peer Discovery: The address book enables a node to quickly find new peers, which helps maintain efficient communication and network stability.

  2. Faster Connection: A node can reconnect to the network more quickly after a restart by using information stored in the address book.

  3. Enhanced Security: The address book allows storing information about verified peers, reducing the risk of connecting to malicious or unreliable nodes.

Last updated