mirror of
https://github.com/lux-apps/papers.git
synced 2026-10-30 18:15:21 +00:00
Resolves high-severity review findings: anachronistic dates aligned to citation floors; arithmetic corrected to match formulas; internal contradictions collapsed to the body-supported value; LP self-references aligned to filenames; liquidity-surface repo paths scrubbed; AI-slop trimmed. PDFs rebuilt separately.
82 lines
2.2 KiB
TeX
82 lines
2.2 KiB
TeX
\section{Implementation}
|
|
|
|
|
|
\subsection{Validator Node Architecture}
|
|
|
|
\begin{lstlisting}[language=Go]
|
|
type QuantumValidator struct {
|
|
dilithiumKey *dilithium.PrivateKey // Post-quantum key
|
|
sphincsKey *sphincs.PrivateKey // Long-term key
|
|
kyberKey *kyber.PrivateKey // Key exchange
|
|
|
|
// Backward compatibility
|
|
ecdsaKey *ecdsa.PrivateKey // Legacy key
|
|
hybridMode bool // Enable dual signing
|
|
}
|
|
|
|
func (v *QuantumValidator) SignBlock(block *Block) *Signature {
|
|
if v.hybridMode {
|
|
ecdsaSig := ecdsa.Sign(v.ecdsaKey, block.Hash())
|
|
dilithiumSig := dilithium.Sign(v.dilithiumKey, block.Hash())
|
|
return &Signature{
|
|
ECDSA: ecdsaSig,
|
|
Dilithium: dilithiumSig,
|
|
}
|
|
}
|
|
|
|
// Pure quantum mode
|
|
return dilithium.Sign(v.dilithiumKey, block.Hash())
|
|
}
|
|
\end{lstlisting}
|
|
|
|
\subsection{Network Protocol}
|
|
|
|
\textbf{Message format}:
|
|
\begin{verbatim}
|
|
+----------------+------------------+-------------------+
|
|
| Block Header | ML-DSA Sig | Aggregate Votes |
|
|
| (128 bytes) | (3,293 bytes) | (3,293 bytes) |
|
|
+----------------+------------------+-------------------+
|
|
Total: 6,714 bytes
|
|
\end{verbatim}
|
|
|
|
\textbf{Comparison with ECDSA}:
|
|
\begin{itemize}
|
|
\item ECDSA block: 128 + 65 + 65 = 258 bytes
|
|
\item ML-DSA block: 6,714 bytes
|
|
\item Overhead: 26$\times$ larger (acceptable for 50K TPS)
|
|
\end{itemize}
|
|
|
|
\subsection{Migration Path}
|
|
|
|
\textbf{Step 1}: Validators generate ML-DSA keys
|
|
\begin{lstlisting}[language=bash]
|
|
luxd validator generate-pq-keys \
|
|
--type dilithium \
|
|
--output /etc/lux/pq-keys.json
|
|
\end{lstlisting}
|
|
|
|
\textbf{Step 2}: Register quantum keys on-chain
|
|
\begin{lstlisting}[language=Go]
|
|
tx := RegisterQuantumKey{
|
|
ValidatorID: validatorID,
|
|
DilithiumPubKey: pubkey,
|
|
Proof: zkProof, // Proof of key ownership
|
|
}
|
|
\end{lstlisting}
|
|
|
|
\textbf{Step 3}: Enable hybrid mode
|
|
\begin{lstlisting}[language=bash]
|
|
luxd --enable-quantum-consensus \
|
|
--hybrid-mode=true \
|
|
--quantum-threshold=0.66
|
|
\end{lstlisting}
|
|
|
|
\textbf{Step 4}: Full quantum activation (2030)
|
|
\begin{lstlisting}[language=bash]
|
|
luxd --enable-quantum-consensus \
|
|
--hybrid-mode=false \
|
|
--deprecate-ecdsa
|
|
\end{lstlisting}
|
|
|