mirror of
https://github.com/luxfi/chains.git
synced 2026-09-24 00:26:00 +00:00
cbf7dc9da64e607656e28e1eaaef87406540fb99
Make the Z-Chain MLDSA-rollup verification path post-quantum. The rollup aggregates per-validator ML-DSA-65 sigs over the round digest; the proof was classical Groth16/bn254 (pairing-based, quantum-breakable) and is now a strict-PQ STARK/FRI proof (P3Q: Plonky3 fork, cSHAKE256 Merkle over Goldilocks, FRI; no KZG, no pairings, no trusted setup). VERIFIER (the clean half, done): - precompiles/zk_verifiers.go: STARKVerifier stub -> delegates to precompile/starkfri.Verify. Parses [proof_len][proof][pub_len][pub]; proof must carry the 'P3Q1' magic. FAILS CLOSED (errVerifierUnavailable, never resultValid) when no FRI binding is registered (CGO_ENABLED=0 / no -tags starkfri_p3q) — no forgery oracle. The classical Groth16Verifier/PLONKVerifier are KEPT intact at their own addresses. - precompiles/crosschain.go: route VerifierTypeSTARK to STARKVerifierAddr (was errNotImplemented). - tests: STARK now proven to delegate to starkfri (accept->0x01, reject->0x00, bad-magic rejected before callback, unbound fails closed) and to route cross-chain; Groth16/PLONK tests unchanged. PROVER (the honest remaining step, FLAGGED — NOT faked): - zwitness.go: MLDSAGroth16 -> MLDSAStark rename; doc now states the proof is STARK/FRI. Body stays ErrZWitnessNotImplemented: ~/work/lux/p3q exposes a Rust prover but NO p3q_prove C ABI, and has NO MLDSA-rollup AIR. Emitting fake proof bytes on the finality path would be a forgery oracle, so the prover binding is left as the outstanding step. go build ./zkvm/... + go test ./zkvm/precompiles/ green (CGO_ENABLED=0, GOWORK=off). Real cgo-tagged starkfri binding (-tags starkfri_p3q) compiles + KAT passes against the in-tree p3q staticlib.
Lux Chains
Independent VM plugin binaries for the Lux Network.
Each directory builds to a standalone binary that the Lux node loads as a plugin via --plugin-dir.
Build
make # build all VMs
make evm # build one VM
make test # test all
Install
lpm install evm
lpm install dexvm
Or copy binaries to ~/.lux/plugins/<vmid>.
VMs
| VM | Chain | Purpose |
|---|---|---|
| evm | C-Chain | EVM smart contracts |
| dexvm | D-Chain | Decentralized exchange |
| aivm | A-Chain | AI/ML inference |
| bridgevm | B-Chain | Cross-chain bridge |
| graphvm | G-Chain | GraphQL data layer |
| identityvm | I-Chain | Decentralized identity |
| keyvm | K-Chain | Key management |
| oraclevm | O-Chain | Oracle/off-chain data |
| quantumvm | Q-Chain | Post-quantum consensus signing (Pulsar) |
| relayvm | R-Chain | Cross-chain relay |
| servicenodevm | S-Chain | Service node registry |
| teleportvm | T-Chain | Unified teleport (bridge + relay + oracle) |
| thresholdvm (MPC) | M-Chain | MPC ceremonies (CGGMP21, FROST, Pulsar-general) — bridge custody for external wallets |
| thresholdvm (FHE) | F-Chain | FHE compute + TFHE bootstrap-key generation (encrypted EVM) |
| zkvm | Z-Chain | Groth16 over BLS12-381 (rolls N × ML-DSA-65 sigs into 192-byte proof) |
Languages
Go
98.2%
C
1.7%
Shell
0.1%