mirror of
https://github.com/luxfi/node.git
synced 2026-07-27 03:39:39 +00:00
- vms/thresholdvm/ → vms/mpcvm/ (dir + inner files + package decl).
- node/vms.go optional-VM registry: drop ThresholdVMID row, add
MPCVMID and FHEVMID rows (matching the new split).
- genesis/builder/registry.go: T-Chain entry → M-Chain (MPCVMID) +
F-Chain (FHEVMID); registry_test.go parity assertions updated.
- genesis/builder/builder.go: TChainAliases → MChainAliases +
FChainAliases; ThresholdVMID switch case split to MPCVMID / FHEVMID;
optIn chain slice uses config.MChainGenesis + config.FChainGenesis
(T-Chain slot retired).
- LLM.md: point at LP-0130 as canonical topology + fee spec; correct
the quantumvm posture to service-only per LP-0130 §6 (Q-Chain has
no user-payable blockspace).
Build + vet clean on chains/mpcvm/... + node/{vms/mpcvm,genesis,node}/...
Co-authored-by: Hanzo Dev <dev@hanzo.ai>
33 lines
1.4 KiB
Go
33 lines
1.4 KiB
Go
// Copyright (C) 2026, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
// Package mpcvm — backend selection re-export.
|
|
//
|
|
// The canonical dlopen probe lives in github.com/luxfi/chains/mpcvm.
|
|
// Its init() runs once at package load time and pins a process-wide
|
|
// GPUBackend handle (cuda → hip → metal → vulkan → webgpu probe order).
|
|
// This file is the node-side entry point for diagnostics and ops tooling.
|
|
//
|
|
// Note: the luxd VM manager registration for ThresholdVM (M-Chain) is
|
|
// NOT flipped here per the project memory note ("M-Chain code exists but
|
|
// NOT yet registered in running luxd"). This file provides the bridge
|
|
// surface only — flipping the manager hook-up is a separate ops PR.
|
|
|
|
package mpcvm
|
|
|
|
// SelectGPUBackend returns the resolved GPU plugin (or nil) and a single
|
|
// human-readable diagnostic string. luxd startup logs use this to surface
|
|
// "mpcvm-gpu backend=<name>" lines alongside the cevm backend
|
|
// selection, matching the cevm.go pattern at
|
|
// ~/work/lux/chains/evm/backend_cgo.go.
|
|
//
|
|
// Calling this multiple times is cheap — the underlying probe runs once
|
|
// at package init via sync.Once in chains/mpcvm/backend.go.
|
|
func SelectGPUBackend() (*GPUBackend, string) {
|
|
g := GPUBackendInstance()
|
|
if g == nil || !g.IsAvailable() {
|
|
return nil, "mpcvm-gpu: no plugin resolved (CPU-only)"
|
|
}
|
|
return g, "mpcvm-gpu: backend=" + g.Kind.String() + " path=" + g.Path
|
|
}
|