Skip to content

morpheusadam/CortexNode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# 🧠 Cortex Node — Cortex: AI on Blockchain (Go) ### Official Golang implementation of the Cortex full node — a decentralized blockchain that runs AI/ML model inference on‑chain.

License Stars Forks Last commit Repo size

Go Blockchain AI/ML PoW CUDA Make

Tech


📖 Overview

BlockchainAi is the official Golang implementation of Cortex — a public blockchain that brings artificial intelligence and machine‑learning inference on‑chain. Cortex lets smart contracts call AI/ML models directly through the Cortex Virtual Machine (CVM), enabling decentralized AI DApps where model execution is verifiable and reproducible across every node.

The node (Go module github.com/CortexFoundation/CortexTheseus) implements the full Cortex protocol: networking, transaction processing, the EVM‑compatible CVM runtime, state storage, mining, RPC/console tooling, and a Proof‑of‑Work consensus based on the Cortex Cuckoo cycle. AI models and input data are distributed via a content‑addressed storage layer, and inference results are computed deterministically (with optional CUDA/GPU acceleration) so that on‑chain AI is trustless.

This repository is for blockchain engineers, AI/ML researchers, miners, and DApp developers who want to run a Cortex full node, build AI‑powered smart contracts, or experiment with decentralized machine learning.

🔎 Keywords: AI on blockchain, decentralized AI, Cortex blockchain, on‑chain machine learning, Cortex Virtual Machine (CVM), Golang blockchain node, smart contract AI inference, proof‑of‑work Cuckoo cycle, GPU mining, Web3 AI.


✨ Features

  • 🧠 On‑chain AI/ML inference — execute machine‑learning models directly from smart contracts via the CVM.
  • 🔗 Full Cortex node — networking (p2p), state, transactions, consensus, RPC, and console in one binary.
  • ⛏️ Proof‑of‑Work mining — Cortex Cuckoo cycle PoW with optional CUDA/GPU acceleration.
  • 🤖 Deterministic CVM — EVM‑compatible virtual machine extended for verifiable AI model execution.
  • 🗂️ Decentralized model & data storage — AI models/inputs distributed via content‑addressed (TorrentFS) storage.
  • 🧪 Developer tooling — CLIs under cmd/ (cortex, bootnode, abigen, devp2p, keytools, …).
  • 🌐 Testnet support — run the Bernard testnet for development.
  • 🐧 Cross‑platform builds — Linux‑first (Ubuntu/CentOS), x64 with Makefile‑driven builds.

🛠️ Tech Stack

Component Technology
Language Go 1.22
Module github.com/CortexFoundation/CortexTheseus
Virtual machine Cortex Virtual Machine (CVM), EVM‑compatible
Consensus Proof‑of‑Work (Cortex Cuckoo cycle)
AI runtime CVM runtime (libcvm_runtime.so), optional CUDA/GPU
Storage Content‑addressed model/data storage (TorrentFS)
Build Make, CMake, GCC/G++

🚀 Getting Started

Prerequisites

  • Go 1.20+ (built/tested with Go 1.22)
  • CMake 3.11.0+, GCC/G++ 5.4+, make
  • 8 GB+ RAM recommended for compilation
  • x64 CPU (AVX2 recommended)
  • (Optional, for GPU mining) CUDA 9.2+ and a compatible NVIDIA driver (396.37+)
  • Linux (Ubuntu 18.04+ recommended; CentOS 7.6 supported but not recommended)

Build from source

git clone --recursive https://github.com/CortexFoundation/CortexTheseus.git
cd CortexTheseus
make clean && make -j$(nproc)

Verify the CVM runtime library links correctly:

ldd plugins/libcvm_runtime.so

If it fails, run rm -rf cvm-runtime && git submodule init && git submodule update, then rebuild.

Run a full node

cd CortexTheseus
export LD_LIBRARY_PATH=$PWD:$PWD/plugins:$LD_LIBRARY_PATH
./build/bin/cortex

View all available options:

./build/bin/cortex --help

Run the developer testnet (Bernard)

./cortex --bernard

🔗 Related Projects

Project Description
cvm-runtime CVM runtime — the AI inference container
torrentfs Decentralized file/model storage layer
inference AI wrapper — fixed API for inference & storage
solution PoW — Cortex Cuckoo cycle
rosetta-cortex Rosetta API integration
docker Docker images & deployment

🗂️ Project Structure

BlockchainAi/
├── cmd/            # CLIs: cortex, bootnode, abigen, devp2p, keytools, …
├── consensus/      # Proof-of-Work consensus (Cuckoo cycle)
├── core/           # Blockchain core, state & transaction processing
├── ctxc/           # Cortex protocol & full-node service
├── miner/          # Mining
├── p2p/            # Peer-to-peer networking
├── rpc/            # JSON-RPC layer
├── console/        # Interactive JS console
├── crypto/         # Cryptography primitives
├── pow/            # Proof-of-Work
├── params/         # Network & chain parameters
├── genesis.json    # Genesis configuration
├── go.mod          # Go module definition
└── Makefile        # Build automation

🤝 Contributing

Contributions are welcome! Please review CODINGSTYLE.md, then open an issue or submit a pull request.

📜 License

The library packages are licensed under GNU LGPL‑3.0 (COPYING.LESSER); the command‑line binaries are licensed under GNU GPL‑3.0 (COPYING). See LICENSE, COPYING, and COPYING.LESSER for details.


👤 Author — Morpheus Adam

Web developer & cheerful hacker · PHP · Laravel · Go

GitHub Website Email

If this decentralized‑AI node interests you, consider giving it a star!


⭐ Star History

BlockchainAi — Star History Chart

If this project helps you, please give it a ⭐

A star helps other developers discover BlockchainAi and supports continued development.

About

Cortex full node — the official Go implementation of a decentralized AI-on-blockchain protocol for on-chain machine learning.

Topics

Resources

License

LGPL-3.0 and 2 other licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
LICENSE
GPL-3.0
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors