package tezos-plonk

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Parameters

Signature

module MP : sig ... end
include module type of MP with module PP := PP
module Scalar : sig ... end
module Domain : sig ... end
module Poly : sig ... end
module Evaluations : sig ... end
module Perm : sig ... end
module Plook : sig ... end
module Gates : sig ... end
module Fr_generation : sig ... end
module SMap = Plonk.SMap
exception Entry_not_in_table of string
exception Rest_not_null of string
type scalar = Scalar.t
val scalar_t : Scalar.t Repr.t
type circuit_map = (Plonk.Circuit.t * int) SMap.t
type proof = {
  1. perm_and_plook : PP.PC.Commitment.t;
  2. wires_cm : PP.PC.Commitment.t;
  3. pp_proof : PP.proof;
}
val proof_t : proof Repr.t
type circuit_prover_input = {
  1. public : scalar array;
  2. witness : scalar array;
}
val circuit_prover_input_t : circuit_prover_input Repr.t
type prover_inputs = circuit_prover_input list SMap.t
val prover_inputs_t : circuit_prover_input list SMap.t Repr.ty
type circuit_verifier_input = scalar array list
val circuit_verifier_input_t : Scalar.t array list Repr.t
type verifier_inputs = circuit_verifier_input SMap.t
val verifier_inputs_t : Scalar.t array list SMap.t Repr.ty
val to_verifier_inputs : circuit_prover_input list SMap.t -> scalar array list SMap.t
module IntSet : sig ... end
module IntMap : sig ... end
module Partition : sig ... end
val check_circuit_name : 'a SMap.t -> unit
val get_wires_names : int -> string array
val hash_public_inputs : bytes -> Scalar.t array list SMap.t -> bytes
val eval_points : bool -> bool -> PP.eval_point list list
val get_alpha : 'a option -> 'a
module Prover : sig ... end
module Verifier : sig ... end
type verifier_public_parameters = {
  1. common_pp : Verifier.verifier_common_pp;
  2. circuits_map : Verifier.verifier_circuit_pp SMap.t;
  3. transcript : PP.transcript;
}
val verifier_public_parameters_t : verifier_public_parameters Repr.t
val degree_evaluations : nb_wires:int -> gates:'a Plonk.SMap.t -> ultra:bool -> int
module Preprocess : sig ... end
val update_transcript : bytes -> bytes -> bytes
val update_prover_public_parameters : bytes -> Prover.prover_public_parameters -> Prover.prover_public_parameters
val update_verifier_public_parameters : bytes -> verifier_public_parameters -> verifier_public_parameters
val verify : verifier_public_parameters -> inputs:Gates.PP.PC.Scalar.t array list SMap.t -> proof -> bool
val scalar_encoding : Scalar.t Data_encoding.encoding
val data_encoding_of_repr : 'a Repr.t -> 'a Data_encoding.encoding
val proof_encoding : proof Data_encoding.encoding
val verifier_public_parameters_encoding : verifier_public_parameters Data_encoding.encoding
module Internal_for_tests : sig ... end
module PP = PP
module Commitment : sig ... end
type commit_to_wires_reply = Commitment.t
val commit_to_wires_reply_t : Commitment.t Repr.t
type worker_inputs = {
  1. inputs : circuit_prover_input list;
  2. shift : int * int;
}
val worker_inputs_t : worker_inputs Repr.t
include module type of struct include Prover end
type prover_common_pp = {
  1. n : int;
  2. domain : Domain.t;
  3. pp_public_parameters : PP.prover_public_parameters;
  4. g_map : PP.PC.Polynomial.Polynomial.t SMap.t;
  5. g_prover_aux : PP.PC.Commitment.prover_aux;
  6. evaluations : Evaluations.t SMap.t;
  7. zk : bool;
  8. nb_of_t_chunks : int;
}
val prover_common_pp_t : prover_common_pp Repr.t
val get_generator : prover_common_pp -> Domain.scalar
type prover_circuit_pp = {
  1. circuit_size : int;
  2. nb_wires : int;
  3. gates : Scalar.t array SMap.t;
  4. tables : Scalar.t array list;
  5. wires : int array SMap.t;
  6. permutation : int array;
  7. evaluations : Evaluations.t SMap.t;
  8. alpha : Scalar.t option;
  9. ultra : bool;
}
val prover_circuit_pp_t : prover_circuit_pp Repr.t
val enforce_wire_values : int array SMap.t -> 'a array -> 'a array SMap.t
val compute_wire_polynomials : zero_knowledge:bool -> gates:'a Plonk.SMap.t -> int -> Evaluations.domain -> PP.PC.Scalar.t array SMap.t -> Poly.t SMap.t * Poly.t SMap.t option
type wires_info = {
  1. wires : Scalar.t array SMap.t;
  2. f_wires_map : Evaluations.polynomial SMap.t;
  3. f_blinds_map : Evaluations.polynomial SMap.t option;
  4. wires_values : Scalar.t array;
  5. wires_indices : int array SMap.t;
}
val build_wires_map : zero_knowledge:bool -> prover_common_pp -> prover_circuit_pp SMap.t -> SMap.key -> circuit_prover_input list -> Poly.t SMap.t list * wires_info list
val build_all_f_wires_map : zero_knowledge:bool -> prover_common_pp -> prover_circuit_pp SMap.t -> circuit_prover_input list SMap.t -> Poly.t SMap.t list SMap.t * wires_info list SMap.t
val build_aggregated_wires_map : zero_knowledge:bool -> Poly.scalar -> prover_common_pp -> prover_circuit_pp SMap.t -> wires_info list SMap.t -> SMap.key -> Evaluations.t -> Poly.t SMap.t
val build_all_aggregated_wires_map : zero_knowledge:bool -> Poly.scalar -> prover_common_pp -> prover_circuit_pp SMap.t -> Poly.t SMap.t list SMap.t -> wires_info list SMap.t -> Evaluations.t SMap.t -> Poly.t SMap.t SMap.t
val build_batched_witness : PP.PC.Scalar.t -> wires_info list -> Evaluations.t
val build_f_map_evaluation_perm : zero_knowledge:bool -> prover_common_pp -> PP.PC.Scalar.t -> Perm.PP.PC.Scalar.t -> Perm.PP.PC.Scalar.t -> prover_circuit_pp SMap.t -> SMap.key -> wires_info list -> Poly.t SMap.t * Evaluations.t
val build_all_f_map_evaluation_perm : zero_knowledge:bool -> prover_common_pp -> PP.PC.Scalar.t -> Perm.PP.PC.Scalar.t -> Perm.PP.PC.Scalar.t -> prover_circuit_pp SMap.t -> wires_info list SMap.t -> (Poly.t SMap.t * Evaluations.t) SMap.t
val build_f_map_evaluation_plook : zero_knowledge:bool -> prover_common_pp -> Plook.PP.PC.Scalar.t -> Plook.PP.PC.Scalar.t -> prover_circuit_pp SMap.t -> SMap.key -> wires_info list -> Poly.t SMap.t list
val build_all_f_map_evaluation_plook : zero_knowledge:bool -> prover_common_pp -> Plook.PP.PC.Scalar.t -> Plook.PP.PC.Scalar.t -> prover_circuit_pp SMap.t -> wires_info list SMap.t -> Poly.t SMap.t list SMap.t
val gather_maps : ?shifts_map:(int * int) SMap.t -> 'a Stdlib__Map.Make(String).t Plonk.List.t SMap.t -> 'a SMap.t
val gather_maps_perm : 'a Stdlib__Map.Make(String).t SMap.t -> 'a SMap.t
val build_all_keys : string list -> ('a * int) SMap.t -> SMap.key list
val commit_to_wires : ?shifts_map:(int * int) SMap.t -> zero_knowledge:bool -> common_pp:prover_common_pp -> circuits_map:prover_circuit_pp SMap.t -> inputs_map:circuit_prover_input list SMap.t -> unit -> wires_info list SMap.t * PP.PC.Commitment.t * PP.PC.Commitment.prover_aux * Poly.t SMap.t list SMap.t * Poly.t SMap.t
val build_identities : ?shifts_map:(int * int) SMap.t -> (prover_common_pp * prover_circuit_pp SMap.t) -> f_wires_map_list_map: Plook.PP.PC.Polynomial.Polynomial.t Plonk.SMap.t Plonk.List.t SMap.t -> f_plook_map_list_map: Plook.PP.PC.Polynomial.Polynomial.t Plonk.SMap.t Plonk.List.t SMap.t -> inputs_map:circuit_prover_input list SMap.t -> beta_plookup:Plook.PP.PC.Scalar.t -> gamma_plookup:Plook.PP.PC.Scalar.t -> PP.prover_identities
val prove_circuits : pp_prove: (PP.prover_public_parameters -> bytes -> n:int -> generator:Domain.scalar -> secrets: (PP.PC.Polynomial.Polynomial.t SMap.t * PP.PC.Commitment.prover_aux) list -> eval_points:PP.eval_point list list -> evaluations:Evaluations.t SMap.t -> identities:PP.prover_identities -> nb_of_t_chunks:int -> 'a * 'b) -> ((prover_common_pp * prover_circuit_pp SMap.t) * bytes) -> inputs_map:circuit_prover_input list SMap.t -> 'a * (PP.PC.Commitment.t * PP.PC.Commitment.t * Fr_generation.scalar * Fr_generation.scalar * Fr_generation.scalar)
type prover_public_parameters = {
  1. common_pp : prover_common_pp;
  2. circuits_map : prover_circuit_pp SMap.t;
  3. transcript : PP.transcript;
}
val prover_public_parameters_t : prover_public_parameters Repr.t
val split_inputs_map : nb_workers:int -> circuit_prover_input list SMap.t -> worker_inputs SMap.t list
type commit_to_plook_reply = {
  1. batched_witness_map : Evaluations.t SMap.t;
  2. cmt_plookup : Commitment.t;
  3. f_plook_map : PP.PC.Polynomial.Polynomial.t SMap.t;
  4. plook_prover_aux : Commitment.prover_aux;
}
val commit_to_plook_reply_t : commit_to_plook_reply Repr.t
type commit_to_plook_remember = {
  1. f_wires_map_list_map : PP.Evaluations.polynomial SMap.t list SMap.t;
  2. f_plook_map_list_map : PP.Evaluations.polynomial SMap.t list SMap.t;
  3. beta_plookup : scalar;
  4. gamma_plookup : scalar;
}
type commit_to_wires_remember = {
  1. f_wires_map : PP.Evaluations.polynomial SMap.t;
  2. wires_map : wires_info list SMap.t;
  3. inputs_map : circuit_prover_input list SMap.t;
  4. shifts_map : (int * int) SMap.t;
  5. srs : PP.prover_public_parameters;
  6. f_wires_map_list_map : PP.Evaluations.polynomial SMap.t list SMap.t;
  7. wires_prover_aux : PP.PC.Commitment.prover_aux;
}
val worker_commit_to_wires : ?zero_knowledge:bool -> (prover_common_pp * prover_circuit_pp SMap.t) -> worker_inputs SMap.t -> PP.PC.Commitment.t * commit_to_wires_remember
val worker_build_all_batched_witness : PP.PC.Scalar.t -> wires_info list SMap.t -> Evaluations.t SMap.t
val batch_evaluated_ids : alpha:Scalar.t -> Evaluations.t SMap.t -> string list -> Evaluations.t
val main_build_aggregated_wires_map : zero_knowledge:bool -> prover_common_pp -> prover_circuit_pp SMap.t -> SMap.key -> Evaluations.t -> Poly.t SMap.t
val worker_build_identities : shifts_map:(int * int) SMap.t -> (prover_common_pp * prover_circuit_pp SMap.t) -> f_wires_map_list_map: Plook.PP.PC.Polynomial.Polynomial.t Plonk.SMap.t Plonk.List.t SMap.t -> f_plook_map_list_map: Plook.PP.PC.Polynomial.Polynomial.t Plonk.SMap.t Plonk.List.t SMap.t -> inputs_map:circuit_prover_input list SMap.t -> beta_plookup:Plook.PP.PC.Scalar.t -> gamma_plookup:Plook.PP.PC.Scalar.t -> PP.prover_identities
val kzg_eval_at_x : Bytes.t -> (PP.PC.secret * 'a) list -> PP.PC.Scalar.t -> bool -> PP.PC.answer list
OCaml

Innovation. Community. Security.