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>
74 lines
1.9 KiB
Go
74 lines
1.9 KiB
Go
// Copyright (C) 2019-2026, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
// zzz_gateprobe_test.go is a BLUE-team gate instrument for the
|
|
// mpcvm-decomplect surgery (LP-134 / LP-7050). NOT a behavioral
|
|
// assertion — it emits a deterministic per-chain digest of the fully
|
|
// built P-Chain genesis for every network so before/after can be diffed
|
|
// to PROVE which chains changed and which stayed byte-identical.
|
|
// zzz_ prefix keeps it last. Delete after RED sign-off.
|
|
package builder
|
|
|
|
import (
|
|
"crypto/sha256"
|
|
"encoding/hex"
|
|
"fmt"
|
|
"sort"
|
|
"testing"
|
|
|
|
"github.com/luxfi/node/vms/platformvm/genesis"
|
|
pchaintxs "github.com/luxfi/node/vms/platformvm/txs"
|
|
)
|
|
|
|
func TestZZZ_GateProbe_PerChainDigest(t *testing.T) {
|
|
nets := []struct {
|
|
name string
|
|
id uint32
|
|
}{
|
|
{"mainnet", 1},
|
|
{"testnet", 2},
|
|
{"devnet", 3},
|
|
{"localnet", 1337},
|
|
}
|
|
|
|
for _, n := range nets {
|
|
cfg := GetConfig(n.id)
|
|
if cfg == nil {
|
|
t.Fatalf("%s GetConfig: nil", n.name)
|
|
}
|
|
gb, rootID, err := FromConfig(cfg)
|
|
if err != nil {
|
|
t.Fatalf("%s FromConfig: %v", n.name, err)
|
|
}
|
|
gen, err := genesis.Parse(gb)
|
|
if err != nil {
|
|
t.Fatalf("%s Parse: %v", n.name, err)
|
|
}
|
|
|
|
type row struct {
|
|
name string
|
|
vmid string
|
|
dataSum string
|
|
chainID string
|
|
}
|
|
rows := make([]row, 0, len(gen.Chains))
|
|
for _, c := range gen.Chains {
|
|
u := c.Unsigned.(*pchaintxs.CreateChainTx)
|
|
sum := sha256.Sum256(u.GenesisData)
|
|
rows = append(rows, row{
|
|
name: u.BlockchainName,
|
|
vmid: u.VMID.String(),
|
|
dataSum: hex.EncodeToString(sum[:]),
|
|
chainID: c.ID().String(),
|
|
})
|
|
}
|
|
sort.Slice(rows, func(i, j int) bool { return rows[i].name < rows[j].name })
|
|
|
|
fmt.Printf("=== NET %s (id=%d) P-ROOT=%s ===\n", n.name, n.id, rootID.String())
|
|
for _, r := range rows {
|
|
fmt.Printf(" CHAIN name=%-10s vmid=%-52s dataSHA256=%s chainTxID=%s\n",
|
|
r.name, r.vmid, r.dataSum, r.chainID)
|
|
}
|
|
}
|
|
}
|