mirror of
https://github.com/luxfi/chains.git
synced 2026-09-24 00:26:00 +00:00
Point the citations at the renumbered specs
Corona is Module-LWE, not Ring-LWE, and 0x012205 verifies the P3Q threshold-signature family rather than a STARK -- the FRI verifier is a separate precompile at 0x012220.
This commit is contained in:
+1
-1
@@ -904,7 +904,7 @@ func (vm *VM) RemoveSigner(nodeID ids.NodeID, replacementNodeID *ids.NodeID) (*S
|
||||
)
|
||||
}
|
||||
|
||||
// Trigger actual reshare protocol via M-Chain (ThresholdVM-MPC, per LP-134) using warp messaging
|
||||
// Trigger actual reshare protocol via M-Chain (ThresholdVM-MPC, per LP-1340) using warp messaging
|
||||
if err := vm.triggerReshareProtocol(reshareSession, nodeID, replacement); err != nil {
|
||||
if vm.log != nil && !vm.log.IsZero() {
|
||||
vm.log.Warn("failed to trigger reshare protocol",
|
||||
|
||||
+2
-2
@@ -29,8 +29,8 @@ import (
|
||||
_ "github.com/luxfi/precompile/mldsa" // 0x012202 ML-DSA (FIPS 204 — Module-LWE signature)
|
||||
_ "github.com/luxfi/precompile/slhdsa" // 0x012203 SLH-DSA (FIPS 205 — hash-based signature)
|
||||
_ "github.com/luxfi/precompile/pulsar" // 0x012204 Pulsar (Module-LWE threshold FIPS 204)
|
||||
_ "github.com/luxfi/precompile/p3q" // 0x012205 P3Q (strict-PQ STARK / FRI / cSHAKE256)
|
||||
_ "github.com/luxfi/precompile/corona" // 0x012206 Corona (Ring-LWE threshold)
|
||||
_ "github.com/luxfi/precompile/p3q" // 0x012205 P3Q (unified PQ threshold-sig verifier family)
|
||||
_ "github.com/luxfi/precompile/corona" // 0x012206 Corona (Module-LWE threshold)
|
||||
_ "github.com/luxfi/precompile/xwing" // 0x2221 X-Wing hybrid KEM (X25519+ML-KEM)
|
||||
|
||||
// ── Hashing / ZK Curves ─────────────────────────────
|
||||
|
||||
+2
-2
@@ -34,7 +34,7 @@ type BlockSigs struct {
|
||||
// Like a supermassive black hole, it pulls all blocks to quantum finality
|
||||
// using dual BLS+Corona threshold signatures:
|
||||
// - BLS threshold signatures (classical security, fast path)
|
||||
// - Corona threshold signatures (post-quantum, Ring-LWE based)
|
||||
// - Corona threshold signatures (post-quantum, Module-LWE based)
|
||||
//
|
||||
// Blocks are NOT considered produced without BOTH thresholds being met.
|
||||
type Quasar struct {
|
||||
@@ -430,7 +430,7 @@ func (q *Quasar) AddValidator(validatorID string, weight uint64) error {
|
||||
|
||||
// NTTForwardCorona transforms Corona polynomial coefficients to NTT domain
|
||||
// using GPU acceleration when available. This enables O(n log n) polynomial
|
||||
// multiplication in the Ring-LWE scheme used by Corona threshold signatures.
|
||||
// multiplication in the Module-LWE scheme used by Corona threshold signatures.
|
||||
func (q *Quasar) NTTForwardCorona(coefficients []uint64) ([]uint64, error) {
|
||||
params := accellattice.NTTParams{
|
||||
N: 256, // Ring dimension for Corona (X^256 + 1)
|
||||
|
||||
+1
-1
@@ -211,7 +211,7 @@ func (vm *VM) Initialize(ctx context.Context, init luxvm.Init) error {
|
||||
vm.log.Info("║ QVM INITIALIZED with Quasar PQ-BFT Consensus ║")
|
||||
vm.log.Info("───────────────────────────────────────────────────────────────────")
|
||||
vm.log.Info("║ Quantum Signatures: ML-DSA (NIST PQC)", log.Bool("enabled", vm.Config.QuantumStampEnabled))
|
||||
vm.log.Info("║ Corona Threshold: Ring-LWE PQ", log.Bool("enabled", vm.Config.CoronaEnabled))
|
||||
vm.log.Info("║ Corona Threshold: Module-LWE PQ", log.Bool("enabled", vm.Config.CoronaEnabled))
|
||||
vm.log.Info("║ BLS Threshold: Classical fast path", log.Bool("enabled", true))
|
||||
vm.log.Info("║ Quasar Hybrid: BLS + Corona dual signing", log.Bool("enabled", true))
|
||||
vm.log.Info("║ Parallel TX Processing:", log.Int("maxParallel", vm.Config.MaxParallelTxs))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# ThresholdVM Design
|
||||
|
||||
> Status: Final for Quasar 3.0 activation (2025-12-25)
|
||||
> Supersedes the T-Chain monolith (LP-5013), per LP-134
|
||||
> Supersedes the T-Chain monolith (LP-5013), per LP-1340
|
||||
|
||||
## 1. Position in the topology
|
||||
|
||||
@@ -137,7 +137,7 @@ type LaneRegistry interface {
|
||||
|
||||
## 6. Certificate-subject binding
|
||||
|
||||
LP-134 extends `QuasarRoundDescriptor`:
|
||||
LP-1340 extends `QuasarRoundDescriptor`:
|
||||
|
||||
```cpp
|
||||
uint8_t mchain_ceremony_root[32];
|
||||
@@ -226,7 +226,7 @@ or boot-time failure, not a silent semantic bug.
|
||||
|
||||
## 11. References
|
||||
|
||||
Per LP-134 (Lux Chain Topology), the legacy T-Chain monolith is split into
|
||||
Per LP-1340 (Lux Chain Topology), the legacy T-Chain monolith is split into
|
||||
two operational chains served by this same `thresholdvm` substrate:
|
||||
|
||||
- `thresholdvm` in **MPC mode → M-Chain** (CGGMP21, FROST, Ringtail-gen).
|
||||
@@ -238,11 +238,11 @@ The standalone `teleportvm` (LP-6332) is unrelated and retains its own
|
||||
| LP | Topic |
|
||||
|---|---|
|
||||
| LP-019 | Threshold MPC for Bridge Signing (M-Chain protocols) |
|
||||
| LP-013 | FHE on GPU (F-Chain compute) |
|
||||
| LP-4655 | FHE on GPU (F-Chain compute) |
|
||||
| LP-076 | Universal Threshold Cryptography Framework |
|
||||
| LP-077 | Linear Secret Sharing (resharing) |
|
||||
| LP-132 | QuasarGPU Execution Adapter |
|
||||
| LP-134 | Lux Chain Topology — defines the M/F-Chain split |
|
||||
| LP-1340 | Lux Chain Topology — defines the M/F-Chain split |
|
||||
| LP-020 | Quasar Consensus 3.0 |
|
||||
| LP-6332 | teleportvm cross-chain message bus (separate "T-Chain") |
|
||||
| LP-5013 | T-Chain MPC Custody (deprecated, superseded by LP-134) |
|
||||
| LP-5013 | T-Chain MPC Custody (deprecated, superseded by LP-1340) |
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ shared by both chains.
|
||||
## Status
|
||||
|
||||
- Substrate ships with Quasar 3.0 activation on **2025-12-25**.
|
||||
- LP-5013 (T-Chain) is **deprecated** by LP-134.
|
||||
- LP-5013 (T-Chain) is **deprecated** by LP-1340.
|
||||
- Cert-lane enums `MChainCGGMP21=5`, `MChainFROST=6`,
|
||||
`MChainRingtailGen=7`, `FChainTFHE=8`, `FChainBootstrap=9`. Never
|
||||
reorder; appends only.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
**ThresholdVM is a Go library, not a chain.**
|
||||
|
||||
Per LP-134 (Lux Chain Topology), the legacy T-Chain custody monolith is
|
||||
Per LP-1340 (Lux Chain Topology), the legacy T-Chain custody monolith is
|
||||
split into two operational chains, both served by this substrate:
|
||||
|
||||
- `thresholdvm` in **MPC mode → M-Chain** — bridge custody for external
|
||||
@@ -58,7 +58,7 @@ The legacy "T-Chain" name is retained **only** for `teleportvm`
|
||||
|
||||
## Why split
|
||||
|
||||
LP-134 deprecates LP-5013 ("T-Chain MPC Custody"). T-Chain previously
|
||||
LP-1340 deprecates LP-5013 ("T-Chain MPC Custody"). T-Chain previously
|
||||
mixed MPC ceremonies and FHE compute under one validator set, one
|
||||
ceremony root, one block cadence. Sign-oriented (sub-second, latency
|
||||
critical) and compute-oriented (multi-second, throughput critical)
|
||||
@@ -114,9 +114,9 @@ date target the legacy T-Chain layout.
|
||||
| LP | Topic |
|
||||
|---|---|
|
||||
| LP-019 | Threshold MPC for Bridge Signing (M-Chain protocols) |
|
||||
| LP-013 | FHE on GPU (F-Chain compute) |
|
||||
| LP-4655 | FHE on GPU (F-Chain compute) |
|
||||
| LP-076 | Universal Threshold Cryptography Framework |
|
||||
| LP-134 | Lux Chain Topology — defines the M/F split |
|
||||
| LP-1340 | Lux Chain Topology — defines the M/F split |
|
||||
| LP-132 | QuasarGPU Execution Adapter — lane verifiers run here |
|
||||
| LP-020 | Quasar Consensus 3.0 — certificate_subject binding |
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ type LaneRegistry struct {
|
||||
owner Owner
|
||||
verifier map[types.CertLane]LaneVerifier
|
||||
// aliases lets the host wire legacy-lane-id → modern-lane during
|
||||
// the LP-134 grace window. Empty after the grace epoch closes.
|
||||
// the LP-1340 grace window. Empty after the grace epoch closes.
|
||||
aliases map[types.CertLane]types.CertLane
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
// Roots is the set of upstream roots a Quasar 3.0 certificate_subject
|
||||
// binds, mirroring the QuasarRoundDescriptor in LP-134.
|
||||
// binds, mirroring the QuasarRoundDescriptor in LP-1340.
|
||||
//
|
||||
// All seven roots are required, including both MChain and FChain —
|
||||
// this is the structural property that makes cross-chain replay
|
||||
@@ -31,11 +31,11 @@ type Roots struct {
|
||||
|
||||
// BindSubject computes certificate_subject = H(... all roots ...).
|
||||
// The hash domain is sha256 with a 1-byte version tag (0x01 for
|
||||
// LP-134 v3.1) so future descriptor extensions can change the input
|
||||
// LP-1340 v3.1) so future descriptor extensions can change the input
|
||||
// set without colliding.
|
||||
func BindSubject(r Roots) [32]byte {
|
||||
h := sha256.New()
|
||||
h.Write([]byte{0x01}) // LP-134 v3.1 descriptor version
|
||||
h.Write([]byte{0x01}) // LP-1340 v3.1 descriptor version
|
||||
h.Write(r.ParentBlock[:])
|
||||
h.Write(r.StateRoot[:])
|
||||
h.Write(r.ExecRoot[:])
|
||||
@@ -62,7 +62,7 @@ func VerifySubject(claimed [32]byte, r Roots) error {
|
||||
}
|
||||
|
||||
// RequireBothChains reports an error if either MChainCeremony or
|
||||
// FChainFHE is zero — the LP-134 invariant that every round binds
|
||||
// FChainFHE is zero — the LP-1340 invariant that every round binds
|
||||
// **both** chain roots, even on rounds where one chain does not
|
||||
// finalize a ceremony (the unchanged root from the previous round
|
||||
// satisfies the binding).
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Client provides access to thresholdvm services. Per LP-134, this serves
|
||||
// Client provides access to thresholdvm services. Per LP-1340, this serves
|
||||
// M-Chain (MPC mode) and F-Chain (FHE mode); legacy T-Chain MPC routes here.
|
||||
type Client struct {
|
||||
endpoint string
|
||||
@@ -544,7 +544,7 @@ func (c *Client) Health(ctx context.Context) (map[string]interface{}, error) {
|
||||
return result, nil
|
||||
}
|
||||
|
||||
// IsReady checks if thresholdvm (M-Chain MPC mode per LP-134) is ready
|
||||
// IsReady checks if thresholdvm (M-Chain MPC mode per LP-1340) is ready
|
||||
func (c *Client) IsReady(ctx context.Context) (bool, error) {
|
||||
info, err := c.GetInfo(ctx)
|
||||
if err != nil {
|
||||
|
||||
@@ -112,8 +112,8 @@ with a deterministic wrapping.
|
||||
| LP | Topic |
|
||||
|---|---|
|
||||
| LP-019 | Threshold MPC |
|
||||
| LP-013 | FHE on GPU |
|
||||
| LP-4655 | FHE on GPU |
|
||||
| LP-076 | Universal Threshold Cryptography |
|
||||
| LP-132 | QuasarGPU Execution Adapter |
|
||||
| LP-134 | Lux Chain Topology |
|
||||
| LP-1340 | Lux Chain Topology |
|
||||
| LP-020 | Quasar Consensus 3.0 |
|
||||
|
||||
@@ -11,7 +11,7 @@ ThresholdVM substrate.
|
||||
3. F-Chain registers each protocol verifier:
|
||||
reg.Register(tfheVerifier{...}) // LaneFChainTFHE
|
||||
reg.Register(bootstrapVerifier{...}) // LaneFChainBootstrap
|
||||
4. During the LP-134 grace epoch, F-Chain wires legacy aliases:
|
||||
4. During the LP-1340 grace epoch, F-Chain wires legacy aliases:
|
||||
reg.RegisterLegacyAlias(LaneTChainFHE, LaneFChainTFHE)
|
||||
5. F-Chain implements runtime.FChainAdapter.
|
||||
6. F-Chain begins accepting blocks.
|
||||
@@ -93,7 +93,7 @@ attestation ceremony:
|
||||
LP-5013's T-Chain hosted FHE compute under a different chain ID.
|
||||
The migration path is:
|
||||
|
||||
- All FHE compute moves to F-Chain unchanged. Kernels (LP-013)
|
||||
- All FHE compute moves to F-Chain unchanged. Kernels (LP-4655)
|
||||
port across — they were never tied to T-Chain semantics.
|
||||
- During the grace epoch, F-Chain accepts legacy `LaneTChainFHE`
|
||||
shares via `RegisterLegacyAlias` and dispatches them to
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# M-Chain Integration
|
||||
|
||||
This document describes how `chains/mchain/` plugs into the
|
||||
`thresholdvm` substrate when running in **MPC mode** (per LP-134).
|
||||
`thresholdvm` substrate when running in **MPC mode** (per LP-1340).
|
||||
The same substrate, running in FHE mode, serves F-Chain — see
|
||||
`F_CHAIN_INTEGRATION.md` for that side. The legacy "T-Chain" name is
|
||||
retained only for `teleportvm` (LP-6332), which is unrelated.
|
||||
@@ -15,9 +15,9 @@ retained only for `teleportvm` (LP-6332), which is unrelated.
|
||||
reg.Register(cggmp21Verifier{...}) // LaneMChainCGGMP21
|
||||
reg.Register(frostVerifier{...}) // LaneMChainFROST
|
||||
reg.Register(ringtailGenVerifier{...}) // LaneMChainRingtailGen
|
||||
4. During the LP-134 grace epoch, M-Chain wires legacy aliases:
|
||||
4. During the LP-1340 grace epoch, M-Chain wires legacy aliases:
|
||||
reg.RegisterLegacyAlias(LaneTChainSign, LaneMChainCGGMP21)
|
||||
// ... per the LP-134 deprecation table.
|
||||
// ... per the LP-1340 deprecation table.
|
||||
5. M-Chain implements runtime.MChainAdapter and hands itself to the
|
||||
substrate's ceremony driver.
|
||||
6. M-Chain begins accepting blocks. Each ceremony round is an entry
|
||||
@@ -86,7 +86,7 @@ into the F-Chain handoff envelope (see
|
||||
|
||||
## Migration from T-Chain
|
||||
|
||||
LP-5013's T-Chain hosted both MPC and FHE. After the LP-134
|
||||
LP-5013's T-Chain hosted both MPC and FHE. After the LP-1340
|
||||
activation epoch:
|
||||
|
||||
- All T-Chain MPC ceremonies move to M-Chain unchanged. Same
|
||||
|
||||
@@ -55,7 +55,7 @@ type CiphertextStorage interface {
|
||||
Delete(handle common.Hash) error
|
||||
}
|
||||
|
||||
// Relayer coordinates threshold decryption between C-Chain and F-Chain (FHE compute per LP-134; legacy: T-Chain)
|
||||
// Relayer coordinates threshold decryption between C-Chain and F-Chain (FHE compute per LP-1340; legacy: T-Chain)
|
||||
type Relayer struct {
|
||||
logger log.Logger
|
||||
decryptor *ThresholdDecryptor
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// See the file LICENSE for licensing terms.
|
||||
|
||||
// Package corona_general declares the M-Chain general-purpose
|
||||
// Corona (Ring-LWE) threshold protocol surface.
|
||||
// Corona (Module-LWE) threshold protocol surface.
|
||||
//
|
||||
// This is **not** consensus-Corona. Consensus uses Corona at
|
||||
// fixed parameters as the post-quantum cert lane (Q-Chain runs that
|
||||
|
||||
@@ -38,7 +38,7 @@ type Producer interface {
|
||||
// into fchain_fhe_root.
|
||||
type Consumer interface {
|
||||
// Ingest verifies the upstream proof and installs the bootstrap
|
||||
// key for use by F-Chain's FHE compute pipeline (LP-013).
|
||||
// key for use by F-Chain's FHE compute pipeline (LP-4655).
|
||||
Ingest(ctx context.Context, mchainSubject [32]byte, proof types.Proof) error
|
||||
// VerifyHandoff is the per-share verifier on F-Chain's
|
||||
// LaneFChainBootstrap. It validates that a F-Chain bootstrap
|
||||
|
||||
@@ -5,7 +5,7 @@ package types
|
||||
|
||||
// Proof is the verification artifact emitted at ceremony Finalize. It
|
||||
// is consumed by Quasar 3.0's cert pipeline (LP-020) and bound into
|
||||
// certificate_subject (LP-134).
|
||||
// certificate_subject (LP-1340).
|
||||
//
|
||||
// The substrate defines the envelope; the per-protocol payload (the
|
||||
// actual signature, group public key, FHE key, etc.) is opaque bytes
|
||||
|
||||
@@ -8,9 +8,9 @@ import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// CertLane mirrors LP-134 §QuasarCertLane. We declare it here in the
|
||||
// CertLane mirrors LP-1340 §QuasarCertLane. We declare it here in the
|
||||
// substrate because the share envelope is the wire form on which
|
||||
// every chain's verifier dispatches. The values must match LP-134
|
||||
// every chain's verifier dispatches. The values must match LP-1340
|
||||
// exactly. New lanes append; values never move.
|
||||
type CertLane uint8
|
||||
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
|
||||
// See the file LICENSE for licensing terms.
|
||||
|
||||
// Package tvm implements the Threshold VM substrate (M-Chain MPC and F-Chain FHE per LP-134).
|
||||
// The legacy "T-Chain" label predates the LP-134 split; new code targets M-Chain (MPC ceremonies
|
||||
// Package tvm implements the Threshold VM substrate (M-Chain MPC and F-Chain FHE per LP-1340).
|
||||
// The legacy "T-Chain" label predates the LP-1340 split; new code targets M-Chain (MPC ceremonies
|
||||
// for bridge custody of external wallets) or F-Chain (FHE compute). See ../README.md.
|
||||
package thresholdvm
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ type Processor struct {
|
||||
|
||||
// Keys
|
||||
publicKey *rlwe.PublicKey
|
||||
secretKey *rlwe.SecretKey // Only for keygen - shares distributed to M-Chain (MPC) per LP-134
|
||||
secretKey *rlwe.SecretKey // Only for keygen - shares distributed to M-Chain (MPC) per LP-1340
|
||||
evalKeys *rlwe.MemEvaluationKeySet
|
||||
|
||||
// Threshold components
|
||||
@@ -163,7 +163,7 @@ func (p *Processor) GenerateKeys() error {
|
||||
}
|
||||
|
||||
// GenerateThresholdShares splits the secret key into threshold shares
|
||||
// These shares should be distributed to M-Chain signers (per LP-134; legacy: T-Chain)
|
||||
// These shares should be distributed to M-Chain signers (per LP-1340; legacy: T-Chain)
|
||||
func (p *Processor) GenerateThresholdShares(partyPoints []multiparty.ShamirPublicPoint) ([]multiparty.ShamirSecretShare, error) {
|
||||
if p.secretKey == nil {
|
||||
return nil, errors.New("secret key not generated")
|
||||
|
||||
Reference in New Issue
Block a user