Files

73 lines
2.8 KiB
TeX

\section{Architecture}
\subsection{Network Topology}
Zoo EVM operates as an L2 subnet on the Lux Network. The Lux L1 provides validator management (P-Chain), asset transfers (X-Chain), and a general-purpose EVM (C-Chain). Zoo adds a specialized execution environment with 20 precompiles optimized for AI and DeSci workloads.
\begin{center}
\begin{tikzpicture}[
box/.style={draw, rounded corners, minimum width=3.2cm, minimum height=0.8cm, align=center, font=\small},
arrow/.style={-{Stealth[length=3mm]}, thick}
]
\node[box, fill=blue!10] (lux) at (0,4) {Lux Network (L1)\\P $\cdot$ X $\cdot$ C $\cdot$ D Chains};
\node[box, fill=green!10] (zoo) at (-3,2) {Zoo EVM (L2)\\20 Precompiles};
\node[box, fill=yellow!10] (liq) at (3,2) {Regulated EVM (L2)\\19 Precompiles};
\node[box, fill=green!10] (gov) at (-3,0) {ZIPs Governance\\DAO Treasury};
\node[box, fill=green!10] (ai) at (0,0) {AI Mining\\Proof-of-Compute};
\node[box, fill=green!10] (sci) at (3,0) {DeSci Layer\\Experience Ledger};
\draw[arrow] (lux) -- (zoo);
\draw[arrow] (lux) -- (liq);
\draw[arrow] (zoo) -- (gov);
\draw[arrow] (zoo) -- (ai);
\draw[arrow] (zoo) -- (sci);
\draw[<->, dashed, thick] (zoo) -- (liq) node[midway,above,font=\scriptsize] {bridge};
\end{tikzpicture}
\end{center}
\subsection{Chain Parameters}
\begin{table}[h]
\centering
\begin{tabular}{lrrr}
\toprule
\textbf{Parameter} & \textbf{Devnet} & \textbf{Testnet} & \textbf{Mainnet} \\
\midrule
EVM Chain ID & 200202 & 200201 & 200200 \\
Lux Network ID & 3 & 2 & 1 \\
Validators & 5 & 5 & 5 \\
Native Token & ZOO & ZOO & ZOO \\
Total Supply & \multicolumn{3}{c}{1,000,000,000 (1B)} \\
Decimals & \multicolumn{3}{c}{18} \\
Block Gas Limit & \multicolumn{3}{c}{15,000,000} \\
Target Block Rate & \multicolumn{3}{c}{2 seconds} \\
\bottomrule
\end{tabular}
\caption{Zoo EVM chain parameters.}
\end{table}
\subsection{Single-Binary Node Design}
The \texttt{zoo-evm} binary implements a self-installing plugin architecture:
\begin{algorithm}
\caption{Zoo EVM Self-Installing Plugin}
\begin{algorithmic}[1]
\IF{environment variable \texttt{LUX\_VM\_TRANSPORT} is set}
\STATE Enter EVM plugin mode (subprocess of Lux node)
\STATE Version: \texttt{Zoo-EVM/\{version\} [node=\{luxd\}, rpcchainvm=\{protocol\}]}
\STATE Call \texttt{runner.Run(versionStr)}
\ELSE
\STATE Parse CLI flags via \texttt{config.BuildFlagSet()}
\STATE Load node configuration
\STATE Install self as plugin: \texttt{symlink(self, pluginDir/\{EVM\_ID\})}
\STATE Create Lux node: \texttt{app.New(nodeConfig)}
\STATE Block: \texttt{app.Run(nodeApp)}
\ENDIF
\end{algorithmic}
\end{algorithm}
This design means one compiled binary serves as both the Lux node process and the EVM plugin subprocess. The node spawns itself as a child process via the plugin symlink, detecting the mode from the \texttt{LUX\_VM\_TRANSPORT} environment variable.