Files
papers/lux-fhe-smart-contracts/sections/05-fhe-vm-architecture-on-liquidfhe-chain.tex
zeekay 663cc83ca3 docs(papers): ZAP stack + cert profile modes + pitch decks (LP-186..300)
Companion LaTeX papers to luxfi/LPs:
- lp-200-zap-stack: full ZAP-as-substrate paper (10-layer model, deco-
  mplected concerns, performance).
- lp-200-lux-vs-avalanche-diff: code-translation appendix.
- lp-203-gpu-native-verify, lp-205-pipelined-quasar, lp-208-dag-mempool,
  lp-209-mysticeti-ordering, lp-210-block-stm, lp-211-cross-shard-atomic,
  lp-217-cert-profile-modes, lp-218-zap-p3q-pq-rollup,
  lp-220-p3q-corona-magnetar, lp-221-stark-fri-verifier,
  lp-300-schema-registry.

Pitch / outreach decks (luxcover.sty templated):
- blackrock-nahmii-pitch, corporate-dao-stack-analysis,
  nahmii-patent-acquisition, pq-patent-family-future-infringers,
  lux-substrate-platform-pitch, w3a-foundation-membership,
  multi-validator-scale, vfs-archive-cost-study.

Edits aligning to LP-217 / LP-200:
- lp-020-quasar-consensus 02-system-model + 08-performance.
- lp-073-pulsar 11-quasar.
- lp-103-omnichain-explorer 03-chain-support.
- lp-104-graph-engine.
- lp-201-zap-universal-wire/wire-inventory.csv.
- lp-306-lx-social-dex sections/02.
- lux-adoption-roadmap, lux-chain-architecture,
  lux-consensus-engines/08-composition, lux-crypto-agility,
  lux-evm-precompile-engineering/02, lux-fhe-smart-contracts/05,
  lux-quasar-composition/04+06+10, lux-reproducible-builds.
- INDEX.md cross-links the new papers.
2026-06-10 22:35:37 -07:00

73 lines
2.5 KiB
TeX

\section{FHE VM Architecture on LiquidFHE Chain}
\label{sec:fhe-vm}
\subsection{Chain Configuration}
The LiquidFHE chain is a Lux L1 with the following configuration:
\begin{table}[ht]
\centering
\caption{LiquidFHE chain parameters.}
\label{tab:chain-config}
\begin{tabular}{lr}
\toprule
\textbf{Parameter} & \textbf{Value} \\
\midrule
Block time & 2\,s \\
Block gas limit & 100M gas \\
FHE precompile address & \texttt{0x0700...0000} \\
TFHE parameter set & $N = 1024$, $q \approx 2^{27}$, 128-bit security \\
BFV parameter set & $N = 4096$, $q = 2^{218}$, 128-bit security \\
Max ciphertext size (BFV) & 32\,KB \\
Max ciphertext size (TFHE) & 2\,KB \\
Bootstrapping key size & 48\,MB \\
\bottomrule
\end{tabular}
\end{table}
\subsection{Precompile Interface}
The FHE precompile at \texttt{0x0700000000000000000000000000000000000000} exposes the
following operations via ABI-encoded function selectors:
\begin{table}[ht]
\centering
\caption{FHE precompile operations and gas costs.}
\label{tab:fhe-gas}
\begin{tabular}{llr}
\toprule
\textbf{Operation} & \textbf{Selector} & \textbf{Gas Cost} \\
\midrule
\texttt{fheAdd(ct, ct)} & \texttt{0x01} & 65{,}000 \\
\texttt{fheSub(ct, ct)} & \texttt{0x02} & 65{,}000 \\
\texttt{fheMul(ct, ct)} & \texttt{0x03} & 320{,}000 \\
\texttt{fheGte(ct, ct)} & \texttt{0x10} & 480{,}000 \\
\texttt{fheLte(ct, ct)} & \texttt{0x11} & 480{,}000 \\
\texttt{fheEq(ct, ct)} & \texttt{0x12} & 480{,}000 \\
\texttt{fheCMux(ct, ct, ct)} & \texttt{0x20} & 520{,}000 \\
\texttt{fheBootstrap(ct)} & \texttt{0x30} & 800{,}000 \\
\texttt{fheEncrypt(pt, pk)} & \texttt{0x40} & 120{,}000 \\
\texttt{fheDecrypt(ct, proof)} & \texttt{0x41} & 150{,}000 \\
\bottomrule
\end{tabular}
\end{table}
\subsection{Decryption Authorization}
Decryption is the most sensitive operation. It must be authorized by the ciphertext
owner (the entity whose public key was used for encryption). The FHE precompile
enforces access control:
\begin{enumerate}[leftmargin=2em]
\item Each ciphertext is tagged with an \emph{owner address}.
\item \texttt{fheDecrypt} requires a signature from the owner address authorizing
decryption of the specific ciphertext handle.
\item Decryption produces a plaintext that is returned to the caller but
\emph{not stored on-chain}. The on-chain state remains encrypted.
\end{enumerate}
%% ========================================================================
%% 6. PRACTICAL APPLICATIONS
%% ========================================================================