aleph-onchain

A Rust-native decentralized cloud platform coordinated by Solidity smart contracts on Arbitrum One. Replaces the Python-based Aleph Cloud stack with a single binary.

Overview

aleph-onchain provides decentralized compute instances, persistent storage, and custom domain routing — all coordinated through on-chain smart contracts on Arbitrum. The system replaces the current Python-based stack (pyaleph + aleph-vm) with a single Rust binary.

Key Innovation

Unlike other DePIN platforms, aleph-onchain uses on-chain Merkle proofs for storage verification, Firecracker microVMs for compute isolation, and allowance-based payments with DEX swap support.

Architecture

The system consists of three layers:

CLIENT LAYER aleph-sdk-rs / aleph-sdk-ts / aleph-cli ARBITRUM ONE (9 Smart Contracts) NodeRegistry | StakingManager | JobManager | PaymentManager | StorageRegistry | DomainRegistry | AlephGovernor | SLAManager | ImageMarketplace NODE MESH (12 Rust Crates) Coordinator Nodes + Compute Nodes + Storage Layer RocksDB + Content-Addressed Blobs + Erasure Coding

Quick Start

Prerequisites

Build from Source

# Clone the repository
git clone https://github.com/aleph-onchain/aleph-onchain.git
cd aleph-onchain

# Build the Rust node
cargo build --release

# Build smart contracts
cd contracts && forge build

# Run tests
cargo test --workspace
forge test

Configuration

# config.toml
[node]
role = "compute"          # or "coordinator"
data_dir = "/var/lib/aleph"

[chain]
rpc_url = "https://arb1.arbitrum.io/rpc"
private_key_path = "keys/node.key"

[storage]
engine = "rocksdb"
max_size_gb = 500

[network]
listen_addr = "/ip4/0.0.0.0/tcp/4001"
bootstrap_peers = []

[api]
bind = "0.0.0.0:8080"

Run the Node

# Start as a compute node
./target/release/aleph-node --config config.toml

# Or with feature flags
./target/release/aleph-node --config config.toml --role coordinator

Project Structure

Smart Contracts (Solidity)

ContractPurpose
NodeRegistryNode registration, metadata, heartbeats, status lifecycle
StakingManagerSelf-staking, delegation, unbonding, slashing
JobManagerJob lifecycle (create/assign/run/stop/complete)
PaymentManagerAllowance-based settlement, multi-token, DEX swap
StorageRegistryStorage commitments, Merkle proofs, challenge/response
DomainRegistryCustom domain registration, TLS cert management
AlephGovernorOn-chain governance, proposals, voting
SLAManagerSLA definitions, violation tracking, penalties
ImageMarketplaceVM image publishing, ratings, revenue sharing

Rust Crates

CratePurpose
aleph-commonShared types, config, crypto, metrics
aleph-chainChain watcher, contract bindings (alloy)
aleph-messageMessage types and validation
aleph-storageContent-addressed storage, Merkle proofs, erasure coding
aleph-networkP2P networking (libp2p)
aleph-apiHTTP API server (axum)
aleph-schedulerJob scheduling (coordinator only)
aleph-executorVM execution (Firecracker/QEMU)
aleph-vm-networkingVM TAP interfaces, nftables, port forwarding
aleph-nodeBinary entry point (CLI, config, runtime)
aleph-auditSecurity auditing and compliance
aleph-marketplaceImage marketplace client

Tech Stack

Smart Contracts

Solidity 0.8.24, Foundry, OpenZeppelin v5, UUPS proxies, Arbitrum One

Node Runtime

Rust, Tokio async, single binary with feature flags for coordinator/compute roles

Storage

RocksDB + content-addressed blob store + Reed-Solomon erasure coding

Networking

rust-libp2p (noise + yamux), Kademlia DHT, GossipSub

Compute

Firecracker microVMs, QEMU (GPU passthrough), cloud-init

Payments

Allowance-based settlement, multi-token via Uniswap V3 DEX swap