mirror of
https://github.com/lux-apps/papers.git
synced 2026-10-30 18:15:21 +00:00
The seven engine specifications (lux-{photon,wave,nova,nebula,prism,ray,field}-protocol)
were fragmented short notes documenting layers of the same Quasar consensus stack.
This commit merges them into a single canonical reference, lux-consensus-engines.tex,
that uses one preamble, one set of theorems, one bibliography, and one composition
chapter showing how the engines layer into the LP-020 finality pipeline.
The seven originals are reduced to single-page breadcrumb stubs pointing at the
consolidated paper; their sections/ content is preserved on disk for git history.
- new: lux-consensus-engines/ (50 pages, 646KB PDF, ~2900 lines tex)
- breadcrumbs: each original keeps cover + title + stub paragraph naming its chapter
- composition: chapter 9 records the layered contract Photon < Wave < Nova < ...
- bibliography: consolidated from the seven original thebibliography blocks
53 lines
2.0 KiB
TeX
53 lines
2.0 KiB
TeX
\section{The Photon Protocol}
|
|
|
|
\label{sec:photon-protocol}
|
|
|
|
\subsection{Pipelined Sampling}
|
|
|
|
\begin{algorithm}[H]
|
|
\caption{Photon Protocol --- Pipelined Consensus}
|
|
\label{alg:photon-photon-core}
|
|
\begin{algorithmic}[1]
|
|
\Require Validator $v$, pipeline depth $m$
|
|
\Require Parameters: $k$ (sample size), $\alpha$ (quorum), $\beta$ (threshold)
|
|
\State $\text{pipeline}[] \gets$ array of $m$ slots, initially empty
|
|
\Loop
|
|
\State \Comment{Fill empty slots with pending transactions}
|
|
\For{each empty slot $s$}
|
|
\If{$\exists$ pending transaction $t_s$}
|
|
\State $\text{pipeline}[s] \gets t_s$; $D_{s,c} \gets 0$ for all $c$
|
|
\EndIf
|
|
\EndFor
|
|
\State $S \gets \text{RandomSample}(V \setminus \{v\}, k)$
|
|
\State \Comment{Batch query: ask for all pipeline transactions at once}
|
|
\State Query each $u \in S$ for $\{\text{col}(u, t_s) : s \in \text{active slots}\}$
|
|
\For{each active slot $s$ with transaction $t_s$}
|
|
\For{each color $c$}
|
|
\State $n_c \gets |\{u \in S : \text{col}(u, t_s) = c\}|$
|
|
\If{$n_c \geq \alpha k$}
|
|
\State $D_{s,c} \gets D_{s,c} + 1$
|
|
\EndIf
|
|
\EndFor
|
|
\State $\text{col}(v, t_s) \gets \arg\max_c D_{s,c}$
|
|
\If{$\max_c D_{s,c} \geq \beta$}
|
|
\State \textbf{finalize} $t_s$ with color $\arg\max_c D_{s,c}$
|
|
\State Free slot $s$
|
|
\EndIf
|
|
\EndFor
|
|
\EndLoop
|
|
\end{algorithmic}
|
|
\end{algorithm}
|
|
|
|
\subsection{Message Format}
|
|
|
|
Each query message carries a vector of $m$ transaction identifiers, and each response
|
|
carries a vector of $m$ color preferences. The message overhead compared to single-transaction
|
|
queries is $O(m)$ per message, resulting in amortized $O(1)$ per transaction per round.
|
|
|
|
For $m = 100$ transactions and 32-byte transaction IDs + 1-byte color each, the query
|
|
overhead is $100 \times 33 = 3.3$KB, well within typical UDP datagram limits.
|
|
|
|
%% -----------------------------------------------------------------------
|
|
%% 4. SAFETY ANALYSIS
|
|
%% -----------------------------------------------------------------------
|