mirror of
https://github.com/luxfi/chains.git
synced 2026-09-24 00:26:00 +00:00
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.
This commit is contained in:
@@ -110,7 +110,7 @@ TheGapSinceTheLastBlock` measures exactly that. Removing it means counting
|
|||||||
lifetimes in block heights, which no proposer can rewind — a change to the grant
|
lifetimes in block heights, which no proposer can rewind — a change to the grant
|
||||||
API, not a patch.
|
API, not a patch.
|
||||||
|
|
||||||
T-Chain is gone entirely — LP-134 dissolves it with zero remainder (threshold
|
T-Chain is gone entirely — LP-1340 dissolves it with zero remainder (threshold
|
||||||
signing → M, FHE → F, cross-chain messaging/teleport → B). There is no
|
signing → M, FHE → F, cross-chain messaging/teleport → B). There is no
|
||||||
`teleportvm` here and no `teleportvm` VM ID in `luxfi/constants`.
|
`teleportvm` here and no `teleportvm` VM ID in `luxfi/constants`.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ operator daemons (no luxd validator required), the same way `mpcd` and
|
|||||||
| I-Chain (identity) | `chains/identityvm/` | `luxfi/id` | n/a |
|
| I-Chain (identity) | `chains/identityvm/` | `luxfi/id` | n/a |
|
||||||
|
|
||||||
M and F are both canonical here — they are written in this repo, not shimmed
|
M and F are both canonical here — they are written in this repo, not shimmed
|
||||||
from another. They divide the work LP-134 took off T-Chain: M does threshold
|
from another. They divide the work LP-1340 took off T-Chain: M does threshold
|
||||||
signing and bridge custody, F coordinates confidential compute. F wraps the FHE
|
signing and bridge custody, F coordinates confidential compute. F wraps the FHE
|
||||||
runtime library at `mpcvm/fhe/`, which stays where it is because `mpcvm` also
|
runtime library at `mpcvm/fhe/`, which stays where it is because `mpcvm` also
|
||||||
uses it; F reuses that package's types and threshold parameters and owns its own
|
uses it; F reuses that package's types and threshold parameters and owns its own
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ are the ten chains live on 96369.
|
|||||||
|
|
||||||
| Name | Status |
|
| Name | Status |
|
||||||
|------|--------|
|
|------|--------|
|
||||||
| `teleportvm` / T-Chain | **Removed.** LP-134 dissolves T-Chain with zero remainder: threshold signing → M-Chain, FHE → F-Chain, cross-chain messaging/teleport → B-Chain (`bridgevm`). LP-5013 and LP-7330 are deprecated by LP-134; see LP-7050 for the migration map. No `teleportvm` VM ID exists in `luxfi/constants`. |
|
| `teleportvm` / T-Chain | **Removed.** LP-1340 dissolves T-Chain with zero remainder: threshold signing → M-Chain, FHE → F-Chain, cross-chain messaging/teleport → B-Chain (`bridgevm`). LP-5013 and LP-7330 are deprecated by LP-1340; see LP-7050 for the migration map. No `teleportvm` VM ID exists in `luxfi/constants`. |
|
||||||
| `servicenodevm` | **Never existed.** The service-node registry was never built under this name; the S-Chain directory here is `schain/` and is object storage, not a registry. |
|
| `servicenodevm` | **Never existed.** The service-node registry was never built under this name; the S-Chain directory here is `schain/` and is object storage, not a registry. |
|
||||||
|
|
||||||
### Plugin filenames
|
### Plugin filenames
|
||||||
|
|||||||
+1
-1
@@ -871,7 +871,7 @@ func (vm *VM) RemoveSigner(nodeID ids.NodeID, replacementNodeID *ids.NodeID) *Si
|
|||||||
log.String("reshareSession", reshareSession),
|
log.String("reshareSession", reshareSession),
|
||||||
)
|
)
|
||||||
|
|
||||||
// Trigger the reshare on M-Chain (LP-134) over warp. A failure here is
|
// Trigger the reshare on M-Chain (LP-1340) over warp. A failure here is
|
||||||
// retryable and does not undo the removal: the signer is out either way.
|
// retryable and does not undo the removal: the signer is out either way.
|
||||||
if err := vm.triggerReshareProtocol(reshareSession, nodeID, replacement); err != nil {
|
if err := vm.triggerReshareProtocol(reshareSession, nodeID, replacement); err != nil {
|
||||||
vm.log.Warn("bridgevm: reshare protocol not triggered",
|
vm.log.Warn("bridgevm: reshare protocol not triggered",
|
||||||
|
|||||||
+2
-2
@@ -35,10 +35,10 @@ import (
|
|||||||
_ "github.com/luxfi/precompile/vrf" // 0x3213 ECVRF verify (RFC 9381)
|
_ "github.com/luxfi/precompile/vrf" // 0x3213 ECVRF verify (RFC 9381)
|
||||||
|
|
||||||
// ── Post-Quantum (FIPS 203/204/205) — LP-4200 unified block ──────────
|
// ── Post-Quantum (FIPS 203/204/205) — LP-4200 unified block ──────────
|
||||||
_ "github.com/luxfi/precompile/corona" // 0x012206 Corona (Ring-LWE threshold)
|
_ "github.com/luxfi/precompile/corona" // 0x012206 Corona (Module-LWE threshold)
|
||||||
_ "github.com/luxfi/precompile/mldsa" // 0x012202 ML-DSA (FIPS 204 — Module-LWE signature)
|
_ "github.com/luxfi/precompile/mldsa" // 0x012202 ML-DSA (FIPS 204 — Module-LWE signature)
|
||||||
_ "github.com/luxfi/precompile/mlkem" // 0x012201 ML-KEM (FIPS 203 — Module-LWE KEM)
|
_ "github.com/luxfi/precompile/mlkem" // 0x012201 ML-KEM (FIPS 203 — Module-LWE KEM)
|
||||||
_ "github.com/luxfi/precompile/p3q" // 0x012205 P3Q (strict-PQ STARK / FRI / cSHAKE256)
|
_ "github.com/luxfi/precompile/p3q" // 0x012205 P3Q (kind-byte PQ threshold-sig dispatch)
|
||||||
_ "github.com/luxfi/precompile/pulsar" // 0x012204 Pulsar (Module-LWE threshold FIPS 204)
|
_ "github.com/luxfi/precompile/pulsar" // 0x012204 Pulsar (Module-LWE threshold FIPS 204)
|
||||||
_ "github.com/luxfi/precompile/slhdsa" // 0x012203 SLH-DSA (FIPS 205 — hash-based signature)
|
_ "github.com/luxfi/precompile/slhdsa" // 0x012203 SLH-DSA (FIPS 205 — hash-based signature)
|
||||||
_ "github.com/luxfi/precompile/xwing" // 0x2221 X-Wing hybrid KEM (X25519+ML-KEM)
|
_ "github.com/luxfi/precompile/xwing" // 0x2221 X-Wing hybrid KEM (X25519+ML-KEM)
|
||||||
|
|||||||
+1
-1
@@ -50,7 +50,7 @@ resolves a `CreateChainTx`'s vmID. `TestVMID_IsCanonicalAndStable` pins it.
|
|||||||
the state root; key shares live under `n/`, node-private.
|
the state root; key shares live under `n/`, node-private.
|
||||||
- Do **not** make `Block.Verify` trust the proposer. Every operation carries a
|
- Do **not** make `Block.Verify` trust the proposer. Every operation carries a
|
||||||
verifiable artifact and the block carries its post-state root.
|
verifiable artifact and the block carries its post-state root.
|
||||||
- Do **not** reintroduce `t-chain`/`tchain` types or a "T-Chain". Per LP-134 /
|
- Do **not** reintroduce `t-chain`/`tchain` types or a "T-Chain". Per LP-1340 /
|
||||||
LP-7050 it is removed with zero remainder: MPC→M-Chain, FHE→F-Chain
|
LP-7050 it is removed with zero remainder: MPC→M-Chain, FHE→F-Chain
|
||||||
(`fhevm`), teleport→B-Chain (`bridgevm`).
|
(`fhevm`), teleport→B-Chain (`bridgevm`).
|
||||||
- Do **not** derive an external custody address with anything but Keccak-256.
|
- Do **not** derive an external custody address with anything but Keccak-256.
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ to do that on-chain instead of in an off-chain signer cluster.
|
|||||||
- **Genesis chain.** M-Chain is in the P-Chain chain set at height 0 on every
|
- **Genesis chain.** M-Chain is in the P-Chain chain set at height 0 on every
|
||||||
network (`genesis/configs/*/mchain.json`), tracked by validators from boot —
|
network (`genesis/configs/*/mchain.json`), tracked by validators from boot —
|
||||||
not created later by a `CreateChainTx` someone has to remember to submit.
|
not created later by a `CreateChainTx` someone has to remember to submit.
|
||||||
- Per LP-134 / LP-7050 there is no T-Chain and no `teleportvm`: teleport IS
|
- Per LP-1340 / LP-7050 there is no T-Chain and no `teleportvm`: teleport IS
|
||||||
`bridgevm` (B-Chain, LP-6000), and the FHE half of the retired ThresholdVM is
|
`bridgevm` (B-Chain, LP-6000), and the FHE half of the retired ThresholdVM is
|
||||||
`fhevm` (F-Chain, LP-8200). Any identifier still naming "T-Chain" or
|
`fhevm` (F-Chain, LP-8200). Any identifier still naming "T-Chain" or
|
||||||
"ThresholdVM-as-a-chain" is stale.
|
"ThresholdVM-as-a-chain" is stale.
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ func TestRegistry_UnownedRegistryRefusesEveryLane(t *testing.T) {
|
|||||||
// they are Quasar's own consensus and attestation lanes. Sweeping all 256
|
// they are Quasar's own consensus and attestation lanes. Sweeping all 256
|
||||||
// encodable lane values rather than the ten named ones is deliberate: the lane
|
// encodable lane values rather than the ten named ones is deliberate: the lane
|
||||||
// arrives on the wire as a byte, so the ownership predicate has to answer for
|
// arrives on the wire as a byte, so the ownership predicate has to answer for
|
||||||
// values LP-134 never assigned.
|
// values LP-1340 never assigned.
|
||||||
func TestRegistry_OwnerPartitionsTheLaneSpace(t *testing.T) {
|
func TestRegistry_OwnerPartitionsTheLaneSpace(t *testing.T) {
|
||||||
for _, owner := range []struct {
|
for _, owner := range []struct {
|
||||||
owner Owner
|
owner Owner
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Roots is the set of upstream roots a Quasar 3.0 certificate_subject
|
// 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 ten roots are required, including both MChain and FChain —
|
// All ten roots are required, including both MChain and FChain —
|
||||||
// this is the structural property that makes cross-chain replay
|
// this is the structural property that makes cross-chain replay
|
||||||
@@ -31,11 +31,11 @@ type Roots struct {
|
|||||||
|
|
||||||
// BindSubject computes certificate_subject = H(... all roots ...).
|
// BindSubject computes certificate_subject = H(... all roots ...).
|
||||||
// The hash domain is sha256 with a 1-byte version tag (0x01 for
|
// 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.
|
// set without colliding.
|
||||||
func BindSubject(r Roots) [32]byte {
|
func BindSubject(r Roots) [32]byte {
|
||||||
h := sha256.New()
|
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.ParentBlock[:])
|
||||||
h.Write(r.StateRoot[:])
|
h.Write(r.StateRoot[:])
|
||||||
h.Write(r.ExecRoot[:])
|
h.Write(r.ExecRoot[:])
|
||||||
@@ -62,7 +62,7 @@ func VerifySubject(claimed [32]byte, r Roots) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// RequireBothChains reports an error if either MChainCeremony or
|
// 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
|
// **both** chain roots, even on rounds where one chain does not
|
||||||
// finalize a ceremony (the unchanged root from the previous round
|
// finalize a ceremony (the unchanged root from the previous round
|
||||||
// satisfies the binding).
|
// satisfies the binding).
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ func TestSubject_VerifyAcceptsOnlyTheDerivedClaim(t *testing.T) {
|
|||||||
|
|
||||||
// Each chain root is required on its own.
|
// Each chain root is required on its own.
|
||||||
//
|
//
|
||||||
// LP-134 binds mchain_ceremony_root and fchain_fhe_root on every round, even
|
// LP-1340 binds mchain_ceremony_root and fchain_fhe_root on every round, even
|
||||||
// the rounds where one chain finalizes nothing (its unchanged root satisfies
|
// the rounds where one chain finalizes nothing (its unchanged root satisfies
|
||||||
// the binding). A check that only fired when *both* were zero would let a round
|
// the binding). A check that only fired when *both* were zero would let a round
|
||||||
// that omits one chain through, and the subject would then attest to a single
|
// that omits one chain through, and the subject would then attest to a single
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ type CiphertextStorage interface {
|
|||||||
Delete(handle common.Hash) error
|
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 {
|
type Relayer struct {
|
||||||
logger log.Logger
|
logger log.Logger
|
||||||
decryptor *ThresholdDecryptor
|
decryptor *ThresholdDecryptor
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
// service.go carves the (currently single, overloaded) threshold VM into
|
// service.go carves the (currently single, overloaded) threshold VM into
|
||||||
// three orthogonal SERVICE surfaces — ThresholdService, MPCService, FHEService
|
// three orthogonal SERVICE surfaces — ThresholdService, MPCService, FHEService
|
||||||
// — per LP-134 / LP-7050. This is the "separate what the primitive IS from
|
// — per LP-1340 / LP-7050. This is the "separate what the primitive IS from
|
||||||
// where it is APPLIED" decomposition (Hammock-driven composition, not
|
// where it is APPLIED" decomposition (Hammock-driven composition, not
|
||||||
// inheritance).
|
// inheritance).
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ package mpcvm
|
|||||||
|
|
||||||
import "testing"
|
import "testing"
|
||||||
|
|
||||||
// TestServiceSurfaces_Decomposition documents and locks the LP-134 / LP-7050
|
// TestServiceSurfaces_Decomposition documents and locks the LP-1340 / LP-7050
|
||||||
// service decomposition: the single *VM satisfies all three orthogonal
|
// service decomposition: the single *VM satisfies all three orthogonal
|
||||||
// surfaces today (compatibility bridge), and — critically — the layering is
|
// surfaces today (compatibility bridge), and — critically — the layering is
|
||||||
// real, not cosmetic: MPCService and FHEService each EMBED ThresholdService,
|
// real, not cosmetic: MPCService and FHEService each EMBED ThresholdService,
|
||||||
|
|||||||
+1
-1
@@ -41,7 +41,7 @@ package mpcvm
|
|||||||
// proves two nodes agree on the whole registry, but it cannot prove to a third
|
// proves two nodes agree on the whole registry, but it cannot prove to a third
|
||||||
// party that one particular key is in it without replaying the log. That is
|
// party that one particular key is in it without replaying the log. That is
|
||||||
// enough for M-Chain's job (validators must agree on custody), and it is what
|
// enough for M-Chain's job (validators must agree on custody), and it is what
|
||||||
// LP-134's mchain_ceremony_root asks for. A Merkle registry root is the upgrade
|
// LP-1340's mchain_ceremony_root asks for. A Merkle registry root is the upgrade
|
||||||
// if external membership proofs are ever needed; it is deliberately not built
|
// if external membership proofs are ever needed; it is deliberately not built
|
||||||
// on speculation.
|
// on speculation.
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import (
|
|||||||
"fmt"
|
"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
|
// 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.
|
// exactly. New lanes append; values never move.
|
||||||
type CertLane uint8
|
type CertLane uint8
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
// Package mpcvm implements the shared threshold VM substrate — a LIBRARY,
|
// Package mpcvm implements the shared threshold VM substrate — a LIBRARY,
|
||||||
// not a chain — consumed by M-Chain (MPC: CGGMP21/FROST/Pulsar-general threshold
|
// not a chain — consumed by M-Chain (MPC: CGGMP21/FROST/Pulsar-general threshold
|
||||||
// signing for bridge custody of external wallets, LP-7100) and F-Chain (FHE:
|
// signing for bridge custody of external wallets, LP-7100) and F-Chain (FHE:
|
||||||
// TFHE compute / threshold decrypt, LP-8200). Per LP-134 / LP-7050 there is NO
|
// TFHE compute / threshold decrypt, LP-8200). Per LP-1340 / LP-7050 there is NO
|
||||||
// T-Chain and NO teleportvm; teleport IS bridgevm (B-Chain, LP-6000). Any live
|
// T-Chain and NO teleportvm; teleport IS bridgevm (B-Chain, LP-6000). Any live
|
||||||
// identifier still naming "T-Chain" or "ThresholdVM-as-a-chain" is stale.
|
// identifier still naming "T-Chain" or "ThresholdVM-as-a-chain" is stale.
|
||||||
// See ../README.md.
|
// See ../README.md.
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ Note the 20-byte (160-bit) NodeID truncation: collision security ~80-bit classic
|
|||||||
### 2.2 Validator / block / vote signatures — **PQ-ready HYBRID, strong design** ✅
|
### 2.2 Validator / block / vote signatures — **PQ-ready HYBRID, strong design** ✅
|
||||||
|
|
||||||
`~/work/lux/consensus/protocol/quasar/`:
|
`~/work/lux/consensus/protocol/quasar/`:
|
||||||
- Per-validator vote evidence can be **Pulsar (ML-DSA-65)**, **Corona (Ring-LWE threshold)**, **Magnetar (SLH-DSA / FIPS-205)**, or **classical BLS12-381** (`consensus_cert.go:178-191`).
|
- Per-validator vote evidence can be **Pulsar (ML-DSA-65)**, **Corona (Module-LWE threshold)**, **Magnetar (SLH-DSA / FIPS-205)**, or **classical BLS12-381** (`consensus_cert.go:178-191`).
|
||||||
- The finality certificate is a **policy-gated envelope** (`ConsensusCert`, `:296-340`). **Invariant I11** (`:80-83`, enforced `:741-750`): a classical-only cert is **rejected** under any policy requiring a PQ leg; classical (BLS) is accepted *only after every required PQ leg is already satisfied by PQ evidence* → `ErrMissingRequiredPQLeg`.
|
- The finality certificate is a **policy-gated envelope** (`ConsensusCert`, `:296-340`). **Invariant I11** (`:80-83`, enforced `:741-750`): a classical-only cert is **rejected** under any policy requiring a PQ leg; classical (BLS) is accepted *only after every required PQ leg is already satisfied by PQ evidence* → `ErrMissingRequiredPQLeg`.
|
||||||
- Production profiles (`polaris.go:11-13`): **Pulsar** = BLS‖Puls‖ZK, **Aurora** = +Corona, **Polaris** = +Magnetar (cross-family). All require ≥1 PQ leg.
|
- Production profiles (`polaris.go:11-13`): **Pulsar** = BLS‖Puls‖ZK, **Aurora** = +Corona, **Polaris** = +Magnetar (cross-family). All require ≥1 PQ leg.
|
||||||
- Hybrid is explicit: `PolarisLegs.BLS *bls.Signature` is **optional / nil for pure-PQ** (`polaris.go:56-59`), always verified when present (`cert_policy_verify.go:122-128`).
|
- Hybrid is explicit: `PolarisLegs.BLS *bls.Signature` is **optional / nil for pure-PQ** (`polaris.go:56-59`), always verified when present (`cert_policy_verify.go:122-128`).
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ type Processor struct {
|
|||||||
|
|
||||||
// Keys
|
// Keys
|
||||||
publicKey *rlwe.PublicKey
|
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
|
evalKeys *rlwe.MemEvaluationKeySet
|
||||||
|
|
||||||
// Threshold components
|
// Threshold components
|
||||||
@@ -163,7 +163,7 @@ func (p *Processor) GenerateKeys() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GenerateThresholdShares splits the secret key into threshold shares
|
// 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) {
|
func (p *Processor) GenerateThresholdShares(partyPoints []multiparty.ShamirPublicPoint) ([]multiparty.ShamirSecretShare, error) {
|
||||||
if p.secretKey == nil {
|
if p.secretKey == nil {
|
||||||
return nil, errors.New("secret key not generated")
|
return nil, errors.New("secret key not generated")
|
||||||
|
|||||||
Reference in New Issue
Block a user