Skip to main content

Setup Guardian Node

This tutorial demonstrates how to set up a Guardian Node for the Babylon TestNet. For information regarding setting up nodes for a private network, refer to MOIPod CLI Docs.

KYC Verification for Guardian Operators
  • All Guardians Operators must be KYC verified to comply with the protocol's reputation requirements.
  • Organizations can also become operators by completing the KYB verification.
  • KYC verification for the MOI IDs is provided by select services such as IOMe which works with multiple vendors and agencies.
  • Individual operators can host upto 21 Nodes, while Institutional operators can go upto 108.

Apply for the Guardian Waitlist

To become a Guardian Operator, you must first have a KYC-verified MOI ID and apply on the Guardian Waitlist with MOI Voyage to become eligible to register and start your node. If you already have a MOI ID (skip to Step 2) or if you already have a KYC ready MOI ID (skip to step 3).

  • Visit the IOMe Login Page, and create an account.


    Login with IOMe
  • Choose a Username and Password. You will then be redirected to the Secret Recovery Phrase section.


    Secret Recovery Generation
  • If you have an existing Secret Recovery Phrase, you can import and link it to your new IOMe account. Otherwise, IOMe will generate a new seed phrase for you.


    Secret Recovery Backup
caution

Please back up your Secret Recovery Phrase & IOMe Password. They cannot be recovered!

  • Voilà! You now have an IOMe Account with a MOI ID.

Install MOIPod

Recommended Specification

To make the most of the Babylon TestNet, it's important to optimize your setup for performance and contribution. We suggest the matching the hardware specifications listed below for optimal results.

SpecRecommended
CPU4 Cores (ARM64 or x86-64)
RAM16 GB (DDR4)
SSD512 GB

The MOI Protocol is highly network intensive and so, Guardians Nodes must have a reliable & steady internet connection with a speed of at least 500 Mbps. The average monthly bandwidth consumption is expected to be around 300-500 GB

Install Docker Desktop

In order to commence executing the docker commands, it is necessary to install Docker Desktop on our system. For guidance on installing Docker Desktop, please refer to the following links:

Once Docker Desktop has been successfully downloaded and installed, launch the Docker CLI and proceed.

Pull the MOIPod Docker Image

Using the following command will provide you with a pre-built image from the Docker registry. This image contains the necessary code and data for your node to communicate with the network and validate interactions in a seamless manner.

docker pull sarvalabs/moipod:latest

Connectivity Settings

The Guardian Node is configured to utilize the following network ports by default:

TransportPortReachabilityPurpose
TCP/UDP6000Inbound/OutboundProtocol P2P Interface
TCP1600InboundJSON RPC Interface

In order to ensure the successful operation of the guardian node, it is imperative that the designated ports 6000 and 1600, are open as mentioned, along with the corresponding protocol.

caution

If you opt against exposing the JSON-RPC port for external access, it is necessary to whitelist the WatchDog URL to ensure its ability to access the JSON-RPC port. Failure to whitelist this URL will result in non-crediting of your incentives.

Create a Data Directory

To set up your Guardian Node, start by creating a data directory that will store essential files for your node's operation. Run the following command to create a new data directory:

mkdir -p /path/to/data-directory
note

Replace /path/to/data-directory with your preferred directory path.

Next, copy your keystore file, which was downloaded from MOI Voyage, into the newly created data directory and name it keystore.json.

cp /path/to/your/keystore.json /path/to/data-directory/keystore.json

This keystore file is crucial for securely storing your node's credentials. Ensure it is named correctly as keystore.json in the data directory.

Start the Guardian Node

Using the following command provided below, you will initialize your personal Guardian Node, thereby enabling you to actively participate in the Babylon TestNet!

sudo docker run --network host --rm -it -d -w /data -v $(pwd):/data sarvalabs/moipod:latest server --babylon --data-dir {DIRPATH} --log-level DEBUG --node-password {NODE_PWD} --watchdog-url https://babylon-watchdog.moi.technology/add --network-rpc-url https://voyage-rpc.moi.technology/babylon
info

Custom Hostname or Port - If you are using a custom hostname or port, include the --local-rpc-url flag in the command. For example: --local-rpc-url http://13.235.63.184:1604 or --local-rpc-url http://node1.guardian.io.


Node Password - You can skip passing node password as a separate command-line flag if you have set it as an environment variable already.

Command Flags Reference Table
FlagTypeDescription
data-dirstringPath to the data directory in which you wish you to start the node
log-levelstringThe logger level. Default: "INFO"
node-passwordstringPasscode used to decrypt your node keystore.
babylonboolConnects to babylon network by downloading its genesis file.
local-rpc-urlstringLocal node JSON RPC URL. This is provided if you are behind a relay or gateway node and this will be the URL that WatchDog will hit
network-rpc-urlstringTo register you would need to fire an interaction to the network. So this is the network JSON RPC URL to which the interaction will be sent.
watchdog-urlstringWatchDog service url. WatchDog is used to monitors and incentives your nodes based on your availability

Verifying Successful Startup of Node

Upon executing the above docker run command to start the node, you will receive a hash. This hash is used to verify if a Docker container started successfully. You can follow these steps to verify:

  1. Run the docker ps -a command to list all the containers.
  2. Look for the container that you want to check by looking at the Image column. The Image column will show the image that the container was created from.
  3. If the container is running, it will have a status of "Up". If the container is not running, it will have a status of "Exited".

Container IDImageCommandcreatedStatusPortsNames
f00f11223344my-image"/bin/bash"10 minutes agoUp 10 minutes0.0.0.0:1600->1600/tcpmy-container

In this example, the container with the ID f00f11223344 is running. Image that the container was created from is my-image. The container was created 10 minutes ago and has been running for 10 minutes. To verify that the container started successfully, we check if the Status column shows Up.

Accessing Node Logs

The log file for the Guardian Node can be accessed at the data directory of the node at {DATA_DIR}/log/{kramaID}

Artifacts

Genesis File

You can find the Genesis file by visiting the following link: Genesis File