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.

Register the Guardian Node

Using the following command will register your guardian node information in the MOI protocol and authorize you to initiate your own Guardian Node.

sudo docker run --network host --rm -it -w /data -v $(pwd):/data sarvalabs/moipod:latest register --data-dir {DIRPATH} --mnemonic-keystore-path {KEYSTORE_PATH} --mnemonic-keystore-password {MNEMONIC_KEYSTORE_PASSWORD} --watchdog-url https://babylon-watchdog.moi.technology/add --node-password {NODE_PWD} --network-rpc-url https://voyage-rpc.moi.technology/babylon --wallet-address {ADDRESS} --node-index {NODE_IDX}
info

You can store the mnemonic keystore password (MNEMONIC_KEYSTORE_PASSWORD) and the node password (NODE_PASSWORD)as environment variables, without the need to configure them as separate command-line flags.

note

If your node is not directly bound to a public IP address, it's crucial to ensure that you provide the public URL by utilizing the --local-rpc-url flag during the registration process, like this: --local-rpc-url http://<public-ip>:1600. (Default port: 1600)

Command Flags Reference Table
FlagTypeDescription
data-dirstringPath to the data directory in which you wish you to start the node
mnemonic-keystore-pathstringPath to master keystore which contains the seed phrase that was used in voyage to login. This is the same file that was downloaded earlier while applying for the Waitlist on MOI Voyage
mnemonic-keystore-passwordstringPasscode to decrypt the mnemonic keystore. This is the same password that you had entered while downloading the keystore from Voyage.
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 the network JSON RPC URL at which the transaction will get fired
node-indexint32Validator node index, this is found on in voyage when you registered to be a guardian
node-passwordstringPasscode to encrypt your node keystore which contains your consensus private key and network private key
wallet-addressstringWallet address is the wallet in which you wish to receive your tokens
watchdog-urlstringWatchDog service url. WatchDog is used to monitors and incentives your nodes based on your availability
caution

Once your Guardian information is successfully registered, delete the master keystore which contains your seed phrase.

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}
info

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.

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