mirror of
https://github.com/lux-apps/papers.git
synced 2026-10-30 18:15:21 +00:00
Restructured from flat .tex/.pdf files into per-paper subdirectories. Added Antje Worring as co-author on all papers. Synced PDFs to pdfs/ for download site.
73 lines
2.1 KiB
TeX
73 lines
2.1 KiB
TeX
\section{Lux Implementation}
|
|
|
|
|
|
\subsection{Integration Architecture}
|
|
|
|
Lux's multi-chain architecture requires Verkle tree integration at three levels:
|
|
|
|
\begin{enumerate}
|
|
\item \textbf{P-Chain}: Platform chain managing validators and appchains
|
|
\item \textbf{C-Chain}: EVM-compatible contract chain
|
|
\item \textbf{X-Chain}: UTXO-based exchange chain
|
|
\end{enumerate}
|
|
|
|
\subsection{P-Chain State Model}
|
|
|
|
The P-Chain maintains:
|
|
\begin{itemize}
|
|
\item Validator sets: $\mathcal{V} = \{(pk_i, stake_i, end_i)\}$
|
|
\item Delegations: $\mathcal{D} = \{(del_i, val_i, amount_i)\}$
|
|
\item Appchain configurations: $\mathcal{S} = \{(id_i, params_i)\}$
|
|
\end{itemize}
|
|
|
|
Verkle commitment:
|
|
\begin{equation}
|
|
C_{P} = \mathsf{Commit}(\mathcal{V} || \mathcal{D} || \mathcal{S})
|
|
\end{equation}
|
|
|
|
\subsection{C-Chain EVM Integration}
|
|
|
|
EVM state comprises:
|
|
\begin{itemize}
|
|
\item Account states: nonce, balance, storageRoot, codeHash
|
|
\item Contract storage: key-value mappings
|
|
\item Contract code: bytecode blobs
|
|
\end{itemize}
|
|
|
|
Account encoding in Verkle tree:
|
|
\begin{equation}
|
|
\mathsf{Account}(addr) = \{nonce || balance || code_{hash} || storage_{root}\}
|
|
\end{equation}
|
|
|
|
Storage slot mapping:
|
|
\begin{equation}
|
|
\mathsf{StorageKey}(addr, slot) = \mathsf{Hash}(addr || slot)
|
|
\end{equation}
|
|
|
|
\subsection{State Transition Proofs}
|
|
|
|
For transaction $tx$ modifying state from $S$ to $S'$:
|
|
|
|
\begin{equation}
|
|
\pi_{transition} = (\pi_{pre}, \pi_{post}, \pi_{witnesses})
|
|
\end{equation}
|
|
|
|
where:
|
|
\begin{itemize}
|
|
\item $\pi_{pre}$: Proofs for pre-state values
|
|
\item $\pi_{post}$: Proofs for post-state values
|
|
\item $\pi_{witnesses}$: Auxiliary data (e.g., code proofs)
|
|
\end{itemize}
|
|
|
|
\subsection{Cross-Chain Verification}
|
|
|
|
Appchain validators verify cross-chain transfers using Verkle proofs:
|
|
|
|
\begin{algorithmic}[1]
|
|
\STATE \textbf{function} $\mathsf{VerifyCrossChain}(proof, sourceRoot, targetRoot)$
|
|
\STATE $valid_{source} \gets \mathsf{VerifyProof}(proof.source, sourceRoot)$
|
|
\STATE $valid_{target} \gets \mathsf{VerifyProof}(proof.target, targetRoot)$
|
|
\STATE \textbf{return} $valid_{source} \land valid_{target}$
|
|
\end{algorithmic}
|
|
|