Cover photo

Setting Up Your Validator Ritual Node

https://icoanalytics.org/projects/ritual
https://icoanalytics.org/projects/ritual

Get Early Access

Get Early Access By Submitting your Email Address in Official Website

To get a deeper understanding of Ritual’s unique architecture and its core components, I recommend visiting their product page. There, you’ll find an interactive protocol diagram that offers details on how the system is structured:

post image

Create a new Wallet and Deposit about 6 Dollar of ETH On Base Network then save your address and Private Key to Continue

Order And Configure Your VPS

You Can Follow All these steps in my youtube video

post image

this system dos’t really use this much system reassures but you chose the recommended system and i will add some new nodes on this server

sudo apt update && sudo apt upgrade -y
sudo apt -qy install curl git jq lz4 build-essential screen

Install Docker & Docker Compose

sudo apt install apt-transport-https ca-certificates curl software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt install docker-ce
sudo systemctl status docker

Output :

Output● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2020-05-19 17:00:41 UTC; 17s ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 24321 (dockerd)
      Tasks: 8
     Memory: 46.4M
     CGroup: /system.slice/docker.service
             └─24321 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

you should have minimum of 24.0.5 docker version

docker --version
sudo curl -L "https://github.com/docker/compose/releases/download/v2.24.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Verify the Docker Compose version; it should be at least v2.24.5:

docker-compose --version

Clone The Starter Repository

git clone https://github.com/ritual-net/infernet-container-starter

cd infernet-container-starter
screen -S ritual

Run it in screen session

project=hello-world make deploy-container

Press Ctrl + A, then press D For Exit

For Confirmation

docker container ls

You Should see

post image

Change The Configuration

For the upcoming steps, you’ll need to have an Alchemy account If you don’t already have one, you can sign up for free. Once you’re logged into Alchemy, head to the “Apps” section and look for the option to “Create new app.”

post image

When creating a new app in Alchemy, select “Base” as the chain and “Base Mainnet” for the network. Name your app something relevant, like “Ritual,” to easily identify it in your Alchemy dashboard:

post image

After creating your app in Alchemy, go to the app’s details, find the “API Key” button, and click it. This action will reveal the HTTPS RPC URL, which you should copy to your clipboard:

post image

Lets Update config.json

nano ~/infernet-container-starter/deploy/config.json

Change The rcp_url and private_key

post image

Update Makefile

nano ~/infernet-container-starter/projects/hello-world/contracts/Makefile

change sender's address to your wallet's private key

change RPC_URL to the base RPC URL you got from alchemy

Save And Exit

Update Deploy.s.sol

nano ~/infernet-container-starter/projects/hello-world/contracts/script/Deploy.s.sol

change the coordinator address to 0x8D871Ef2826ac9001fB2e33fDD6379b6aaBF449c

Save And Exit

Initialize The New Configuration

docker restart anvil-node
docker restart hello-world
docker restart deploy-node-1
docker restart deploy-fluentbit-1
docker restart deploy-redis-1

Check The Log

First Get the deploy-node-1 Container ID by

Pick ID
Pick ID

then replace your id in this code

docker logs <CONTAINER ID>
post image

Confirm Information and Continue

Install Foundry And Dependencies

cd

mkdir foundry

cd foundry

curl -L https://foundry.paradigm.xyz | bash

source ~/.bashrc

foundryup
cd ~/infernet-container-starter/projects/hello-world/contracts

forge install --no-commit foundry-rs/forge-std

forge install --no-commit ritual-net/infernet-sdk

cd ../../../

Deploy A Consumer Contract

You Can Write this Code in Your Second Terminal Page

docker logs -f anvil-node

Back To Main Terminal And

cd ~/infernet-container-starter

project=hello-world make deploy-contracts

You Should See this On your Sec Terminal

post image

Call The Contract

project=hello-world make call-contract

On-Chain Registration

To register and activate your node on the Coordinator contract (0x8d871ef2826ac9001fb2e33fdd6379b6aabf449c) via Basescan, first, make sure you’re using the same Web3 wallet (like MetaMask) connected to your config.json file. For registration, input your wallet’s public address into the “node (address)” field of the “registerNode” function and confirm the transaction. After waiting for 1 hour, proceed to activate your node using the “activateNode” function. This process is important for integrating your node with the network.

post image

Total Requests

To ensure your setup is fully integrated with the Base Mainnet, check your Alchemy or Infura dashboard. Check that your Base application is actively receiving requests, which indicates that your node is properly communicating with the Base network.

post image

Transactions

If the process is successful, you should be able to verify two transactions linked to your wallet on the Basescan explorer: one confirming the registration of your node and the other its activation.

post image

Tests — Check The Docker Logs

docker logs <CONTAINER ID>

Congratulations! You’ve successfully set up your Ritual node created an on-chain subscription request.

Follow Me On Twitter

Follow Me On Youtube