Skip to content

Commit

Permalink
updated Readme
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Muraca <mmuraca247@gmail.com>
  • Loading branch information
muraca committed Mar 11, 2024
1 parent d71c961 commit 3ab8a55
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# Halo2 Playground

This crate contains the implementation of a circuit that builds a
Zero Knowledge Proof of the fact that the prover knows a solution
to a given sudoku problem.
This crate contains the implementation of two circuits that build a Zero Knowledge Proof:

1. Given a public witness `b` that is a Sudoku board, the circuit is a proof that the prover knows a solution `s` for the Sudoku puzzle.
2. Given a public witness `w` and a public constant `k`, the prover knows a secret witness such that `w = n * (n + 1) * (n + 2) * ... * (n + k)`. When `n = 1`, the circuit is a proof that `w` is a factorial number.

We wrote this crate to get a first-hand feeling of the user friendlyness
of the [Halo2](https://github.com/zcash/halo2) proving system.

## Running the tests

To run the tests, run the command `cargo test --release`.
The command `cargo test` works too, but in that case you may want
to give your computer a couple of minutes to compute the test results.
Expand All @@ -17,12 +19,15 @@ The single circuits can be tested by matching the test name with `sudoku`, `perm
The tests that match the `mock` pattern are written using the `MockProver` struct, while the others use the custom real-world provers.

### Running via Docker

To run the tests via Docker, the simplest way is to use the image published by CI:

```bash
docker run --rm --network host ghcr.io/libecciolabs/halo2-playground:main
```

You can always build the docker image yourself:

```bash
git clone https://github.com/LibeccioLabs/Halo2-Playground/
docker build -t halo2-playground ./Halo2-Playground/
Expand All @@ -31,6 +36,7 @@ docker run --rm halo2-playground

Since the Docker image will run `cargo test --release`, you can append any other flag, including a match for the tests you want to run.
For example, to run only the tests in the `sudoku` module, you can run:

```bash
docker run --rm halo2-playground sudoku
```

0 comments on commit 3ab8a55

Please sign in to comment.