mirror of
https://github.com/luxfi/chains.git
synced 2026-09-24 00:26:00 +00:00
v1.3.22
The G-Chain VM declared chain.ChainVM but stubbed the block methods: GetBlock/ParseBlock returned errNotImplemented, LastAccepted returned the unset preferredID (ids.Empty), and Block.Status() returned choices.Status (not the uint8 the block.Block interface requires, so *Block never satisfied the interface). At boot the ZAP VM server (vm/rpc/vm_server_zap.go handleInitialize) calls LastAccepted() then GetBlock(lastAccepted); the GetBlock stub produced 'get last accepted block: not implemented', failing G-Chain initialization and the lux-mainnet node health check. The G-Chain is a read-only query/index VM that never advances past genesis, but consensus still requires a resolvable last-accepted block. Build a deterministic genesis block (height 0, content-addressed ID = SHA-256 of its canonical encoding) in Initialize, pin it as lastAccepted, and serve it from GetBlock/ParseBlock/GetBlockIDAtHeight. Fix Status() to return uint8 and add the var _ block.Block compile assertion so this can't regress. Tests reproduce the exact handleInitialize sequence plus byte/ID round-trip and cross-validator determinism.
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%