Skip to content

hianova/io_oi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌌 io_oi: The Hyper-Scale Trust Layer

io_oi is a next-generation decentralized consensus protocol designed for the IoT and high-frequency trading era. It combines the speed of zero-copy serialization with the security of WASM sandboxing and a unique L1/L2 tiered architecture.


🚀 Key Features

  • ⚡ Zero-Copy Core: Built on rkyv for near-instantaneous serialization and deserialization.
  • 🛡️ WASM Sandboxing: Arbitrators run in wasmtime with strict fuel limits and resource isolation.
  • 💾 DualCache-FF: A high-performance two-tier storage engine (RAM + Disk) with probabilistic pruning.
  • 🔒 Hardened Security:
    • Replay Protection: Sequence-based union validation.
    • Double-Sign Prevention: Mandatory Write-Ahead Logging (WAL) with fsync.
    • Malformed Packet Defense: Strict rkyv validation on every network boundary.
  • 🌐 Flexible Governance:
    • Trust Modes: Full (Global Broadcast) or Localized (Gossip-based).
    • Control Modes: Strict (Leader-managed) or Competitive (Decentralized Election).

🏗️ Architecture (Local-First)

io_oi reverses the traditional distributed database philosophy by placing the high-performance cache at the very top of the stack.

graph TD
    User[User / AI App] -->|9ns Read / 113ns Write| A[DualCache-FF]
    A -->|Write-Behind Channel| B[io_oi Consensus Layer]
    B -->|iroh QUIC| C[P2P Network]
    C --> D{Leader / Arbitrator}
    D -->|WASM Signed| E[Signed Record]
    E -->|Broadcast| F[Global State Sync]
    F -->|Background Update| A
Loading

Local-First & Write-Behind

By placing DualCache-FF on top, applications experience near-native RAM latency. The heavy lifting of network consensus and WASM arbitration happens asynchronously in the background, making the system ideal for real-time AI training and edge computing.


📂 專案結構 (Project Structure)

  • core/: 核心協議庫。定義了基礎資料結構、DualCacheFF 儲存引擎介面。
  • node/: 節點伺服器。整合 Iroh P2P、RESP 閘道器與 WASM 執行環境。
  • python-bindings/: servergo-ai 模組。提供 Python 使用者(AI 工程師)零拷貝存取 DualCacheFF 的能力,支援 numpy 矩陣。
  • cli/: 命令列工具。負責創世管理、Peer 加入及自然語言指令。
  • wasm/: 仲裁合約。定義 WIT 介面用於編寫自定義共識邏輯。

🛠️ Getting Started

Prerequisites

  • Rust 2024 Edition
  • Cargo

Building

cargo build --release

Running Tests

We use a comprehensive test suite covering core consensus, security attacks, and chaos engineering.

cargo test -p io_oi_node --test protocol_tests

Running Dashboard

To monitor the consensus network in real-time, launch the Bun-based dashboard:

cd dashboard
bun dev

Open http://localhost:3000 to access the Leader Control Panel.


🛡️ Security Audit Paths

We have implemented rigorous testing for:

  1. rkyv Validation: Preventing Segfaults from malicious payloads.
  2. WASM Resource Limits: Protecting against infinite loops and memory exhaustion.
  3. Double Sign Detection: Cryptographic proof of Leader misconduct.
  4. Replay Attack Prevention: Ensuring every vote is unique and fresh.

📜 License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors