mirror of
https://github.com/luxfi/chains.git
synced 2026-09-24 00:26:00 +00:00
d37d07d8bd444faf7e265e2d53d7cef4d61951d8
The luxfi/bridge daemon's bchain client (internal/bchain.Client) calls bridge_getInfo / bridge_getSupportedChains / bridge_getChainConfig / bridge_getSignature against the B-Chain RPC for permissionless discovery + MPC signature retrieval. Until now BridgeVM only implemented the settlement subset (estimateFee, submitRequest, getStatus, cancelRequest, health, getMPCPublicKey) — daemons fell back to assumed local values for the discovery surface, a centralization vector. This commit: - Adds GetBridgeInfo, GetSupportedChains, GetChainConfig, GetSignature to bridgevm.Service. - Wires all four into the JSON-RPC dispatcher (bridge_* and bridge.* aliases). - GetSignature reads from the swap-store record (populated by the MPC signing pipeline once the threshold quorum aggregates shares). Distinguishes "no such swap" from "still signing" via separate errors so callers can poll without dispatching on a generic error code. - GetChainConfig matches the ChainID case-insensitively and surfaces the requested id in the error message when the chain is not in SupportedChains. - Adds 6 table-driven tests covering happy paths, not-found, empty params, and the not-yet-available signature poll. After this lands the luxfi/bridge daemon stops needing any cached fallback for these four endpoints — the B-Chain VM is authoritative end-to-end. Daemon code itself needs no change; its bchain.Client already calls these method names. Tests: go test ./bridgevm/... — 36/36 pass (30 pre-existing + 6 new).
bridgevm: close daemon-discovery RPC gap (getInfo, getSupportedChains, getChainConfig, getSignature)
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%