Run a Full Node

Running a full node

How to become a Validator on Allora

This guide provides instructions on how to run a full node for the Allora network. There are two primary methods for running an Allora node: using docker compose (preferred) or using a script (opens in a new tab). It's important to choose the method that best suits your environment and needs.


Prerequisites

  • Git
  • Docker with docker compose
  • Basic command-line knowledge

Method 1: Using docker compose (Recommended)

Running the Allora node with docker compose simplifies the setup and ensures consistency across different environments.

Step 1: Clone the Allora Chain Repository

If you haven't already, clone the latest release of the allora-chain repository (opens in a new tab):

git clone https://github.com/allora-network/allora-chain.git

Step 2: Run the Node with Docker Compose

Navigate to the root directory of the cloned repository and start the node using docker compose:

cd allora-chain
docker compose pull
docker compose up -d

Note: Don't forget to pull the images first, to ensure that you're using the latest images.

The -d flag runs the container in detached mode, allowing it to run in the background.

Monitoring Logs

To view the node's logs, use the following command:

docker compose logs -f

Executing RPC Calls

You can interact with the running node through RPC calls. For example, to check the node's status:

curl -s http://localhost:26657/status | jq .

This command uses curl to send a request to the node's RPC interface and jq to format the JSON response.

Once your node has finished synching and is caught up with the network, this command will return false:

curl -so- http\://localhost:26657/status | jq .result.sync_info.catching_up

Method 2: Using a Script

Step 1: Clone the Allora Chain Repository

First, clone the allora-chain repository (opens in a new tab) from GitHub:

git clone https://github.com/allora-network/allora-chain.git

Step 2: Install allorad

Before running the node, you must install the allorad binary.

You can find the release here (opens in a new tab) or install it following the instructions.

Note: Depending on your go setup you may need to add $GOPATH/bin to your $PATH.

export PATH=$PATH:$(go env GOPATH)/bin

You can refer if needed to the CLI spec here and the repo's README.md (opens in a new tab).

Step 3: Execute the Node Script

Run the l1_node.sh script located in the scripts directory. This script initializes the node and generates the necessary keys:

sh ./scripts/l1_node.sh

Note: The l1_node.sh script will generate keys for the node. In production environments, it is critical to use secure key storage solutions and adhere to secrets management best practices.

Accessing the Node

Once the node is running, its RPC interface will be available at http://localhost:26657/. You can interact with the running node through RPC calls. For example, to check the node's status:

curl -s http://localhost:26657/status | jq .

Once your node has finished synching and is caught up with the network, this command will return false:

curl -so- http\://localhost:26657/status | jq .result.sync_info.catching_up

Ensure to regularly update your node and monitor this page and the allora-chain GitHub repo (opens in a new tab) for any changes or updates.