zorch¶
Composable building blocks for SNARKs, running on FRX — Fractalyze's fork of JAX with native finite-field dtypes. You assemble a prover the way deep learning stacks layers: reusable stages, chained until nothing is left to prove.
Install¶
Python 3.11, Linux x86_64 or macOS Apple Silicon. Install as pyzorch,
import as zorch:
pip install pyzorch # CPU — nothing else needed
pip install pyzorch 'frx[cuda12]' \
--extra-index-url https://fractalyze.github.io/pypi/simple/ # GPU (CUDA 12)
python -c "import frx, zorch; print(frx.devices()); print(zorch.__version__)"
Platform limits and error symptoms: Setup.
The mental model¶
A proof system is a chain of claim reductions. Each stage has paired prover/verifier roles; both derive the same reduced claim, and the last claim holds by construction:
flowchart LR
C0["SumClaim<br/><i>“f·h sums to v”</i>"] -->|"SumcheckProver<br/>(one round per variable)"| C1["EvaluationClaim<br/><i>“…if f·h(r) = u”</i>"]
C1 -->|"PCS opening stage"| C2["TrivialClaim<br/><i>holds by construction</i>"]
Inside a stage, rounds repeat one recurrence — a message observed into the Fiat-Shamir transcript, a challenge sampled back — and the transcript is a device-side value threaded through every call:
sequenceDiagram
participant P as ProverRound
participant T as Transcript (device)
participant V as VerifierRound
P->>T: observe(message)
T->>P: sample(challenge)
Note over P: fold state with challenge
V->>T: observe(same message)
T->>V: sample(same challenge)
Note over V: replay, check, carry RunningClaim
Find your door¶
-
Get started — learn by doing
Install, prove a sumcheck, verify it, and read what happened — about two minutes, CPU only.
-
Guides — get a task done
Assemble a full prover, keep your code fused on GPU, fix install and toolchain issues.
-
Reference — look it up
Every block's import path with worked examples, the field-dtype sharp bits, and the generated API.
-
Design — understand the WHY
The load-bearing decisions on one page — the two non-negotiables, the fusion contract, one line per block. Full prose lives on GitHub.
Using an AI coding agent?
The Guide section doubles as an installable agent skill:
npx skills add fractalyze/zorch gives your agent the same pages.