Skip to main content

sp1-zorch

A lean SP1 prover built on zorch's scheme-agnostic SNARK building blocks. zorch provides the reusable pieces (hashing, Merkle commitment, sumcheck, fold, …); sp1-zorch adds only the SP1-specific glue on top — domain separator, verify codes, heap proof layout, and the FFI byte-match against the SP1 reference prover.

frx  ──▶  zorch (scheme-/zkVM-agnostic blocks)  ──▶  sp1-zorch (SP1 glue)

Status

The full SP1 shard proving scheme runs on zorch blocks: a ProveChain of trace commit → LogUp-GKR → zerocheck → jagged PCS, byte-matching SP1's reference prover end to end (its sp1_verify_shard accepts the assembled proof). See docs/architecture.md.

Installation

pip install sp1-zorch          # CPU, PyPI only (Python 3.11)

GPU (the byte-match FFI path) additionally needs the frx CUDA plugins. frx-cuda12-pjrt is 129 MB, over PyPI's 100 MiB per-file limit; a limit increase is pending, until then:

pip install sp1-zorch "frx[cuda12]" \
    --extra-index-url https://fractalyze.github.io/pypi/simple/

Note zorch on PyPI is an unrelated third-party package. The distribution is pyzorch (the import name stays zorch); pip install sp1-zorch pulls it for you.

Development

sp1-zorch is pure Python on frx (Field, Ring Accelerated), run against the Fractalyze XLA GPU plugin, built with Bazel (bzlmod). It consumes zorch as a Bazel module, pinned in MODULE.bazel via git_override for reproducible builds.

python3.11 -m venv .venv && . .venv/bin/activate
pip install -r requirements.in \
    --extra-index-url https://fractalyze.github.io/pypi/simple/

Dev against a local zorch checkout instead of the pinned commit — create .bazelrc.user (gitignored):

common --override_module=zorch=/abs/path/to/your/zorch/checkout

Run the tests (CPU is the default for correctness; the FFI byte-match against the SP1 reference needs a CUDA GPU):

bazel test //...

Documentation

See docs/ — the architecture (the shard proof as a ProveChain of Stages, each running inner Rounds, threaded by a Bridge, plus the SP1 dump vocabulary), the development guide (environment, testing, and the per-stage SP1 baseline), and the conventions.

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

sp1_zorch-0.1.1.tar.gz (183.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sp1_zorch-0.1.1-py3-none-any.whl (218.9 kB view details)

Uploaded Python 3

File details

Details for the file sp1_zorch-0.1.1.tar.gz.

File metadata

  • Download URL: sp1_zorch-0.1.1.tar.gz
  • Upload date:
  • Size: 183.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for sp1_zorch-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4e46aca50a27d3345b0b826d5425d54d2e8d4febfd6a1d5b469c71a4ca42154b
MD5 2f102a78b22c337601aabfadc523109a
BLAKE2b-256 0ae14deee374b6ccbe253ce2cfbf815e914036c07b82db09eaedf9b9ddb52ef7

See more details on using hashes here.

Provenance

The following attestation bundles were made for sp1_zorch-0.1.1.tar.gz:

Publisher: release.yml on fractalyze/sp1-zorch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sp1_zorch-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sp1_zorch-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 218.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for sp1_zorch-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 68cb708e5127c53d3a10d15c6de97308aca591210f3b5507a72fac97b6627975
MD5 a0a346c2eb6a528c9ce3770a4069af01
BLAKE2b-256 6cd00c621695070e143d35ddf8ad6cbce6887d0a75f4b59633e0108c7afc5a38

See more details on using hashes here.

Provenance

The following attestation bundles were made for sp1_zorch-0.1.1-py3-none-any.whl:

Publisher: release.yml on fractalyze/sp1-zorch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.2

2 files

This release

0.1.1 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page