Files
papers/hanzo-aci/sections/02-system-architecture.tex

53 lines
2.2 KiB
TeX

\section{System Architecture}
\label{sec:architecture}
\subsection{Network Topology}
ACI consists of four node types:
\begin{definition}[ACI Node Types]
\begin{itemize}[leftmargin=1.1em]
\item \textbf{Validators}: Maintain consensus, verify PoAI attestations, finalize settlements. Stake: 100,000 ACI tokens.
\item \textbf{Workers}: Provide GPU compute, execute AI jobs, generate TEE attestations. Stake: proportional to declared capacity.
\item \textbf{Clients}: Submit jobs, escrow payment, receive results. No stake required.
\item \textbf{Verifiers}: Specialized validators that perform statistical verification of worker outputs. Stake: 50,000 ACI tokens.
\end{itemize}
\end{definition}
\subsection{Job Lifecycle}
\begin{algorithm}[H]
\caption{ACI Job Lifecycle}
\label{alg:lifecycle}
\begin{algorithmic}[1]
\Require Job spec $J = (\text{model}, \text{input}, \text{SLA}, \text{budget})$
\State \textbf{Phase 1: Matching} (fast-path, $< 200$ms)
\State Client broadcasts $J$ to routers
\State Routers query HMM for quote: $(\text{worker}, \text{price}, \text{ETA})$
\State Client accepts, escrows payment $p$
\State \textbf{Phase 2: Execution} (off-chain)
\State Worker loads model, processes input within TEE
\State Worker generates output $y$ and attestation $\sigma$
\State Worker submits $(y, \sigma)$ to settlement layer
\State \textbf{Phase 3: Verification} (PoAI)
\State Verifiers sample and check attestation $\sigma$
\State With probability $\alpha$, re-execute and compare
\State Aggregate verification votes
\State \textbf{Phase 4: Settlement} (settlement-path, $< 2$s)
\State If verified: release $p$ to worker, distribute fees
\State If disputed: enter arbitration protocol
\State Update worker quality score
\end{algorithmic}
\end{algorithm}
\subsection{Layered Architecture}
\begin{enumerate}[leftmargin=1.4em]
\item \textbf{Networking Layer}: libp2p-based P2P network with DHT discovery, gossip propagation, and direct worker-client channels for data transfer.
\item \textbf{Consensus Layer}: Dual-track consensus (fast-path + settlement-path).
\item \textbf{Execution Layer}: AIVM for on-chain operations, off-chain TEE for AI compute.
\item \textbf{Application Layer}: HMM marketplace, job scheduling, quality tracking.
\end{enumerate}