Skip to content

o1-labs/proof-systems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kimchi

codecov CI dependency status

This repository contains kimchi, a general-purpose zero-knowledge proof system for proving the correct execution of programs.

You can read more about this project on the Kimchi book, or for a lighter introduction in this blogpost.

See here for the rust documentation.

User Warning

This project comes as is. We provide no guarantee of stability or support, as the crates closely follow the needs of the Mina project.

If you use this project in a production environment, it is your responsibility to perform a security audit to ensure that the software meets your requirements.

Performance

At the time of this writing:

Proving time

number of gates seconds
2^11 0.6s
2^15 3.3s
2^16 6.3s

Verification time

number of gates seconds
2^15 0.1s
2^16 0.1s

Proof size

number of gates bytes
2^15 4947
2^16 5018

Organization

The project is organized in the following way:

  • book/. The mina book, RFCs, and specifications. Available here in HTML.
  • curves/. The elliptic curves we use (for now just the pasta curves).
  • groupmap/. Used to convert elliptic curve elements to field elements.
  • hasher/. Interfaces for mina hashing.
  • kimchi/. Our proof system based on PLONK.
  • poly-commitment/. Polynomial commitment code.
  • poseidon/. Implementation of the poseidon hash function.
  • signer/. Interfaces for mina signature schemes.
  • tools/. Various tooling to help us work on kimchi.
  • turshi/. A Cairo runner written in rust.
  • utils/. Collection of useful functions and traits.

Contributing

Check CONTRIBUTING.md if you are interested in contributing to this project.

Generate rustdoc locally

An effort is made to have the documentation being self-contained, referring to the mina book for more details when necessary. You can build the rust documentation with

rustup install nightly
RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo +nightly doc --all --no-deps

You can visualize the documentation by opening the file target/doc/index.html.

CI

  • CI. This workflow ensures that the entire project builds correctly, adheres to guidelines, and passes all necessary tests.
  • Nightly tests with the code coverage. This workflow runs all the tests per scheduler or on-demand, generates and attaches the code coverage report to the job's execution results.
  • Benchmarks. This workflow runs benchmarks when a pull request is labeled with "benchmark." It sets up the Rust and OCaml environments, installs necessary tools, and executes cargo criterion benchmarks on the kimchi crate. The benchmark results are then posted as a comment on the pull request for review.
  • Deploy Specifications & Docs to GitHub Pages. When CI passes on master, the documentation built from the rust code will be available by this link and the book will be available by this link.

Nix for Dependencies (WIP)

If you have nix installed and in particular, flakes enabled, you can install the dependencies for these projects using nix. Simply nix develop . inside this directory to bring into scope rustup, opam, and go (along with a few other tools). You will have to manage the toolchains yourself using rustup and opam, in the current iteration.