mirror of
https://github.com/lux-apps/papers.git
synced 2026-10-30 18:15:21 +00:00
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.
98 lines
4.0 KiB
TeX
98 lines
4.0 KiB
TeX
\section{Wire Format}
|
|
|
|
Two new ZAP schema IDs allocated for this LP, in the range
|
|
\texttt{0xF0}--\texttt{0xFF}. The range is chosen to avoid collision
|
|
with LP-201's \texttt{0xD0}--\texttt{0xDF} reservation and with any
|
|
future rollup-substrate allocation in the \texttt{0xE0}--\texttt{0xEF}
|
|
range that LP-204 leaves open (note: LP-218 takes
|
|
\texttt{0xE0}--\texttt{0xEF} for rollup envelopes; LP-208 takes
|
|
\texttt{0xF0}--\texttt{0xFF}; no overlap).
|
|
|
|
\subsection{Schema \texttt{0xF0}: DAGHeader}
|
|
|
|
Carried on unidirectional QUIC streams (LP-201) from emitter to
|
|
peers; replicated to the DHT (LP-201 layer~C) under
|
|
\texttt{sha256(header.Bytes())}.
|
|
|
|
\begin{table}[h]
|
|
\centering
|
|
\small
|
|
\begin{tabular}{@{}llp{6.5cm}@{}}
|
|
\toprule
|
|
\textbf{Field} & \textbf{Type} & \textbf{Notes} \\
|
|
\midrule
|
|
\texttt{version} & \texttt{uint8} & DAG protocol version; activation initializes to \texttt{1} \\
|
|
\texttt{validator} & \texttt{[20]byte} & NodeID of the emitter \\
|
|
\texttt{epoch} & \texttt{uint64} & DAG epoch; advances on validator-set change \\
|
|
\texttt{seq} & \texttt{uint64} & Per-validator monotonic sequence number; gaps allowed \\
|
|
\texttt{timestamp} & \texttt{int64} & Emitter wall-clock at emission (Unix nanoseconds) \\
|
|
\texttt{parent\_hashes} & \texttt{[]bytes32} & Parent header hashes, one per other validator; zero-padded if no parent available; length-prefixed list \\
|
|
\texttt{tx\_count} & \texttt{uint16} & Number of tx hashes in this header \\
|
|
\texttt{tx\_hashes} & \texttt{[tx\_count][32]byte} & List of tx hashes for txs admitted since previous header \\
|
|
\texttt{body\_hash} & \texttt{[32]byte} & \texttt{sha256(tx\_hashes\_bytes)}; separate from header hash to allow body GC without invalidating header references \\
|
|
\texttt{sig} & \texttt{[96]byte} & BLS sig over the canonical pre-image; matches LP-022 BLS leg curve \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\caption{DAGHeader (schema \texttt{0xF0}) wire layout.}
|
|
\label{tab:dagheader}
|
|
\end{table}
|
|
|
|
The BLS pre-image for the signature is
|
|
\texttt{version $\|$ validator $\|$ epoch $\|$ seq $\|$ timestamp $\|$
|
|
parent\_hashes $\|$ body\_hash}. The \texttt{body\_hash} is the
|
|
content-address of the DAGBody keyed in the DHT.
|
|
|
|
\subsection{Schema \texttt{0xF1}: DAGBody}
|
|
|
|
Carried on bidirectional QUIC streams (LP-201) on
|
|
\texttt{DHTFindValue} response; stored in the DHT under
|
|
\texttt{body\_hash}.
|
|
|
|
\begin{table}[h]
|
|
\centering
|
|
\small
|
|
\begin{tabular}{@{}llp{7cm}@{}}
|
|
\toprule
|
|
\textbf{Field} & \textbf{Type} & \textbf{Notes} \\
|
|
\midrule
|
|
\texttt{version} & \texttt{uint8} & DAG protocol version; matches the parent DAGHeader \\
|
|
\texttt{tx\_count} & \texttt{uint16} & Number of txs \\
|
|
\texttt{tx\_bytes} & \texttt{[tx\_count][]byte} & Length-prefixed list of full tx bytes -- each tx is itself a ZAP frame \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\caption{DAGBody (schema \texttt{0xF1}) wire layout.}
|
|
\label{tab:dagbody}
|
|
\end{table}
|
|
|
|
A DAGBody is content-equivalent to a list of tx bytes. There is no
|
|
header re-embedded in the body -- the body is a pure container so
|
|
that the same body bytes can serve multiple equivalent DAGHeaders
|
|
that happen to commit to the same tx-set.
|
|
|
|
\subsection{Schema ID allocation}
|
|
|
|
\begin{table}[h]
|
|
\centering
|
|
\small
|
|
\begin{tabular}{@{}lll@{}}
|
|
\toprule
|
|
\textbf{Schema ID} & \textbf{Type} & \textbf{Notes} \\
|
|
\midrule
|
|
\texttt{0xC0}--\texttt{0xCB} & chains-VM wire (12 VMs) & LP-186 \\
|
|
\texttt{0xD0}--\texttt{0xDF} & ZAP P2P transport & LP-201 \\
|
|
\texttt{0xE0}--\texttt{0xEF} & rollup-VM envelopes & LP-218 \\
|
|
\texttt{0xF0} & DAGHeader & This LP \\
|
|
\texttt{0xF1} & DAGBody & This LP \\
|
|
\texttt{0xF2}--\texttt{0xFF} & Reserved & DAG extensions (Mysticeti ordering hints in LP-209, Block-STM speculation hints in LP-210, cross-shard parent pointers in LP-211) \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\caption{Cross-LP schema ID allocation map.}
|
|
\label{tab:schema-ids}
|
|
\end{table}
|
|
|
|
Schema ID rationale: the original LP-208 draft suggested
|
|
\texttt{0xE0}--\texttt{0xE1} but those collide with the rollup
|
|
substrate reservation that LP-218 finalizes. This LP uses
|
|
\texttt{0xF0}--\texttt{0xFF} instead. The change is mandatory --
|
|
schema IDs cannot overlap across LPs.
|