mirror of
https://github.com/luxfi/node.git
synced 2026-07-27 03:39:39 +00:00
X-Chain was on an undriven, unconfigured DAG engine (test-ID/height-0 vertices, a handler that dropped every inbound consensus message) — no certificate finality, no parity with C/D/P. It now runs the same linear consensuschain path as every other chain: deterministic 2/3-stake BFT certificate finality (AcceptWithCert), the BFT overlap-bound floor, and the epoch-pinned validator set. vms/xvm/vm.go: conform *VM to block.ChainVM / consensuschain.BlockBuilder (Connected/Shutdown/WaitForEvent/HealthCheck), remove GetEngine() and the dead DAG methods, add the compile-time asserts. X already had a real linear builder (embedded blockbuilder.Builder, wired in Linearize) — nothing faked. vms/xvm/health.go: HealthCheck -> chain.HealthResult. vms/xvm/tx.go: deleted (dead dag.Tx wrapper). chains/manager.go: linearize DAG-native VMs (X-Chain) into linear block mode before SetState, wired to the REAL toEngine the cert runtime reads from. Interface-gated — only VMs implementing Linearize are affected; C/D/P/Q untouched. With no production VM exposing GetEngine, the undriven DAG dispatch is dead. vms/dexvm/dexvm.go, vms/types/fee/policy.go: doc corrections (dexvm is plugin/optional/NFT-gated, linear cert finality; X-Chain UTXO fee is a deliberate exception to the account-model FlatPolicy floor). Full node builds; vms/xvm + chains tests green. Parity holds by construction for C/D/X/Q/Z: one cert path, one finality authority.
41 lines
1.3 KiB
Go
41 lines
1.3 KiB
Go
// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
// Package dexvm re-exports the canonical DEX VM from
|
|
// github.com/luxfi/chains/dexvm so existing callers that imported
|
|
// github.com/luxfi/node/vms/dexvm pre-extraction keep working
|
|
// without source-level changes.
|
|
//
|
|
// New code should import the canonical path:
|
|
// "github.com/luxfi/chains/dexvm"
|
|
//
|
|
// This package is a thin backward-compatibility alias. The underlying
|
|
// chains/dexvm is the pure-Go stateless atomic proxy (zero private deps).
|
|
// Unlike the always-on genesis VMs, dexvm is registered in OptionalVMs and is
|
|
// NFT-gated (see node/vms.go:118, RequiredNFT "dex-operator"): a node only
|
|
// tracks/validates the D-Chain when the network has configured that operator
|
|
// collection, so it is plugin-loaded on demand, not linked unconditionally.
|
|
package dexvm
|
|
|
|
import (
|
|
"github.com/luxfi/chains/dexvm"
|
|
)
|
|
|
|
// Re-export the public surface.
|
|
type (
|
|
Block = dexvm.Block
|
|
ChainVM = dexvm.ChainVM
|
|
Factory = dexvm.Factory
|
|
OrderKey = dexvm.OrderKey
|
|
DexVertex = dexvm.DexVertex
|
|
Status = dexvm.Status
|
|
)
|
|
|
|
var (
|
|
// VMID identifies the canonical primary-network D-Chain VM.
|
|
VMID = dexvm.VMID
|
|
|
|
// NewChainVM constructs a fresh DEX chain VM.
|
|
NewChainVM = dexvm.NewChainVM
|
|
)
|