mirror of
https://github.com/luxfi/precompile.git
synced 2026-09-24 00:26:21 +00:00
Cite specs that exist, at their current numbers
LP-4835 now specifies 0x012220, so the STARK-FRI slot is allocated rather than a placeholder, and 0x012205 next door verifies the P3Q threshold-signature family. The 0x999x constants were labelled with LP numbers that were never issued; only LP-9999 exists, and its address table specifies the family.
This commit is contained in:
@@ -1119,7 +1119,7 @@ EVM interface to B-Chain MPC bridge operations:
|
||||
|
||||
### Threshold Precompiles (threshold/)
|
||||
|
||||
EVM interface to **M-Chain** MPC-as-a-service. Per LP-134 (Lux Chain
|
||||
EVM interface to **M-Chain** MPC-as-a-service. Per LP-1340 (Lux Chain
|
||||
Topology), M-Chain hosts the MPC ceremonies (CGGMP21 / FROST /
|
||||
Corona-gen) that the legacy T-Chain monolith used to host. The
|
||||
implementation lives in `chains/mpcvm/` running in MPC mode; the
|
||||
|
||||
+11
-10
@@ -20,7 +20,8 @@ import (
|
||||
// See LP-9015 for canonical specification
|
||||
const (
|
||||
// ─────────────────────────────────────────────────────────────────────────
|
||||
// CANONICAL V4 DEX PRECOMPILE SURFACE (LP-9999 family, receipt-settlement).
|
||||
// CANONICAL V4 DEX PRECOMPILE SURFACE — the 0x999x family, receipt-
|
||||
// settlement, specified by LP-9999's address table.
|
||||
//
|
||||
// ONE money path, three read views, one position adapter. Each is its OWN
|
||||
// modules.Module at its OWN address (orthogonal: a new primitive per slot,
|
||||
@@ -36,7 +37,7 @@ const (
|
||||
// book off-consensus or the C-side registry projection.
|
||||
// STRUCTURALLY INCAPABLE OF WRITING (see quoter_module.go).
|
||||
// 0x9997 StateView — read-only pool/book/market/position/account VIEW.
|
||||
// 0x9996 PositionManager— CLOB order-POSITION adapter (NOT an ERC-721 NFT). Holds
|
||||
// 0x9996 PositionManager— CLOB position adapter (NOT an ERC-721 NFT). Holds
|
||||
// NO custody of its own: every lifecycle op routes into
|
||||
// 0x9999 modifyLiquidity (+/- delta). Reads enumerate the
|
||||
// 0x9999 ownerOrders index.
|
||||
@@ -48,20 +49,20 @@ const (
|
||||
// 0x9999. No duplicate money paths; one consumedReceipt + one halt namespace
|
||||
// (dex.precompile.v1.9999.*). DEXPoolManagerAddress == LXSettleAddress.
|
||||
// ─────────────────────────────────────────────────────────────────────────
|
||||
DEXPoolManagerAddress = "0x0000000000000000000000000000000000009999" // LP-9999 V4 PoolManager — THE money path (== LXSettleAddress)
|
||||
DEXQuoterAddress = "0x0000000000000000000000000000000000009998" // LP-9998 Quoter — read-only swap-quote VIEW (advisory)
|
||||
DEXStateViewAddress = "0x0000000000000000000000000000000000009997" // LP-9997 StateView — read-only pool/book/position VIEW
|
||||
DEXPositionManagerAddress = "0x0000000000000000000000000000000000009996" // LP-9996 PositionManager — CLOB order-position adapter (composes 0x9999)
|
||||
DEXPoolManagerAddress = "0x0000000000000000000000000000000000009999" // 0x9999 V4 PoolManager — THE money path (== LXSettleAddress)
|
||||
DEXQuoterAddress = "0x0000000000000000000000000000000000009998" // 0x9998 Quoter — read-only swap-quote VIEW (advisory)
|
||||
DEXStateViewAddress = "0x0000000000000000000000000000000000009997" // 0x9997 StateView — read-only pool/book/position VIEW
|
||||
DEXPositionManagerAddress = "0x0000000000000000000000000000000000009996" // 0x9996 PositionManager — CLOB position adapter (composes 0x9999)
|
||||
|
||||
DEXPermitAddress = "0x0000000000000000000000000000000000009995" // LP-9995 Permit (RESERVED — constant only, not implemented)
|
||||
DEXFHEAddress = "0x0000000000000000000000000000000000009994" // LP-9994 FHE (RESERVED — constant only, not implemented)
|
||||
DEXAdminAddress = "0x0000000000000000000000000000000000009993" // LP-9993 Admin (RESERVED — constant only, not implemented)
|
||||
DEXPermitAddress = "0x0000000000000000000000000000000000009995" // 0x9995 Permit (RESERVED — constant only, not implemented)
|
||||
DEXFHEAddress = "0x0000000000000000000000000000000000009994" // 0x9994 FHE (RESERVED — constant only, not implemented)
|
||||
DEXAdminAddress = "0x0000000000000000000000000000000000009993" // 0x9993 Admin (RESERVED — constant only, not implemented)
|
||||
|
||||
// Core DEX (LP-901x) — RETIRED address space. 0x9010 was removed; 0x9999 is the
|
||||
// sole DEX precompile. These addresses are kept as constants ONLY so the values
|
||||
// are not reused; nothing dispatches at them. The canonical surface is the
|
||||
// LP-9999 family above.
|
||||
LXPoolAddress = "0x0000000000000000000000000000000000009010" // LP-9010 LXPool (REMOVED — constant only, not dispatched)
|
||||
LXPoolAddress = "0x0000000000000000000000000000000000009010" // 0x9010 LXPool — deprecated by LP-9999 (constant only, not dispatched)
|
||||
LXOracleAddress = "0x0000000000000000000000000000000000009011" // LP-9011 LXOracle (legacy)
|
||||
LXRouterAddress = "0x0000000000000000000000000000000000009012" // LP-9012 LXRouter (legacy)
|
||||
LXHooksAddress = "0x0000000000000000000000000000000000009013" // LP-9013 LXHooks (legacy)
|
||||
|
||||
+1
-1
@@ -196,7 +196,7 @@ var (
|
||||
// ceremony, where no single party can decrypt. That async Warp round-trip
|
||||
// (requestDecryption → threshold combine → fulfill) is not yet wired into
|
||||
// this precompile, so these ops fail closed rather than ever returning
|
||||
// plaintext from a local key. See LP-134.
|
||||
// plaintext from a local key. See LP-1340.
|
||||
ErrThresholdDecryptionRequired = errors.New("FHE decrypt requires F-Chain threshold ceremony (no local secret key)")
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
// FHE operations for the EVM gateway precompile, backed by github.com/luxfi/fhe.
|
||||
//
|
||||
// Confidentiality model (LP-134, threshold FHE):
|
||||
// Confidentiality model (LP-1340, threshold FHE):
|
||||
//
|
||||
// The precompile holds ONLY PUBLIC key material — the network encryption
|
||||
// public key and the bootstrap/evaluation key — both published by the
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
// See the file LICENSE for licensing terms.
|
||||
|
||||
// Confidentiality regression tests for the FHE gateway precompile (LP-134).
|
||||
// Confidentiality regression tests for the FHE gateway precompile (LP-1340).
|
||||
//
|
||||
// These tests pin the launch-safety invariant that the original code violated:
|
||||
// the precompile held a deterministic in-source secret key and returned real
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
// 0x012206 = Corona (Module-LWE threshold signatures)
|
||||
// 0x012207 = Magnetar ← this precompile (hash-based threshold FIPS 205)
|
||||
// 0x012208 = HQC (code-based KEM, family-disjoint backup)
|
||||
// 0x012220 = STARK-FRI (strict-PQ STARK / FRI — see precompile/starkfri, LP-221)
|
||||
// 0x012220 = STARK-FRI (strict-PQ STARK / FRI — see precompile/starkfri, LP-4835)
|
||||
//
|
||||
// Why a distinct slot if the verifier is interchangeable with SLH-DSA's?
|
||||
//
|
||||
|
||||
@@ -161,7 +161,7 @@ var (
|
||||
// 0x12206 = Corona (Module-LWE threshold)
|
||||
// 0x12207 = Magnetar (hash-based threshold, FIPS 205 byte-equal)
|
||||
// 0x12208 = HQC (code-based KEM, family-disjoint backup)
|
||||
// 0x12220 = STARK-FRI (strict-PQ STARK / FRI verifier — LP-221)
|
||||
// 0x12220 = STARK-FRI (strict-PQ STARK / FRI verifier — LP-4835)
|
||||
{
|
||||
Start: common.HexToAddress("0x0000000000000000000000000000000000012000"),
|
||||
End: common.HexToAddress("0x0000000000000000000000000000000000012fff"),
|
||||
|
||||
+7
-12
@@ -7,29 +7,24 @@
|
||||
// hashes over the Goldilocks 64-bit prime field, no KZG, no
|
||||
// pairings).
|
||||
//
|
||||
// History. This dispatch was previously misnamed "P3Q" and registered
|
||||
// at slot 0x012205. Per HANZO-CRYPTO-SUITE §5.2, ROADMAP-CRYPTO-STACK
|
||||
// §B.11, and LP-218, slot 0x012205 is reserved for "P3Q — Post-Quantum
|
||||
// Pulsar Proof", the on-chain Pulsar / FIPS 204 ML-DSA verifier. The
|
||||
// STARK dispatch lives here under its actual algorithmic identity
|
||||
// (STARK / FRI / SHAKE) at a separate slot. The previous P3Q-as-STARK
|
||||
// label was an aliasing error; this rename closes it.
|
||||
// The verifier occupies slot 0x012220, specified by LP-4835. The
|
||||
// neighbouring 0x012205 holds a different primitive — the P3Q
|
||||
// PQ threshold-signature verifier family (LP-4805) — not a STARK.
|
||||
//
|
||||
// LP-4200 unified PQCrypto block (post-fix):
|
||||
// LP-4200 unified PQCrypto block:
|
||||
//
|
||||
// 0x012201 = ML-KEM (Module-LWE KEM, FIPS 203)
|
||||
// 0x012202 = ML-DSA (Module-LWE single-party signature, FIPS 204)
|
||||
// 0x012203 = SLH-DSA (hash-based signature, FIPS 205)
|
||||
// 0x012204 = Pulsar (Module-LWE threshold FIPS 204, byte-equal)
|
||||
// 0x012205 = P3Q (Post-Quantum Pulsar Proof — see precompile/p3q)
|
||||
// 0x012205 = P3Q (PQ threshold-signature verifier family;
|
||||
// kinds Pulsar/Corona/Magnetar — see precompile/p3q)
|
||||
// 0x012206 = Corona (Module-LWE threshold)
|
||||
// 0x012207 = Magnetar (SLH-DSA threshold, FIPS 205 byte-equal)
|
||||
// 0x012208 = HQC (code-based KEM, family-disjoint backup)
|
||||
// 0x012220 = STARK-FRI ← this precompile (strict-PQ STARK / FRI / SHAKE)
|
||||
//
|
||||
// The 0x012220 slot is a placeholder pending dedicated LP allocation
|
||||
// (the prior 0x012205 claim is reverted to its canonical owner). The
|
||||
// 0x012220 base is one nibble above the dense PQ-signature block,
|
||||
// The 0x012220 base is one nibble above the dense PQ-signature block,
|
||||
// chosen so the strict-PQ STARK family can grow its own sub-range
|
||||
// (0x012220..0x01222F) without recolliding with the 0x012201..0x01220F
|
||||
// PQ-signature block.
|
||||
|
||||
Reference in New Issue
Block a user