Files
zeekay ad7d6dfaa6 node: dchain build-tag split -- public build excludes D-Chain + private deps
vms.go drops the dexvm import+entry, calls appendDChainVM; vms_dchain.go (//go:build dchain)
links it, vms_nodchain.go (//go:build !dchain) no-ops; vms/dexvm alias gated //go:build
dchain + doc_nodchain.go placeholder. Genesis-gate (constants.DexVMID, no pkg dep) retained.
VERIFIED: public 'go list -deps ./node/' has ZERO chains/dexvm|luxfi/dex|gpu-kernels|luxcpp;
-tags dchain brings them in. Both builds green.

Consensus change -- held for human review before merge/push (bundles with merkle-activation).
2026-06-17 13:31:58 -07:00

1.5 KiB

Consensus Package - AI Assistant Guide

This package is node-side glue around the canonical consensus engine in github.com/luxfi/consensus. It does NOT implement the protocol — the protocol lives in that module.

Package Structure

  • acceptor.go - Node-side block-acceptance callbacks (chain-ID-keyed)
  • quasar/ - Node-side wiring around consensus/protocol/quasar
  • zap/ - ZAP agentic-consensus / DID bridge (self-contained, opt-in)

Acceptor

Acceptor interface called when consensus accepts a block / vertex. AcceptorGroup manages multiple acceptors per chain — used by the indexer and warp IPC. The variant here differs from the canonical luxfi/consensus/core.Acceptor (different signature: *runtime.Runtime instead of context.Context, plus chain-ID-keyed registration).

Quasar Wiring

The quasar/ subpackage wraps github.com/luxfi/consensus/protocol/quasar with node-specific adapters (P-Chain validator state, BLS signing keys, Corona threshold coordinator stub).

Signature Types

SignatureTypeBLS      // Classical BLS
SignatureTypeCorona // Post-quantum threshold
SignatureTypeQuasar   // Hybrid BLS + Corona
SignatureTypeMLDSA    // Fallback ML-DSA

Testing

GOWORK=off go test ./consensus/... -v

Dependencies

  • github.com/luxfi/consensus - Canonical consensus protocol (engine, protocol/quasar, types, etc.)
  • github.com/luxfi/ids - ID types
  • github.com/luxfi/log - Logging
  • github.com/luxfi/runtime - Runtime context for acceptors