Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs to generate GnarkPlonk proofs #242

Draft
wants to merge 15 commits into
base: staging
Choose a base branch
from
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,49 @@ To run the go tests
make test
```

# Verify Proofs

## Gnark Plonk

### Dependencies
This guide assumes that:
- Gnark library is installed. If not, install it using the following command inside your Go module:
```bash
go get github.com/consensys/gnark@latest
```
- gnark project to generate the proofs, instructions[ here](https://docs.gnark.consensys.io/category/how-to)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this guide is the best for generating a proof. Maybe we could add a HackMD
https://hackmd.io/@xr7wfZ30Q3eKDrtinAJaOQ/B1cp2nV4A


- aligned layer repository cloned:

```bash
git clone https://github.com/yetanotherco/aligned_layer.git
```
### How to generate a proof

Open a terminal and navigate to the gnark project directory. Then, run the following command to generate the proof:

```bash
go run circuit.go
```
Make sure that you include serialization of the proof, public input, and verification key in the circuit.go file

### How to get the proof verified by AlignedLayer

After generating the proof, you will have to have three different files:
- proof file
- verification key file
- public input file

Then, you can send the proof to the AlignedLayer network by running the following command
from `batcher/client` folder inside the AlignedLayer repository directory:

```bash
cargo run --release -- \
--proving_system GnarkPlonkBn254 \
--proof <proof_path> \
--public_input <public_input_path> \
--vk <verification_key_path> \
```

## FAQ

Expand Down