Make.SingletonSourceinclude module type of struct include Main endRaised 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.
module Input_commitment = Main.Input_commitmenttype scalar = Plonk.Bls.Scalar.tval scalar_t : scalar Repr.tval scalar_encoding : scalar Data_encoding.ttype circuit_map = (Plonk.Circuit.t * int) Plonk.SMap.tBefore 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.
type prover_public_parameters = Main.prover_public_parametersSet of public_parameters needed by the prover. Its size is linear in the size of the circuits.
val prover_public_parameters_t : prover_public_parameters Repr.ttype verifier_public_parameters = Main.verifier_public_parametersSet of public_parameters needed by the verifier. Its size is constant w.r.t. the size of the circuits.
val verifier_public_parameters_t : verifier_public_parameters Repr.tval verifier_public_parameters_encoding :
verifier_public_parameters Data_encoding.ttype proof = Main.proofSuccinct proof for a collection of statements.
val proof_t : proof Repr.tval proof_encoding : proof Data_encoding.ttype circuit_prover_input = Main.circuit_prover_input = {witness : scalar array;input_commitments : Input_commitment.t list;}Witness is the whole trace for the circuit, including input_commitment values first, followed by public input values and followed by the rest of the trace. This is the prover input for a single proof.
val circuit_prover_input_t : circuit_prover_input Repr.ttype prover_inputs = circuit_prover_input list Plonk.SMap.tMap where each circuit identifier is bound to a list of circuit_prover_input for a list of statements.
val prover_inputs_t : prover_inputs Repr.ttype public_inputs = Main.public_inputsThe public inputs for one circuit & several statements
val public_inputs_t : public_inputs Repr.ttype verifier_inputs =
(public_inputs * Input_commitment.public list list) Plonk.SMap.tThe verifier inputs, represented as a map where each circuit is binded to the verifier inputs for this circuit.
val verifier_inputs_t : verifier_inputs Repr.tval to_verifier_inputs :
prover_public_parameters ->
prover_inputs ->
verifier_inputsConversion from prover_inputs to verifier_inputs.
val input_commit :
?size:int ->
?shift:int ->
prover_public_parameters ->
scalar array ->
Input_commitment.tinput_commit ~shift pp secret produces a commitment to the secret array and additional prover information. This commitment is designed to be easily involved in a PlonK proof. In particular, the values of secret will be added to the arithmetic identity in such a way that secret.(i) participates in constraint number shift + i, where equality will be asserted with respect to a PlonK variable in the same constraint. This allows us to "load" the value of secret.(i) into the variable, which may be reused across the circuit. The optional argument shift has a default value of 0. The commitment is relative to a certain domain size n, included in pp, the secret will remain information-theoretically hidden as long as the commitment is involved in at most n - |secret| different proofs. If the optionnal argument size is given, the secret will be padded with zeros to have the length size (note that an error will be risen if size is smaller than the secret length).
val update_prover_public_parameters :
Bytes.t ->
prover_public_parameters ->
prover_public_parametersEnrich 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_parametersEnrich 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.
module Internal_for_tests = Main.Internal_for_testsval setup :
zero_knowledge:bool ->
Plonk.Circuit.t ->
srs:(Octez_bls12_381_polynomial.Srs.t * Octez_bls12_381_polynomial.Srs.t) ->
Main.prover_public_parameters * Main.verifier_public_parametersval verify :
Main.verifier_public_parameters ->
inputs:(Main.public_inputs * Main.Input_commitment.public list list) ->
Main.proof ->
bool