feat: all 22 explicit precompiles — remove pqcrypto/quantum/threshold umbrellas

This commit is contained in:
2026-04-12 19:36:30 -07:00
parent 4b9263cf35
commit c9b1d759ab
+54 -27
View File
@@ -1,8 +1,7 @@
// Lux EVM plugin — C-Chain EVM with all precompiles enabled.
//
// All precompiles are activated at genesis via blank imports.
// Each chain's genesis determines which precompiles are active
// at which block/timestamp.
// Every precompile is explicitly imported. No umbrella packages.
// Genesis determines which are active at which block/timestamp.
package main
import (
@@ -16,35 +15,63 @@ import (
"github.com/luxfi/version"
"github.com/luxfi/vm/rpc"
// Post-quantum cryptography
_ "github.com/luxfi/precompile/blake3"
_ "github.com/luxfi/precompile/mldsa"
_ "github.com/luxfi/precompile/mlkem"
_ "github.com/luxfi/precompile/pqcrypto"
_ "github.com/luxfi/precompile/slhdsa"
// ── Curves ───────────────────────────────────────────
_ "github.com/luxfi/precompile/ed25519" // 0x3211 Ed25519 verify
_ "github.com/luxfi/precompile/secp256r1" // 0x0100 P-256 verify (EIP-7212)
_ "github.com/luxfi/precompile/sr25519" // 0x0A00 Substrate SR25519 verify
// Threshold signatures
_ "github.com/luxfi/precompile/cggmp21"
_ "github.com/luxfi/precompile/frost"
_ "github.com/luxfi/precompile/corona"
// ── Post-Quantum (FIPS 203/204/205) ──────────────────
_ "github.com/luxfi/precompile/mldsa" // 0x0200..06 ML-DSA verify (Dilithium)
_ "github.com/luxfi/precompile/mlkem" // 0x0200..07 ML-KEM encap/decap (Kyber)
_ "github.com/luxfi/precompile/slhdsa" // 0x0600..01 SLH-DSA verify (SPHINCS+)
_ "github.com/luxfi/precompile/corona" // 0x0200..0B Corona lattice threshold
// Curves
_ "github.com/luxfi/precompile/ed25519"
_ "github.com/luxfi/precompile/secp256r1"
_ "github.com/luxfi/precompile/sr25519"
// ── Hashing ──────────────────────────────────────────
_ "github.com/luxfi/precompile/blake3" // 0x0500..04 Blake3 hash
// DEX
_ "github.com/luxfi/precompile/dex"
// ── Threshold Signatures ─────────────────────────────
_ "github.com/luxfi/precompile/cggmp21" // 0x0800..03 CGGMP21 ECDSA threshold
_ "github.com/luxfi/precompile/frost" // 0x0800..02 FROST EdDSA threshold
// Encryption and privacy
_ "github.com/luxfi/precompile/ecies"
_ "github.com/luxfi/precompile/fhe"
_ "github.com/luxfi/precompile/hpke"
_ "github.com/luxfi/precompile/ring"
// ── AI ────────────────────────────────────────────────
_ "github.com/luxfi/precompile/ai" // 0x0300 AI mining / inference
// Zero-knowledge and graph
_ "github.com/luxfi/precompile/graph"
_ "github.com/luxfi/precompile/zk"
// ── Consensus (Quasar) ───────────────────────────────
_ "github.com/luxfi/precompile/quasar" // 0x0300..20-24 BLS + Verkle + Corona + Hybrid verify
// ── Bridge ───────────────────────────────────────────
_ "github.com/luxfi/precompile/bridge" // 0x0440-0443 Gateway + Router + Verifier + Liquidity
// ── FHE ──────────────────────────────────────────────
_ "github.com/luxfi/precompile/fhe" // 0x0700 Fully homomorphic encryption
// ── ZK Proofs ────────────────────────────────────────
_ "github.com/luxfi/precompile/zk" // 0x0900 Groth16 + PLONK + fflonk + Halo2
// ── Encryption / Privacy ─────────────────────────────
_ "github.com/luxfi/precompile/ecies" // 0x9201 ECIES encrypt/decrypt
_ "github.com/luxfi/precompile/hpke" // 0x9200 Hybrid Public Key Encryption
_ "github.com/luxfi/precompile/ring" // 0x9202 Ring signatures
// ── DEX (LX Suite 0x9010-0x9080) ─────────────────────
_ "github.com/luxfi/precompile/dex" // Pool + Oracle + Router + Hooks + Flash + Book + Vault + Price + Lend + Repayer + Liquidator + Transmuter
// ── Graph ────────────────────────────────────────────
_ "github.com/luxfi/precompile/graph" // 0x0500 On-chain GraphQL
// ── Blob ─────────────────────────────────────────────
_ "github.com/luxfi/precompile/kzg4844" // 0xB002 EIP-4844 KZG commitments
// ── Attestation ──────────────────────────────────────
_ "github.com/luxfi/precompile/attestation" // Remote attestation (TEE)
// ── Registry ─────────────────────────────────────────
_ "github.com/luxfi/precompile/registry" // Precompile registry + BLS12-381 curves
// ── REMOVED (umbrellas — use explicit imports above) ──
// _ "github.com/luxfi/precompile/pqcrypto" — use mldsa + mlkem + slhdsa
// _ "github.com/luxfi/precompile/quantum" — use mldsa + mlkem + slhdsa + corona
// _ "github.com/luxfi/precompile/threshold" — use cggmp21 + frost + corona
)
func main() {