mirror of
https://github.com/lux-apps/papers.git
synced 2026-10-30 18:15:21 +00:00
49 lines
3.1 KiB
TeX
49 lines
3.1 KiB
TeX
\section{Conclusion}
|
|
|
|
|
|
EVM precompiles are the mechanism by which blockchain VMs gain new cryptographic
|
|
capabilities without changing the EVM instruction set. Engineering them correctly requires
|
|
attention to determinism, gas pricing, input validation, error handling, and
|
|
cross-platform testing. Done well, precompiles enable practical use of advanced
|
|
cryptography (post-quantum signatures, FHE, pairing-based proofs) in smart contracts
|
|
at gas costs comparable to basic operations.
|
|
|
|
Our 20 precompiles provide Lux Network's C-Chain with a comprehensive cryptographic
|
|
toolkit. Each one follows the same engineering discipline: deterministic execution,
|
|
gas cost calibrated to wall-clock time, subgroup and input validation, and four levels
|
|
of testing.
|
|
|
|
\subsection*{Canonical c-abi migration (cevm v0.46.0--v0.47.0)}
|
|
|
|
cevm v0.46.0 (Phase 5b) rewired \texttt{cevm/lib/cevm\_precompiles/bls.cpp}
|
|
and \texttt{kzg.cpp} (564 lines of in-tree blst) into thin
|
|
\texttt{extern "C"} wiring through the brand-neutral
|
|
\texttt{luxcpp/crypto/bls} and \texttt{luxcpp/crypto/kzg} c-abi
|
|
(EIP-2537 BLS12-381 G1/G2 add/mul/msm + pairing\_check + map\_fp/fp2,
|
|
EIP-4844 KZG point-evaluation). Production binaries
|
|
(\texttt{libcevm\_precompiles.a}, \texttt{libevm.dylib},
|
|
\texttt{libevm-kernel-metal.a}) link zero blst symbols, asserted in
|
|
CI by \texttt{cevm/test/unittests/no\_blst\_in\_production\_test.sh}
|
|
on every build (\texttt{nm} + \texttt{otool -L} + \texttt{nm -a} all
|
|
clean). cevm v0.47.0 (commit \texttt{aea6ba08}) migrated 7 additional
|
|
algorithms to forward-shim headers calling the canonical luxcpp/crypto
|
|
c-abi, removing 2 107 lines of duplicated implementation. Pairing
|
|
plus keccak / secp256k1 are deferred pending relative-include flatten
|
|
and legacy API consumer migration. The subgroup policy
|
|
(\texttt{SubgroupPolicy::CheckAndReject} for validator pubkeys,
|
|
\texttt{ClearIfHashToCurve} only for hash-to-curve outputs) lives in
|
|
the canonical c-abi and is exercised against blst as a test-only
|
|
oracle pinned at \texttt{luxcpp/crypto/bls/test/cmake/}.
|
|
|
|
\begin{thebibliography}{99}
|
|
\bibitem{eip196} Reitwiessner, C. ``EIP-196: Precompiled Contracts for Addition and Scalar Multiplication on the Elliptic Curve alt\_bn128.'' 2017.
|
|
\bibitem{eip197} Reitwiessner, C. ``EIP-197: Precompiled Contracts for Optimal Ate Pairing Check on the Elliptic Curve alt\_bn128.'' 2017.
|
|
\bibitem{eip2537} Vlasov, A. et al. ``EIP-2537: Precompile for BLS12-381 Curve Operations.'' 2020.
|
|
\bibitem{yellowpaper} Wood, G. ``Ethereum: A Secure Decentralised Generalised Transaction Ledger (Yellow Paper).'' 2014.
|
|
\bibitem{fips204} NIST. ``Module-Lattice-Based Digital Signature Standard (ML-DSA).'' FIPS 204, 2024.
|
|
\bibitem{falcon} Prest, T. et al. ``FALCON: Fast-Fourier Lattice-Based Compact Signatures over NTRU.'' NIST PQC, 2020.
|
|
\bibitem{lux-lightspeed-dex} Lux Industries, Inc. ``Lux Lightspeed DEX: On-Chain Order Book with Sub-Second Finality.'' Lux Technical Report.
|
|
\bibitem{lux-lp9999} Lux Industries, Inc. ``LP-9999: DEX V4 Receipt-Settlement Precompile (\texttt{0x9999}).'' Lux Proposal (Standards Track, Core). \url{https://github.com/luxfi/lps/blob/main/LPs/lp-9999-dex-v4-receipt-settlement-precompile.md}.
|
|
\end{thebibliography}
|
|
|