Files
zeekay a42cc732a8 deps: bump luxfi core to latest (drops corona; corona-based)
Bump pinned old corona-era luxfi core to latest tags, which are
already corona-based, removing the transitive github.com/luxfi/corona
dependency entirely.

- consensus v1.22.70 -> v1.25.17
- node       v1.23.4  -> v1.30.9
- threshold  v1.5.5   -> v1.9.9
- vm         v1.0.40  -> v1.2.3
- precompile v0.5.10  -> v0.5.40
- fhe        v1.7.6   -> v1.8.8
- crypto     v1.17.45 -> v1.19.20
- geth       (old)    -> v1.17.5
- evm        v0.8.49  -> v0.19.4
- corona               v0.7.6 (new, replaces corona)
- api pinned to v1.0.12 to match vm@v1.2.3/[email protected].4 (LuxAssetID field)

main.go: the retired quasar umbrella precompile is replaced by its
LP-4200 successors (pulsar/p3q/magnetar/hqc); corona already imported.
2026-06-11 10:47:51 -07:00

104 lines
5.9 KiB
Go

// Zoo EVM plugin — Zoo C-Chain EVM with all precompiles enabled.
//
// Every precompile is explicitly imported. No umbrella packages.
// Genesis determines which are active at which block/timestamp.
package main
import (
"context"
"fmt"
"os"
"github.com/luxfi/evm/plugin/evm"
"github.com/luxfi/log"
"github.com/luxfi/sys/ulimit"
"github.com/luxfi/version"
"github.com/luxfi/vm/rpc"
// ── Curves ───────────────────────────────────────────
_ "github.com/luxfi/precompile/bls12381" // 0x000B-0x0011 BLS12-381 (EIP-2537)
_ "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
// ── VRF ──────────────────────────────────────────────
_ "github.com/luxfi/precompile/vrf" // 0x3213 ECVRF verify (RFC 9381)
// ── Post-Quantum (FIPS 203/204/205) ──────────────────
_ "github.com/luxfi/precompile/corona" // 0x012206 Corona Ring-LWE threshold verify
_ "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/xwing" // 0x2221 X-Wing hybrid KEM (X25519+ML-KEM)
// ── Hashing / ZK Curves ─────────────────────────────
_ "github.com/luxfi/precompile/babyjubjub" // 0x0500..07 Baby Jubjub (BN254 twisted Edwards)
_ "github.com/luxfi/precompile/blake3" // 0x0500..04 Blake3 hash
_ "github.com/luxfi/precompile/pasta" // 0x0500..08 Pallas + Vesta (Halo2)
_ "github.com/luxfi/precompile/pedersen" // 0x0500..06 Pedersen commitment (BN254)
_ "github.com/luxfi/precompile/poseidon" // 0x0500..05 Poseidon2 ZK-friendly hash
// ── Threshold Signatures ─────────────────────────────
_ "github.com/luxfi/precompile/cggmp21" // 0x0800..03 CGGMP21 ECDSA threshold
_ "github.com/luxfi/precompile/frost" // 0x0800..02 FROST EdDSA threshold
// ── AI ────────────────────────────────────────────────
_ "github.com/luxfi/precompile/ai" // 0x0300 AI mining / inference
_ "github.com/luxfi/precompile/attestation" // 0x0300..01 TEE attestation (NVTrust/SGX/SEV-SNP/TDX)
_ "github.com/luxfi/precompile/compute" // 0x0300..10 AI compute marketplace
// ── PQ Threshold / STARK (LP-4200, 0x012204-08) ──────
// Successors to the retired quasar umbrella precompile.
_ "github.com/luxfi/precompile/hqc" // 0x012208 HQC code-based KEM (family-disjoint backup)
_ "github.com/luxfi/precompile/magnetar" // 0x012207 Magnetar threshold SLH-DSA verify (FIPS 205 byte-equal)
_ "github.com/luxfi/precompile/p3q" // 0x012205 P3Q strict-PQ STARK verify
_ "github.com/luxfi/precompile/pulsar" // 0x012204 Pulsar threshold ML-DSA verify (FIPS 204 byte-equal)
// ── 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/curve25519" // 0x9204 Edwards25519 point ops
_ "github.com/luxfi/precompile/hpke" // 0x9200 HPKE seal (public-key encrypt only)
_ "github.com/luxfi/precompile/ring" // 0x9202 Ring signature verify only
_ "github.com/luxfi/precompile/x25519" // 0x9203 X25519 Diffie-Hellman
// ── DEX (LX Suite 0x9010-0x9080) ─────────────────────
_ "github.com/luxfi/precompile/dex" // Pool + Oracle + Router + Hooks + Flash + Book + Vault + Price + Lend + Repayer + Liquidator + Transmuter
_ "github.com/luxfi/precompile/stableswap" // 0x0400..60 Curve StableSwap AMM invariant
// ── Graph ────────────────────────────────────────────
_ "github.com/luxfi/precompile/graph" // 0x0500 On-chain GraphQL
// ── Blob ─────────────────────────────────────────────
_ "github.com/luxfi/precompile/kzg4844" // 0xB002 EIP-4844 KZG commitments
// ── Registry ─────────────────────────────────────────
_ "github.com/luxfi/precompile/registry" // Precompile registry + BLS12-381 curves
)
func main() {
versionStr := fmt.Sprintf("Zoo-EVM/1.0.0 [node=%s, rpcchainvm=%d]", version.Current, version.RPCChainVMProtocol)
if len(os.Args) > 1 && os.Args[1] == "version" {
fmt.Println(versionStr)
os.Exit(0)
}
if err := ulimit.Set(ulimit.DefaultFDLimit, log.Root()); err != nil {
fmt.Fprintf(os.Stderr, "failed to set fd limit: %s\n", err)
os.Exit(1)
}
if err := rpc.Serve(context.Background(), log.Root(), &evm.VM{}); err != nil {
fmt.Fprintf(os.Stderr, "rpc.Serve error: %s\n", err)
os.Exit(1)
}
}