Infernet-node

πŸ› οΈ System Setup & Dependencies

Let's start by preparing your VPS. Make sure you're running Ubuntu 22.04 or later.

Update and install essential packages:

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

Install Docker Compose v2:

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

Set up the Docker CLI plugins directory and install Docker Compose plugin:

DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
mkdir -p $DOCKER_CONFIG/cli-plugins
curl -SL https://github.com/docker/compose/releases/download/v2.20.2/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose

Check Docker Compose version:

docker compose version

πŸ“¦ Cloning the Infernet Starter Repository

Clone the official Infernet container starter:

(Optional, but recommended) Start a screen session so that the node will continue to work even if you disconnect {to be honest, I didn't understand why this was necessary πŸ˜„}:

Even if there are mistakes, it's no big deal!

βš™οΈ Configuring the Node

!!! 🎯 Before we start preparing our node - make sure you have an EVM wallet with a small balance (I put about 10 dollars in ETH) from the Base network.

and chacge this block:

Once you're done, save and exit nano with CTRL + X, then Y, and Enter.

We change the same values along the path:

For this PATH change RPC and write you private_key (0x-requred!!!):

For this PATH change registry address:

It's time to get to our docker-compose.yaml! I want to tell you that if you start a node on hetsner and open a radis β€œout” - you will get a threatening letter, so below is a working config for hetsner (let's call it a config without letters :=).

πŸ“„ docker-compose.yaml

Below is the full working docker-compose.yaml used to run the Infernet node setup:

⚠️ Heads up!

  • Make sure to use the correct image tag: image: ritualnetwork/infernet-node:1.4.0 (older or latest versions might break things or behave differently)

  • Also, bind Redis to localhost only: - "127.0.0.1:6379:6379" If you expose it publicly (like on Hetzner), you might get a... "friendly reminder" in your inbox πŸ˜„

No other changes are required in the docker-compose.yaml by default.

Well, we're good to go!

Some synchronization...

and ... and ...

...and we're seeing our long-awaited successful logs.

βš™οΈ Setting Up Foundry

Foundry is a fast and modular toolkit for Ethereum application development written in Rust. We'll use it to compile and deploy smart contracts for Infernet.

1. Create a working directory

2. Install Foundry

Run the official installation script:

πŸ˜„ If you see a warning like 'anvil' is currently running, just stop any running anvil process (e.g. in Docker), and try again.

πŸ“¦ Project Setup & Installing Dependencies

Now let's head into the smart contract project and install the dependencies.

1. Go to the contract directory

2. Install forge-std (Foundry standard library)

❗ Got error 128? If you see something like this:

It means the folder already exists but is not a valid Git repo. To fix it, simply remove the broken folder and re-run the command:

  1. Install Infernet SDK

❗ Got error 128?

Same fix applies:

πŸš€ Deploying the Contracts

Once dependencies are installed, you're ready to deploy the smart contracts to your local Infernet environment.

1. Make sure you're in the root project folder:

2. Deploy the hello-world project:

We will get in the console the output that everything is successful and the address of our contract! We will need it further!

To invoke our creation (our contract) - we do

and change this for you contract

🧠 Replace YOUR_CONTRACT with the address of the deployed contract. For example: SaysGM saysGm = SaysGM(0xAbC123...);

You’ll find this address in the output from make deploy-contracts or by checking your wallet’s BaseScan history.

and...

and we have βœ… [Success]Hash:....

βœ… You're in Set!

Once everything is up and running, you can start monitoring your transactions on basescan.org Just search your wallet address and keep an eye on the activity.

🧠 Note: Even failed transactions are part of the normal node workflow β€” don't worry!

Last updated