package tezos-protocol-environment
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b
doc/tezos-protocol-environment.structs/Tezos_protocol_environment_structs/V8/Plonk/index.html
Module V8.Plonk
Source
include module type of struct include Plonk.Main_protocol end
include sig ... end
Raised by the prover when the provided inputs are not a satisfying assignment of the circuit.
Raised by the prover when the provided inputs are not a satisfying assignment of the circuit when using Plookup.
Prime field used by aPlonk
Before proving and verifying, circuits go through a pre-processing step called setup
. The setup
takes as input a circuit_map
, which associates an identifier to a circuit and the number of statements that can be proved with that circuit. This produces a set of public_parameters
which are bound to the circuits and can be reused.
Set of public_parameters
needed by the prover. It's size is linear in the size of the circuits.
Set of public_parameters
needed by the verifier. It's size is constant w.r.t. the size of the circuits.
Succinct proof for a collection of statements.
Prover inputs for one statement. Witness is the assignment of all wires of the circuit.
Map where each circuit identifier is bound to a list of circuit_prover_input
for a list of statements.
Conversion from prover_inputs
to verifier_inputs
.
val setup :
zero_knowledge:bool ->
circuit_map ->
srs:(Bls12_381_polynomial.Srs.t * Bls12_381_polynomial.Srs.t) ->
prover_public_parameters * verifier_public_parameters
setup ~zero_knowledge circuit_map ~srs
pre-processes the circuit_map
producing the public parameters. The SRSs of ZCash and Filecoin can be loaded from file using the Bls12_381_polynomial
library. Activating zero_knowledge
adds an overhead in proving time.
val update_prover_public_parameters :
Bytes.t ->
prover_public_parameters ->
prover_public_parameters
Enrich the prover_public_parameters
with extra application data to prevent replay attacks. The same data must be used for updating the prover and verifier public parameters.
val update_verifier_public_parameters :
Bytes.t ->
verifier_public_parameters ->
verifier_public_parameters
Enrich the verifier_public_parameters
with extra application data to prevent replay attacks. The same data must be used for updating the prover and verifier public parameters.
prove public_parameters ~inputs
produces a proof for the collection of statements implied by inputs
and the circuits used for generating public_parameters
.
val public_parameters_encoding :
Plonk.Main_protocol.verifier_public_parameters Data_encoding.t
val verify :
verifier_public_parameters ->
(string * circuit_verifier_input) list ->
proof ->
bool