# Strategies with Validator Nodes - Ritual Network

By [0xOuterGod](https://paragraph.com/@0xoutergod) · 2024-03-22

---

In early 2023, ChatGPT reached 100M active users, drawing public attention to the field of artificial intelligence. In the crypto sector we have seen many cryptos benefit from this AI narrative, among the many tokens $TAO comes to mind.

Today, however, I am not going to talk about AI token speculation, but about an extremely interesting project that managed to win in a $25M funding round from Archetype Fund, Robot Ventures, Accomplice and other VCs.

I'm talking about Ritual Network.

What’s Ritual Network?
----------------------

According to Archetype Fund, Ritual Network is building the foundation of an open-source AI infrastructure in the form of an incentive network, connecting computing devices to each other.

The founders, Niraj Pant (who worked at Polychain) and Akilesh Potti (who worked at Polychain and Palantir), lead a team with experience in both AI and crypto, trying to find the right synergy between the two worlds.

Ritual identifies some structural problems in the current AI stack:

*   no guarantees regarding computational integrity (is the model running correctly?);
    
*   no guarantees regarding respect for privacy;
    
*   absence of resistance to censorship;
    
*   permissioned & centralized APIs, hosted by a few highly centralized corporations, leading to liveness problems;
    
*   high computational costs & limited access to proper hardware;
    
*   oligopolistic control over AI models, often kept closed-source because there is no economic incentive to make them open.
    

Ritual is an open, modular infrastructure and lends itself to becoming an execution layer for AI. It allows creators to host their models on nodes, whether they are LLMs (Large Language Models) or classic ML models; each model is accessible with a single, common API.

![Ritual's architecture](https://storage.googleapis.com/papyrus_images/fd9cf1ff9e3440777e51bd28ad76ad43da9e84402f4c9f5375e5c9e450452c38.png)

Ritual's architecture

Infernet is the product that intends to bring AI on-chain, allowing it to be directly exposed to smart contracts and enabling anyone to build permissionless on top of Ritual by accessing the network of models and compute providers.

The modular nature of Ritual Network allows it to then interface natively with any protocol and application on any chain, using Ritual specifically as an AI coprocessor

![Modular architecture of Ritual Network](https://storage.googleapis.com/papyrus_images/72b6a29e9fcb26806f1f5938e191749ebc5ad58a1144e4d024f5a78c6f7e4d37.png)

Modular architecture of Ritual Network

To learn more about the architecture of Ritual Network, [visit here](https://ritual.net/product).

**Infernet Node - Step-by-Step Guide**
--------------------------------------

To begin the procedure, you need a computer with any Linux distro installed, Ubuntu 20.04 or later will do, an SSD with +200 GB and a fast Internet connection.

For those without resources capable of supporting a validator node at home, you can fall back on **VPS (Virtual Private Server)** solutions, that is, you can rent a virtual server.

There are several solutions, which I recommend below:

*   [**Contabo**](https://contabo.com/en/vps/), I recommend the **Cloud VPS M model**, with 6 vCPU Cores, 16 GB RAM, 400 GB SSD SATA3;
    
*   [**Aeza**](https://aeza.net/?ref=432182), I recommend at least the **VIEs-3** or **PARs-3** model, with 4 vCPU Cores, 8 GB RAM, 120 GB NVMe. This is a Russian VPS service and payment by credit/debit card is not possible from many Western countries, but payments in crypto (BTC, BEP20, ERC20, TRC20, DASH, LTC, XMR...) are possible.
    

After payment is made, you will receive the **IP address** to access.

![](https://storage.googleapis.com/papyrus_images/ce955069c6e5becac5334e686ddec0cfb6de6ee5161fb5bb44a2ce3357a848dc.png)

If operating from Windows, open Windows Powershell and launch the following command, entering your IP address instead of `IP_ADDRESS`:

    ssh root@IP_ADDRESS
    

Give confirmation to save ED25519 key fingerprint to the list of known hosts, available at `C:\Users\WINDOWS_USER\.ssh` and enter the password of your VPS.

If you have done everything correctly, the following screen will appear:

![After login on Powershell on VPS provided by Contabo ](https://storage.googleapis.com/papyrus_images/de3453100b6b0dd5434f1930ffb4d9e296cbff21e1dd4bf0c7cf575bff61ca02.png)

After login on Powershell on VPS provided by Contabo 

Now let’s install build tools, docker and docker-compose by entering the following commands and executing them:

    sudo apt update && sudo apt upgrade -y
    sudo apt install -y curl git jq lz4 build-essential screen
    
    # Install Docker
    curl -fsSL https://get.docker.com/ | sh
    docker --version
    
    # Install Docker-Compose
    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
    docker-compose --version
    

Let’s clone the starter repository and install the Infernet SDK:

    # Clone Ritual's repository
    git clone https://github.com/ritual-net/infernet-container-starter
    cd infernet-container-starter/
    
    screen -S ritual
    project=hello-world make deploy-container
    

Do not close this session of the Powershell, open a second one, re-login and now edit the configuration file `config.json` by providing the correct coordinator address created on Base L2, the HTTPS URL provided by Alchemy (Base L2) and your private key preceded by `0x`.

Use a new wallet, created for the node operator, do not use pre-existing wallets that you use to store your crypto.

    nano ~/infernet-container-starter/deploy/config.json
    
    
    coordinator_address: 0x8d871ef2826ac9001fb2e33fdd6379b6aabf449c
    rpc_url: Base Mainnet HTTPS URL from Alchemy Dashboard
    private key: 0x, followed by your Metamask private key
    

Deposit ~0.0035 ETH on this wallet on Base L2 network., visit basescan website, [at the following address](https://basescan.org/address/0x8d871ef2826ac9001fb2e33fdd6379b6aabf449c#writeContract), click on `Connect to Web3` and connect your wallet to basescan. Then:

*   `registerNode`, enter your own wallet’s address and click `Write`;
    
*   wait an hour and activate your node, click `activateNode` and click `Write`.
    

Go back to the 2nd terminal tab and edit `Makefile` and `Deploy.s.sol` files as showed here below:

    # Edit Makefile
    nano infernet-container-starter/projects/hello-world/contracts/Makefile
    
    sender = <0x, followed by your Metamask private key>
    RPC_URL = <Base Mainnet HTTPS URL from Alchemy Dashboard>
    
    
    # Edit Deploy.s.sol
    nano infernet-container-starter/projects/hello-world/contracts/script/Deploy.s.sol
    
    address coordinator = 0x8D871Ef2826ac9001fB2e33fDD6379b6aaBF449c
    

Now launch the deploy container command:

    cd infernet-container-starter/
    make deploy-container project=hello-world
    

Do not close the two tabs of Powershell but open a 3rd one and install Foundry and dependencies. Foundry is a portable and modular toolkit for Ethereum applications written in Rust.

    # Install Foundry in a new directory
    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 ../../../
    

Now deploy a consumer contract to interact with the Infernet SDK, Ritual Network provides an example contract, “`SaysGM`”: it requests a compute output from an Infernet Node and prints the result using the forge console.

Launch the following command and check the logs:

    make deploy-contracts project=hello-world
    
    # == Logs ==
    # Loaded deployer: YOUR_ADDRESS
    # deployed SaysHello: CONTRACT_DEPLOYED
    

![](https://storage.googleapis.com/papyrus_images/72d216088311883f61ed6bafc277299bd613c0c4e03c80d9379300f02039471b.png)

Copy your `CONTRACT_DEPLOYED` and edit the `SaysGM` address in the following file:

    nano projects/hello-world/contracts/script/CallContract.s.sol
    
    # SaysGM saysGm = SaysGM(<CONTRACT_DEPLOYED>);
    

Save and exit, now launch the last command:

    make call-contract project=hello-world
    

![](https://storage.googleapis.com/papyrus_images/f22b6c54d94e98a0a56804ca6a02dbd9cfc36d096bbb0734db51bb882f280f4e.png)

Check your node address on basescan, if you see the following txs made successfully, you launched everything correctly!

![](https://storage.googleapis.com/papyrus_images/d2093ce8eef305270369d0c63b8e9a65981c66837c522faa2d75941104b1e939.png)

**Congratulations, you have successfully completed the installation of your node!**

![](https://storage.googleapis.com/papyrus_images/a179e02f08a8eb0c970ac25254d10ec6eb852c982ec9327426ddc66f63801112.png)

The Ritual Network team has not confirmed any airdrops, however they invite users to test their product for themselves. Therefore, I invite the more experienced users, especially those more knowledgeable on the topic of artificial intelligence, to test Infernet SDK.

_If you like my work, I suggest you to subscribe and mint the entry in order to support my work. The cost is insignificant for you, but it helps me to know that you like this kind of content._

[Subscribe](null)

---

*Originally published on [0xOuterGod](https://paragraph.com/@0xoutergod/strategies-with-validator-nodes-ritual-network)*
