Incentivized Node: Ora Node

Ora Protocol

Ora Protocol is an AI Oracle computing data for blockchain smart contracts using decentralized AI models.

  • 💰 Funding: Raised $20 million from top investors like Polychain and Hashkey.
  • 🤝 Partnerships: Collaborating with major blockchain platforms such as Optimism, Arbitrum, and Base.

Install Tora Node

Hardware Requirements

Ram cpu disk
min. 8 GB 1 Core 20-40 GB SSD

Step 1: Dependecies

Install Docker

sudo apt update -y && sudo apt upgrade -y
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done

sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

echo \
  "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt update -y && sudo apt upgrade -y

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

# Docker version check
docker --version

Step 2: Obtain Alchemy API

Screenshot_8

Step 3: Install Tora

1- Create Tora directory

mkdir tora
cd tora

2- Create .env file

nano .env

Paste the following code in .env

  • PRIV_KEY: Replace a Metamask wallet private key
  • Make sure you have enough ETH on Sepolia & Mainnet to pay very little transactions gas
  • MAINNET_WSS, MAINNET_HTTP,SEPOLIA_WSS, SEPOLIA_HTTP: Paste your Alchemy URLs
  • CONFIRM_CHAINS: I have chosen '["sepolia","mainnet"]' , if you don't want mainnet transactions you can set it to: '["sepolia"]'
############### Sensitive config ###############

# private key for sending out app-specific transactions
PRIV_KEY=""

############### General config ###############

# general - execution environment
TORA_ENV=production

# general - provider url
MAINNET_WSS=""
MAINNET_HTTP=""
SEPOLIA_WSS=""
SEPOLIA_HTTP=""

# redis global ttl, comment out -> no ttl limit
REDIS_TTL=86400000 # 1 day in ms 

############### App specific config ###############

# confirm - general
CONFIRM_CHAINS='["sepolia","mainnet"]'
CONFIRM_MODELS='[13]' # 13: OpenLM ,now only 13 supported
# confirm - crosscheck
CONFIRM_USE_CROSSCHECK=true
CONFIRM_CC_POLLING_INTERVAL=3000 # 3 sec in ms
CONFIRM_CC_BATCH_BLOCKS_COUNT=300 # default 300 means blocks in 1 hours on eth
# confirm - store ttl
CONFIRM_TASK_TTL=2592000000
CONFIRM_TASK_DONE_TTL = 2592000000 # comment out -> no ttl limit
CONFIRM_CC_TTL=2592000000 # 1 month in ms
  • CTRL+X+Y+ENTER to save and exit

3- Create docker-compose file

nano docker-compose.yml

Paste following code

# ora node docker-compose
version: '3'
services:
  confirm:
    image: oraprotocol/tora:confirm
    container_name: ora-tora
    depends_on:
      - redis
      - openlm
    command: 
      - "--confirm"
    env_file:
      - .env
    environment:
      REDIS_HOST: 'redis'
      REDIS_PORT: 6379
      CONFIRM_MODEL_SERVER_13: 'http://openlm:5000/'
    networks:
      - private_network
  redis:
    image: oraprotocol/redis:latest
    container_name: ora-redis
    restart: always
    networks:
      - private_network
  openlm:
    image: oraprotocol/openlm:latest
    container_name: ora-openlm
    restart: always
    networks:
      - private_network
  diun:
    image: crazymax/diun:latest
    container_name: diun
    command: serve
    volumes:
      - "./data:/data"
      - "/var/run/docker.sock:/var/run/docker.sock"
    environment:
      - "TZ=Asia/Shanghai"
      - "LOG_LEVEL=info"
      - "LOG_JSON=false"
      - "DIUN_WATCH_WORKERS=5"
      - "DIUN_WATCH_JITTER=30"
      - "DIUN_WATCH_SCHEDULE=0 0 * * *"
      - "DIUN_PROVIDERS_DOCKER=true"
      - "DIUN_PROVIDERS_DOCKER_WATCHBYDEFAULT=true"
    restart: always

networks:
  private_network:
    driver: bridge
  • CTRL+X+Y+ENTER to save and exit

Step 4: Run Tora Node

docker compose up -d

Step 5: Check logs

cd $HOME && cd tora
docker compose logs -f
  • To test that the node is running correctly, request inference from OpenLM on Sepolia here: https://www.ora.io/app/opml/openlm

  • Shortly after the request is initiated, the Tora validator will log receive event in tx .... This indicates that the Tora validator has received the request and started to perform inference. image

  • Now you know, whoever use Ora OLM on Sepolia & Mainnet, You will verify a transaction and get these logs, and will receive points as rewards