Files
zeekay abf99d05fc papers: reorganize into per-paper dirs, add Antje Worring as co-author
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.
2026-04-18 21:50:07 -07:00

95 lines
2.9 KiB
TeX

\section{Implementation}
\label{sec:implementation}
%%==========================================================================
\subsection{Architecture Overview}
LRP is implemented across three layers:
\begin{enumerate}[leftmargin=1.5em]
\item \textbf{P-Chain native extension}: Go implementation extending the existing P-Chain
VM to track restaking commitments, operator registrations, and slash events. Core data
structures added to the P-Chain state trie include \texttt{OperatorRecord},
\texttt{AVSRecord}, and \texttt{RestakingCommitment}.
\item \textbf{C-Chain smart contracts}: Solidity contracts for \texttt{OperatorVault},
\texttt{LRPCoordinator}, \texttt{AVSRegistry}, and \texttt{InsuranceFund}.
\item \textbf{LRP Node Sidecar}: Go daemon running alongside the Lux node, monitoring
AVS task queues, verifying proofs, and submitting slash/reward transactions.
\end{enumerate}
\subsection{P-Chain State Extensions}
The P-Chain state is extended with:
\begin{verbatim}
type OperatorRecord struct {
NodeID ids.NodeID
BLSPublicKey bls.PublicKey
StakeAmount uint64
Allocations map[ids.ID]uint32 // AVS ID -> allocation bps
ReputationScore uint16
FrozenUntil time.Time
}
type AVSRecord struct {
AVSID ids.ID
SlasherContract common.Address
MinSecurity uint64
MinOperators uint16
WithdrawDelay time.Duration
Category AVSCategory
}
\end{verbatim}
\subsection{Benchmark Results (Fuji Testnet)}
We deployed LRP on Lux Fuji testnet in 2025 with 200 simulated operators and
12 registered AVSs. Key performance metrics:
\begin{table}[H]
\centering
\caption{LRP Prototype Performance (Fuji Testnet)}
\label{tab:perf}
\begin{tabular}{lrr}
\toprule
\textbf{Operation} & \textbf{Median Latency} & \textbf{P99 Latency} \\
\midrule
Operator registration & 187 ms & 312 ms \\
AVS opt-in & 145 ms & 289 ms \\
Slash submission & 203 ms & 445 ms \\
Slash finalization & 1.87 s & 3.12 s \\
Reward distribution & 94 ms & 178 ms \\
Reputation update & 112 ms & 201 ms \\
\bottomrule
\end{tabular}
\end{table}
All operations satisfy the target latency budgets established in the LRP specification.
The slash finalization time of 1.87 s (median) represents the full path from proof
submission through veto window to P-Chain state update.
\subsection{Gas and Fee Analysis}
C-Chain smart contract gas costs:
\begin{table}[H]
\centering
\caption{LRP Smart Contract Gas Costs}
\label{tab:gas}
\begin{tabular}{lrr}
\toprule
\textbf{Function} & \textbf{Gas Used} & \textbf{Cost at 25 gwei} \\
\midrule
\texttt{registerOperator} & 187,432 & \$0.008 \\
\texttt{optIntoAVS} & 94,211 & \$0.004 \\
\texttt{depositToVault} & 68,923 & \$0.003 \\
\texttt{submitSlashProof} & 342,815 & \$0.015 \\
\texttt{distributeRewards} (50 ops) & 412,000 & \$0.018 \\
\texttt{withdrawFromVault} & 89,447 & \$0.004 \\
\bottomrule
\end{tabular}
\end{table}
%%==========================================================================