LPsLux Proposals
Post-Quantum Cryptography
LP-4800

STARK-FRI Core — Plonky3 PQ-Only Fork (formerly "P3Q Core")

Draft

Lux Plonky3 fork stripped to post-quantum-only primitives: STARK / FRI / IOP rollup substrate over a Goldilocks-style prime field with cSHAKE256 binding. Implementation occupies placeholder precompile 0x012220 (pending LP-221 dedicated spec); previously parked at 0x012205 prior to 2026-06-03.

Category
Core
Created
2026-05-18

Implementation status (code-audited 2026-07-03): SHIPPED precompile/starkfri/ (contract + e2e/bench tests) plus crypto/p3q; slot relocated to 0x012220 per the slot-history note.

Abstract

LP-4800 is the Lux post-quantum-only fork of Plonky3, the STARK / FRI / IOP rollup substrate. The fork strips every primitive whose security reduces to elliptic-curve-discrete-log or pairing assumptions (Poseidon-MDS over BN254 scalar field, KZG opener, pairing-based verifier), keeping only the hash-and-arithmetic core: a 64-bit Goldilocks-style prime field, AIR / PLONK trace builder, FRI low-degree test (LP-4820), and cSHAKE256 / SHA-3 hash family binding (LP-4810). The verifier precompile is parked at placeholder slot 0x012220 pending LP-221's dedicated spec, with proof size ~30 KB and verification ~5-10 ms. It is the STARK substrate for Z-Chain encrypted-execution circuits (LP-4830) and the strict-PQ profile rollup verifier. This LP pins the identifier, scope, and implementation pointer; the field, AIR language, PCS, and gas-cost model will be specified in subsequent revisions of LP-4800-4830 and formalized in LP-221.

Sub-component LPs

  • LP-4810 — P3Q-SHA3 hash family binding
  • LP-4820 — P3Q-FRI low-degree test
  • LP-4830 — P3Q-zchain circuits

Reference implementation

  • Primitive: luxfi/p3q (Lux fork of plonky3, planned)
  • Upstream reference: Plonky3 (stripped of EC primitives)
  • Precompile address: 0x012220 (placeholder, pending LP-221 dedicated spec; relocated from 0x012205 on 2026-06-03 per LP-218 §"Slot history: STARK-FRI rename")
  • Source code: ~/work/lux/precompile/starkfri/ (renamed from ~/work/lux/precompile/p3q/ on 2026-06-03)

Slot history

The verifier was originally allocated to 0x012205 and the implementation package was named p3q. On 2026-06-03 the slot 0x012205 was reassigned to the unified P3Q verifier family defined in LP-218 + LP-220 — a single precompile with a 1-byte kind discriminator dispatching to Pulsar (0x01), Corona (0x02), and Magnetar (0x03) primitive verifiers (one slot, one ABI, one audit surface; "P3Q" now denotes that PQ verifier family, not the Plonky3-fork STARK verifier). The Plonky3-fork STARK-FRI verifier covered by this LP was relocated to placeholder slot 0x012220 and its implementation moved to ~/work/lux/precompile/starkfri/ with package name starkfri.

The placeholder allocation is reserved until LP-221 is written to provide the dedicated spec for the relocated STARK-FRI verifier (field, AIR language, PCS, gas-cost model, light-client envelope). Until LP-221 lands, this LP (LP-4800) and its sub-components (LP-4810 / LP-4820 / LP-4830) are the canonical descriptions of the Plonky3-fork STARK-FRI verifier substrate and its sub-components, parked at the placeholder slot.

See LP-218 §"Slot history: STARK-FRI rename", LP-300 §"Conflict resolution policy", LP-0120 §"Slot history — 0x012205 reassignment", and AUDIT-2026-05-18 (appended note) for the cross-document relocation record.

Copyright and related rights waived via CC0.