32 lines
930 B
Markdown
Raw Normal View History

# Gnark Plonky2 Verifier
2022-10-07 16:59:02 -07:00
This is an implementation of a [Plonky2](https://github.com/mir-protocol/plonky2) verifier in Gnark (supports Groth16 and PLONK).
2023-03-28 11:12:07 -07:00
Besides the verifier, there are some Gnark implementation of circuits in this repo that may be useful for other projects:
- [Goldilocks](https://github.com/succinctlabs/gnark-plonky2-verifier/blob/main/field/field.go)
- [Poseidon](https://github.com/succinctlabs/gnark-plonky2-verifier/blob/main/poseidon/poseidon.go)
- [FRI](https://github.com/succinctlabs/gnark-plonky2-verifier/blob/main/plonky2_verifier/fri.go)
## Requirements
- [Go (1.20.1+)](https://go.dev/doc/install)
## Benchmark
2023-03-28 10:59:36 -07:00
To run the benchmark,
2022-10-03 19:17:42 +00:00
```
2023-03-28 10:59:36 -07:00
go run benchmark.go
2023-03-28 11:12:07 -07:00
```
## Profiling
2023-03-28 11:12:07 -07:00
First run the benchmark with profiling turned on
2023-03-28 11:12:07 -07:00
```
go run benchmark.go -profile
2023-03-28 11:12:07 -07:00
```
Then use the following command to generate a visualization of the pprof
```
go tool pprof --png gnark.pprof > verifier.png
```