mirror of
https://github.com/luxfi/chains.git
synced 2026-09-24 00:26:00 +00:00
d25756da3504c1962c8368ea48a842dce6434edb
The user's verbatim demand: > "fix ALL of a-chain so it works in MULTI-CHAIN for any Lux public L1 L2 > we must work without any trusted daler or other" WHAT CHANGED DefaultConfig (PUBLIC-BFT-SAFE DEFAULTS): - VerificationMode: ModeOptimistic (default) — providers post results with bond; N-block challenge period; uncontested = finalised; challenged = fraud-proof flow with slashing. NO trusted dealer, NO TEE assumption, NO single point of trust. - RequireTEEAttestation: false (was true) — TEE is OPTIONAL acceleration, NOT a registration gate. Providers without TEE can register and operate under the optimistic-verification flow. - HostChainID: "primary" — AIVM is chain-agnostic. Override per L1/L2 instance (Hanzo, Zoo, Pars, Liquidity, etc.). - ChallengeWindowBlocks: 100 (~5-10 min finality) - RedundancyFactor: 3 (for ModeMultiPartyRedundant — M-of-N consensus) - MinProviderBond: 1000 LUX equivalent (slashed on fraud proof or majority divergence) DefaultPermissionedConfig (OPT-IN, NOT public mainnet): - VerificationMode: ModeTEEAttested - RequireTEEAttestation: true - For regulated/KYC'd subnets where TEE-vendor trust is acceptable by policy THREE VERIFICATION MODES 1. ModeOptimistic (default, public-BFT): post + challenge + fraud proof. 2. ModeMultiPartyRedundant: M-of-N validators run same task, consensus on output hash. Public-BFT-safe. M× compute cost. 3. ModeTEEAttested: opt-in, permissioned subnets only. TEE is folded into the trust score as ACCELERATION (skip challenge for high trust score); NEVER changes the trust root. RegisterProvider: - Public-chain path: no TEE required. Provider bond + challenge flow enforce correctness. - Permissioned path (RequireTEEAttestation=true): TEE attestation required, must meet MinTrustScore. Error message points operators at the public-chain alternative. MULTI-CHAIN DEPLOYABILITY - HostChainID tells AIVM which L1/L2 it's running on. - "primary" = anchor to Q-Chain via MerkleAnchorFreq blocks. - White-label L1/L2 = anchor to host chain's own finality (Pulsar for PQ-finality, Corona for Ringtail-finality, etc.). - AIVM code is identical across all chains; only the HostChainID config field differs. TESTS - TestDefaultConfig pins public-BFT-safe defaults: TEE NOT required, mode is Optimistic, HostChainID is "primary". - TestDefaultPermissionedConfig pins the opt-in permissioned path. - TestVerificationMode_PublicBFTSafe asserts default mode is always one of (Optimistic, MultiPartyRedundant), NEVER TEE-attested as the trust root. go.mod refresh as side-effect of adding luxfi/node@latest for vms/types/fee.
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%