Files
papers/lux-evm-precompiles/sections/07-warp-message-verification-precompile.tex
zeekay 4a753bb639 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

46 lines
1.3 KiB
TeX

\section{Warp Message Verification Precompile}
\label{sec:warp}
\subsection{Interface}
The Warp precompile verifies cross-appchain BLS aggregate signature proofs in a single call:
\begin{lstlisting}[language=Solidity,caption={Warp verification precompile interface.},label={lst:warp}]
interface IWarpMessenger {
struct WarpMessage {
bytes32 sourceChainID;
bytes32 destinationChainID;
uint256 nonce;
bytes payload;
uint256 expiry;
uint256 gasLimit;
}
function verifyMessage(
WarpMessage calldata message,
bytes calldata signature, // 48 bytes BLS agg sig
bytes calldata signerBitmap // ceil(n/8) bytes
) external view returns (bool valid);
}
\end{lstlisting}
\subsection{Gas Cost}
The Warp precompile has a flat gas cost of 50,000 regardless of the source appchain's validator count, because all cryptographic work (public key aggregation and pairing check) is performed in optimized native code.
\begin{table}[H]
\centering
\caption{Warp verification gas: precompile vs.\ pure Solidity.}
\label{tab:warp_gas}
\begin{tabular}{lrr}
\toprule
\textbf{Validators} & \textbf{Solidity (BLS ops)} & \textbf{Precompile} \\
\midrule
100 & 166,065 & 50,000 \\
500 & 431,530 & 50,000 \\
1,000 & 731,530 & 50,000 \\
\bottomrule
\end{tabular}
\end{table}