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.
107 lines
3.8 KiB
TeX
107 lines
3.8 KiB
TeX
\section{Cross-Ecosystem Light Client}
|
|
\label{sec:lightclient}
|
|
|
|
\subsection{Lux Light Client on Ethereum}
|
|
|
|
For Lux-to-Ethereum transfers, an on-chain light client on Ethereum tracks Lux validator set changes and verifies finalized block headers:
|
|
|
|
\begin{definition}[Lux Light Client Contract]
|
|
The light client contract on Ethereum maintains:
|
|
\begin{itemize}
|
|
\item Current Lux epoch number $e$
|
|
\item Current validator set commitment $\mathsf{VRoot}_e$
|
|
\item Total validator stake $W_e$
|
|
\item Latest verified block height $h_{\text{latest}}$
|
|
\end{itemize}
|
|
\end{definition}
|
|
|
|
\begin{algorithm}[H]
|
|
\caption{Light Client Block Header Verification}
|
|
\label{alg:lightclient}
|
|
\begin{algorithmic}[1]
|
|
\Procedure{VerifyHeader}{blockHeader $B$, proof $\Pi$}
|
|
\State Parse $\Pi = (\sigma_{\text{agg}}, \mathsf{bitmap}, \mathsf{valProofs})$
|
|
\State Reconstruct signer set from $\mathsf{bitmap}$ and $\mathsf{VRoot}_e$
|
|
\State Verify Merkle proofs in $\mathsf{valProofs}$ for each signer
|
|
\State $W_{\text{signed}} \gets \sum_{\text{signers}} w_i$
|
|
\State \textbf{require} $W_{\text{signed}} \geq 2W_e/3$
|
|
\State $d \gets \mathsf{SHA256}(B.\text{serialize}())$
|
|
\State \textbf{require} BLS12-381 pairing check on $(\sigma_{\text{agg}}, d)$ passes
|
|
\State $h_{\text{latest}} \gets B.\mathsf{height}$
|
|
\State Store $B.\mathsf{stateRoot}$
|
|
\EndProcedure
|
|
\end{algorithmic}
|
|
\end{algorithm}
|
|
|
|
\subsection{State Proof Verification}
|
|
|
|
After a block header is verified, state proofs (Merkle Patricia Trie proofs) verify specific state entries:
|
|
|
|
\begin{algorithm}[H]
|
|
\caption{State Proof Verification on Ethereum}
|
|
\label{alg:state_proof}
|
|
\begin{algorithmic}[1]
|
|
\Procedure{VerifyState}{stateRoot, key, value, merkleProof}
|
|
\State $\mathsf{computedRoot} \gets \mathsf{VerifyMPT}(\mathsf{key}, \mathsf{value}, \mathsf{merkleProof})$
|
|
\State \textbf{require} $\mathsf{computedRoot} = \mathsf{stateRoot}$
|
|
\State \Return true
|
|
\EndProcedure
|
|
\end{algorithmic}
|
|
\end{algorithm}
|
|
|
|
\subsection{Gas Cost Analysis}
|
|
|
|
\begin{table}[H]
|
|
\centering
|
|
\caption{On-chain light client gas costs on Ethereum.}
|
|
\label{tab:lc_gas}
|
|
\begin{tabular}{lrr}
|
|
\toprule
|
|
\textbf{Operation} & \textbf{Gas Cost} & \textbf{Notes} \\
|
|
\midrule
|
|
Header verification (BLS) & 250,000 & BLS12-381 via EIP-2537 \\
|
|
Validator set update & 400,000 & Epoch transition \\
|
|
MPT state proof & 50,000--150,000 & Depth-dependent \\
|
|
Token mint (ERC-20) & 50,000 & Standard transfer \\
|
|
\midrule
|
|
\textbf{Total per transfer} & \textbf{350,000--450,000} & First transfer per header \\
|
|
\textbf{Amortized (batched)} & \textbf{100,000--200,000} & Shared header verification \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\end{table}
|
|
|
|
Header verification can be amortized across multiple transfers in the same block, reducing per-transfer cost.
|
|
|
|
\subsection{Ethereum Light Client on Lux}
|
|
|
|
For Ethereum-to-Lux transfers, a Lux C-Chain contract tracks Ethereum's beacon chain via the sync committee:
|
|
|
|
\begin{definition}[Ethereum Sync Committee Light Client]
|
|
The contract tracks:
|
|
\begin{itemize}
|
|
\item Current sync committee public keys (512 validators)
|
|
\item Next sync committee commitment
|
|
\item Latest finalized beacon block root
|
|
\end{itemize}
|
|
Updates occur every sync committee period ($\sim$27 hours) with BLS aggregate signature verification.
|
|
\end{definition}
|
|
|
|
\begin{table}[H]
|
|
\centering
|
|
\caption{Ethereum light client costs on Lux C-Chain.}
|
|
\label{tab:eth_lc}
|
|
\begin{tabular}{lrr}
|
|
\toprule
|
|
\textbf{Operation} & \textbf{Gas (Lux C-Chain)} & \textbf{Notes} \\
|
|
\midrule
|
|
Sync committee update & 300,000 & Every $\sim$27 hours \\
|
|
Finality proof & 200,000 & Per Ethereum block \\
|
|
Storage proof (MPT) & 80,000 & Per key verified \\
|
|
Token release & 50,000 & ERC-20 transfer \\
|
|
\midrule
|
|
\textbf{Total per transfer} & \textbf{330,000} & Amortized header cost \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\end{table}
|
|
|