Files
chains/mpcvm/service_test.go
zeekay c0d4022c71 Cite the specs by the numbers they carry
LP-134 was renumbered LP-1340 (lp-1340-lux-chain-topology); 21 citations
across 16 files still named the old number, which resolves to nothing.

Corona rests on Module-LWE, not Ring-LWE — LP-4805 says so in three places
and b17e086 already corrected one file, leaving evm/main.go and
schain/SECURITY_review.md claiming the wrong hardness assumption. The
two-family argument in LP-4900 depends on which lattice problem this is.

P3Q at 0x012205 is kind-byte signature dispatch; STARK/FRI is starkfri at
0x012220 (LP-7050). Naming P3Q for a scheme at another slot describes a
precompile that is not the one being imported.

Carries the substance of 2f22fa2, the one commit the parallel line held that
this history did not.
2026-09-01 01:40:34 -07:00

36 lines
1.6 KiB
Go

// Copyright (C) 2019-2026, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package mpcvm
import "testing"
// TestServiceSurfaces_Decomposition documents and locks the LP-1340 / LP-7050
// service decomposition: the single *VM satisfies all three orthogonal
// surfaces today (compatibility bridge), and — critically — the layering is
// real, not cosmetic: MPCService and FHEService each EMBED ThresholdService,
// so any type that is an MPCService or FHEService is necessarily also a
// ThresholdService (it consumes the substrate). The var-block assertions in
// service.go already enforce *VM satisfies each at compile time; this test
// makes the embedding relationship explicit so a future physical split
// (mpcvm implements MPCService, fhevm implements FHEService) cannot silently
// drop the substrate dependency.
func TestServiceSurfaces_Decomposition(t *testing.T) {
var vm *VM // nil is fine: we only exercise the static type system
// MPCService is a superset of ThresholdService (M consumes the substrate).
var mpc MPCService = vm
var _ ThresholdService = mpc
// FHEService is a superset of ThresholdService (F consumes the substrate).
var fhe FHEService = vm
var _ ThresholdService = fhe
// ThresholdService alone must NOT expose the MPC/FHE-specific surface —
// this is verified structurally by the interfaces not sharing those
// methods; the assignment above going only one direction (MPC->Threshold,
// never Threshold->MPC) is the compile-time proof of orthogonality.
var ths ThresholdService = vm
_ = ths
}