zorch
SNARK = Σ IOP Round
FRX-native building blocks for Modern SNARKs. zorch sits between FRX —
Fractalyze's fork of JAX — and the proof systems
that consume it: FRX provides tracing and codegen, lowered through Fractalyze
XLA, its fork of stock XLA that adds native
field and elliptic-curve types. zorch provides the reusable pieces a proof
system is assembled from.
A Modern SNARK is IOP + PCS. The way deep learning stacks Layers, zorch
stacks Rounds — the one composable unit the rest is threaded through.
Design Philosophy
- Proving-scheme-agnostic. The blocks capture every proving scheme, not a
single one.
Round/ Fiat-Shamir /Polynomial/PCS/ fold / zero-check compose into FRI, sumcheck, GKR, STARK, Basefold, WHIR, …; pairing-based schemes plug in by swapping thePCSblock (e.g. a KZG-style commitment). - Implementation-agnostic.
zorchtargets the proving scheme, not any one downstream implementation — a zkVM, a zkML prover, a zkTLS prover. Each plugs in as a consumer; nothing implementation-specific leaks into a block. - Fusion-first. Each
Round— and eachcommit/open, eachabsorb/squeeze, each fold step, and a hash permutation's internal rounds — must lower to a single fused kernel. We get there by construction, not by a per-primitive pattern-matcher in the compiler. - Easy to assemble. These are building blocks; the API optimizes for snapping them together.
Building blocks
The one unit is the Round — a prover↔verifier interaction of an IOP: a
message observed into the Fiat-Shamir transcript, a challenge sampled back
(observe→sample, via __call__). Rounds nest — a single per-variable
step is a Round, and a whole sumcheck (its per-variable Rounds bundled) is
itself a Round. This is what SNARK = Σ IOP Round says literally: a
Fiat-Shamir-compiled IOP is a tree of these rounds, Σ flattening it to the leaf
interactions.
Grouping Rounds gives either a bigger Round (a sumcheck, from its
per-variable rounds) or — when the group is a top-level phase — a Stage. Two
roles organize the composition; both are Rounds, since a chain is itself one:
- A
Stageis aRoundthat is one phase of the scheme'sprove_chain— the sequence of Stages the scheme is (trace-commit, logup-gkr, zero-check, a PCS opening). - A
Bridgeis a transcript-onlyRoundfor soundness or security work — a grind (buys security bits), a framed observe or domain separator (closes a Fiat-Shamir soundness gap), a sampled-and-discarded challenge (matches the reference's schedule). It usually sits inside a Stage; a scheme may also place one directly in theprove_chainbetween two stages (an RLC batching their claims).
So the shape is recursive — the prove_chain is Stages (with the occasional
Bridge between them); a Stage chains Rounds and Bridges; a Round may
itself chain Rounds, down to the leaf interaction:
prove() — the prove_chain is Stages; a Stage holds Rounds and Bridges
──────────────────────────────────────────────────────────────────────
Stage trace-commit commit the witness columns
Stage logup-gkr the interaction argument:
Bridge grind a PoW inside the stage (buys security bits)
Round layer L one layer — itself a Round of Rounds:
Round bind x₀ a leaf: one observe → sample
Round bind x₁
Round layer L-1
Stage zero-check the constraint sumcheck:
Bridge observe(framing) bind the transcript first (soundness)
Round bind x₀ a leaf: one observe → sample
Round bind x₁
Stage jagged-evals the PCS opening
Round |
Stage |
Bridge |
|
|---|---|---|---|
| Is | a prover↔verifier interaction; nests | a sequence of Rounds that is one prove_chain phase |
a transcript-only connective Round |
| Does | observe→sample at the leaf |
witness + real compute (an inner sumcheck, an open) | a transcript op soundness/security needs |
| Example | a sumcheck round, or a whole sumcheck | trace-commit, logup-gkr, zero-check, jagged-evals | a grind, a framed observe, a discarded sample |
Stage and Bridge are the same Round interface — that is how chains nest and
how the verifier mirrors the prover round-for-round — but the roles are what a
reader navigates by.
Where the boundaries fall. A leaf Round is each prover↔verifier interaction
(observe→sample); Rounds bundle into a bigger Round or, at a prove_chain
phase, a Stage; a Bridge sits wherever the reference's soundness argument
needs a transcript op — inside a stage, or between two in the prove_chain. The
full carry-and-seam contract is
docs/composition/stage-composition.md.
Where the classic pieces fit. A ZK reader expects Fiat-Shamir, Polynomial,
PCS, and sumcheck as top-level "blocks." In this picture they are not peers of
the Round:
- Fiat-Shamir,
Polynomial, and fold are the materials aRoundbody computes with — the transcript it threads, the polynomials it evaluates, the fold (2-to-1 reduction, one challenge per round) it applies each step. - A
PCSopening and a zero-check areStages — each a distinct phase: a zero-check reduces to a sumcheck, while aPCSopening runs its commitment-opening and evaluation checks (the jagged-evals stage above).
Development
zorch is pure Python on FRX, run against its GPU plugin. A virtualenv with
the pinned toolchain:
python3.11 -m venv .venv && . .venv/bin/activate
pip install -r requirements.in \
--extra-index-url https://fractalyze.github.io/pypi/simple/
The dev loop — per-workspace venvs, developing against a local Fractalyze XLA
build, the FRX compile-cache rule — lives in docs/reference/development.md.
Documentation
- Task-indexed docs hub:
docs/README.md— indexes every design doc by what you're trying to do.
License
Licensed under the Apache License, Version 2.0 (see LICENSE).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyzorch-0.1.0.tar.gz.
File metadata
- Download URL: pyzorch-0.1.0.tar.gz
- Upload date:
- Size: 283.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94f4e69bdb13a9242c47621eff5e408926a3a191c9eac00f02838b1b1c64f772
|
|
| MD5 |
9e3d4f13ee27b2c603923e91c5d0cae9
|
|
| BLAKE2b-256 |
3ffe22a69af3ad0954eaa8a33b3b8b2c4921d281e0e99f85b089bd19d6846d73
|
Provenance
The following attestation bundles were made for pyzorch-0.1.0.tar.gz:
Publisher:
publish.yml on fractalyze/zorch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyzorch-0.1.0.tar.gz -
Subject digest:
94f4e69bdb13a9242c47621eff5e408926a3a191c9eac00f02838b1b1c64f772 - Sigstore transparency entry: 2245779058
- Sigstore integration time:
-
Permalink:
fractalyze/zorch@50071b061190fd3e1c7523a2be8837f53f0db46a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/fractalyze
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@50071b061190fd3e1c7523a2be8837f53f0db46a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file pyzorch-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyzorch-0.1.0-py3-none-any.whl
- Upload date:
- Size: 371.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a1fa682bf38c0dde6048db9fdf05b8fbfb79099ad05ad8d214ea96ca04b2b6e
|
|
| MD5 |
ff255f0139b75d34d50b049d76f6ac9d
|
|
| BLAKE2b-256 |
50b0658a576f8da14b33643046be87bee643f64ac2d38904f51c26339698d001
|
Provenance
The following attestation bundles were made for pyzorch-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on fractalyze/zorch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyzorch-0.1.0-py3-none-any.whl -
Subject digest:
8a1fa682bf38c0dde6048db9fdf05b8fbfb79099ad05ad8d214ea96ca04b2b6e - Sigstore transparency entry: 2245779498
- Sigstore integration time:
-
Permalink:
fractalyze/zorch@50071b061190fd3e1c7523a2be8837f53f0db46a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/fractalyze
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@50071b061190fd3e1c7523a2be8837f53f0db46a -
Trigger Event:
workflow_dispatch
-
Statement type: