Skip to content

[PlonK] Promote BLS12-381 PlonK prover, verifier, and on-chain validator to Beta #127

Open

Description

@satran004

Goal

Consolidate all remaining cryptographic, on-chain, interop, scalability, and assurance work required to promote ZeroJ's PlonK BLS12-381 prover, off-chain verifier, and on-chain Plutus V3 verifier from Experimental to Beta (matching Groth16's testnet / non-value-bearing Beta bar — noting that production/value-bearing mainnet use still requires an independent external cryptographic audit).

Current Baseline (Already Completed)


Consolidated Roadmap & Tasks

1. Cardano v2 Profile — Strong Fiat-Shamir, Domain Parity & Single-Decode Verifier (ADR-0069) (R3)

  • M1 (Spec & KATs): Finalize exact byte-level zeroj-plonk-cardano-v2 transcript schedule (explicit v2 domain separator, VK digest binding qM, qL, qR, qO, qC, s1, s2, s3, canonical 96-byte compressed X2 = tau * G2, power, k1, k2, nPublic, and length-prefixed public inputs; full transcript chaining across all challenges including u). Publish independent Python/Rust reference KAT vectors covering VK/X2 binding and challenge boundaries (zeta in {0, 1, omega}, Z_H(zeta) == 0).
  • M2 (Off-chain Prover & Verifier): Implement TranscriptEncoding.CARDANO_V2 in PlonKProverBLS381 and PlonkBLS12381Verifier while keeping the legacy snarkjs 0.7.6 v1 profiles intact and strictly separated by proofFormat. Add negative tests for missing VK/X2 binding, u tampering, degenerate challenges, and v1↔v2 cross-profile replay.
  • M3 (On-chain Plutus V3 Verifier — supersedes [On-Chain] Optimize PlonK on-chain verifier (PlonkBLS12381Lib) CPU budget on Plutus V3 #43): Implement single-decode v2 Plutus V3 library/validators in zeroj-onchain-julc:
    • Decompress each compressed 48-byte G1 VK/proof point once via CIP-0381 bls12_381_G1_uncompress (eliminating repeated decompressions across the 19 current call sites in PlonkBLS12381Lib).
    • Enforce zeta != 0 and Z_H(zeta) = zeta^n - 1 != 0 directly on-chain (closing the v1 gap where PlonkBLS12381Lib checks only zeta != 1, zeta != omega, and public-input slots).
    • Audit and trim redundant validator @Param fields; profile Plutus V3 CPU/memory budget (targeting a major reduction from the current ~4.58–4.71B CPU) and validate end-to-end on Yaci DevKit.

2. Cross-Provider Acceleration & Differential Verification (R2/R3)

  • Add blst-backed verification / MSM acceleration path for PlonK BLS12-381 (matching Groth16's pure-Java + blst dual-provider architecture; relates to Add provider-neutral G1/G2 multi-scalar multiplication to Bls12381Provider #22).
  • Add cross-provider differential tests verifying identical accept/reject semantics between pure-Java and blst PlonK verifiers across positive, malformed, and adversarial inputs.

3. Unified Pipeline, Scale & Interop (R1/R2)

  • Unified API facade (supersedes [PlonK] Introduce unified PlonKPipeline and PlonKKeys facade matching Groth16Pipeline #42): Introduce PlonKKeys (AutoCloseable) and PlonKPipeline matching Groth16Keys / Groth16Pipeline (compilation, .ptau / proving-key cache management, witness generation, and proving).
  • Large-circuit scaling & benchmarks (supersedes remaining benchmarking scope of [PlonK] Optimize PlonK setup and prover with O(n log n) FFT / coset NTT polynomial evaluations #38): Benchmark setup/prover memory and throughput on larger domains ($n \ge 2^{14}$–$2^{18}$), and evaluate flat/mmap key storage for larger PlonK circuits if heap becomes a bottleneck.
  • snarkjs .zkey interop decision (follow-up to ADR-0066): Either implement a full snarkjs 0.7.6 PlonK .zkey importer matching plonk_setup.js section layout (with live snarkjs CI round-trip tests) or formally keep .ptau-only import as the supported path and remove the UnsupportedOperationException stub.

4. On-Chain Application Binding & Example Validators (R2)

  • Ship a bound PlonK on-chain spending validator example demonstrating ScriptContext binding, replay protection, and state/UTxO continuity (parallel to Groth16BLS12381TxOutRefBindingVerifier / Groth16AuthenticatedStateTransitionValidator), verified in Julc VM and Yaci DevKit.

5. Assurance, Fuzzing & Promotion Gates (R2/R3)

  • Add property-based and Jazzer fuzz tests covering PlonK wire/JSON/CBOR decoding, Fiat-Shamir transcripts, adversarial proofs/VKs, and PlonKCompiler gate/permutation lowering (relates to [Enhancement] Implement Jazzer fuzzing and differential checks for ZeroJ cryptographic boundaries #107).
  • Record reproducible Julc VM + Yaci DevKit E2E results and updated Plutus V3 budget tables before promoting PlonK from Experimental to Beta in README.md and docs.
  • (Production / mainnet gate — separate from Beta): Complete an independent external cryptographic audit covering the PlonK prover, off-chain verifier, v2 transcript, and Plutus V3 validator.

Superseded / Consolidated Issues

This issue consolidates and supersedes:

Related (kept open separately due to broader scope): #22, #107.

Activity

  1. added
    enhancement
    assurance
    security
    design-adr
    on Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    assurancedesign-adrenhancementsecurity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions