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.
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:
Quick Start
Prerequisites
- Rust 1.75+ with
cargo - Foundry (
forge,cast,anvil) - Access to an Arbitrum One RPC endpoint
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)
| Contract | Purpose |
|---|---|
NodeRegistry | Node registration, metadata, heartbeats, status lifecycle |
StakingManager | Self-staking, delegation, unbonding, slashing |
JobManager | Job lifecycle (create/assign/run/stop/complete) |
PaymentManager | Allowance-based settlement, multi-token, DEX swap |
StorageRegistry | Storage commitments, Merkle proofs, challenge/response |
DomainRegistry | Custom domain registration, TLS cert management |
AlephGovernor | On-chain governance, proposals, voting |
SLAManager | SLA definitions, violation tracking, penalties |
ImageMarketplace | VM image publishing, ratings, revenue sharing |
Rust Crates
| Crate | Purpose |
|---|---|
aleph-common | Shared types, config, crypto, metrics |
aleph-chain | Chain watcher, contract bindings (alloy) |
aleph-message | Message types and validation |
aleph-storage | Content-addressed storage, Merkle proofs, erasure coding |
aleph-network | P2P networking (libp2p) |
aleph-api | HTTP API server (axum) |
aleph-scheduler | Job scheduling (coordinator only) |
aleph-executor | VM execution (Firecracker/QEMU) |
aleph-vm-networking | VM TAP interfaces, nftables, port forwarding |
aleph-node | Binary entry point (CLI, config, runtime) |
aleph-audit | Security auditing and compliance |
aleph-marketplace | Image 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