Skip to content

distributed-lab/plonky2-verifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plonky2 Verifier

License: GPL v3 Rust CI🌌 Docs 🌌

A verifier for plonky2 proofs.

This rust crate provides functionality to deserialize and verify proof, public inputs and verification key.

plonky2-converter

Plonky2 has a certain number of generics for its constraint system, such as used field, hasher etc. Since we are limited by the nature of passing them in zkVerify, we use a custom format of Vk.

For that reason, this crate also provides a binary to convert verification keys into acceptable by zkVerify format.

Install:

cargo install --features converter --path .

Usage:

plonky2-converter vk --help
Serialize VerifierCircuitData into zkVerify format

Usage: 

Arguments:
  <INPUT>

  [OUTPUT]
          
Options:
  -i, --in-fmt <IN_FMT>
          [default: bytes]

          Possible values:
          - bytes: Raw binary bytes
          - hex:   Hex-encoded string (with optional "0x" prefix)

  -o, --out-fmt <OUT_FMT>
          [default: json]

          Possible values:
          - json:  JSON format (pretty-printed)
          - bytes: Raw binary bytes
          - hex:   Hex-encoded string

  -c, --config <CONFIG>
          [default: poseidon]

          Possible values:
          - keccak:   Preset Keccak over Goldilocks config available in `plonky2`
          - poseidon: Preset Poseidon over Goldilocks config available in `plonky2`

  -h, --help
          Print help (see a summary with '-h')

License

This code is released under the GPL 3.0 license.