package tezos-plonk

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Scalar : sig ... end
module Gates : sig ... end
val module_list : (module Gates.Gate_base_sig) list
val to_ids : (module Gates.Gate_base_sig) -> string * int
val module_map : (module Gates.Gate_base_sig) SMap.t
val q_list : ?q_table:'a -> qc:'a -> ql:'a -> qr:'a -> qo:'a -> qlg:'a -> qrg:'a -> qog:'a -> qm:'a -> qx5:'a -> qecc_ws_add:'a -> qecc_ed_add:'a -> q_plookup:'a -> unit -> (string * 'a) list
val gates_equal : Scalar.t array SMap.t -> Scalar.t array SMap.t -> bool
type selector_tag =
  1. | Linear
  2. | ThisConstr
  3. | NextConstr
  4. | WireA
  5. | WireB
  6. | WireC
val all_selectors : (string * selector_tag list) list
val selectors_with_tags : selector_tag list -> string list
val this_constr_selectors : string list
val next_constr_selectors : string list
val this_constr_linear_selectors : string list
val next_constr_linear_selectors : string list
val gates_to_string : Scalar.t list SMap.t -> string
module Table : sig ... end
val table_or : Table.t
module Tables : sig ... end
val table_registry : Table.t Tables.t
module Circuit : sig ... end
include module type of struct include Circuit end
type t = private Circuit.t = {
  1. wires : int array SMap.t;
  2. gates : Scalar.t array SMap.t;
  3. tables : Scalar.t array list list;
  4. public_input_size : int;
  5. circuit_size : int;
  6. nb_wires : int;
  7. table_size : int;
  8. nb_lookups : int;
  9. ultra : bool;
}
val make_wires : a:int list -> b:int list -> c:int list -> ?d:int list -> ?e:int list -> ?f:int list -> ?g:int list -> ?h:int list -> unit -> int list SMap.t
val make_gates : ?qc:Scalar.t list -> ?ql:Scalar.t list -> ?qr:Scalar.t list -> ?qo:Scalar.t list -> ?qlg:Scalar.t list -> ?qrg:Scalar.t list -> ?qog:Scalar.t list -> ?qm:Scalar.t list -> ?qx5:Scalar.t list -> ?qecc_ws_add:Scalar.t list -> ?qecc_ed_add:Scalar.t list -> ?q_plookup:Scalar.t list -> ?q_table:Scalar.t list -> unit -> Scalar.t list SMap.t
val make : wires:int list SMap.t -> gates:Scalar.t list SMap.t -> ?tables:Scalar.t array list list -> public_input_size:int -> unit -> t
val get_nb_of_constraints : t -> int
type raw_constraint = Circuit.raw_constraint = {
  1. a : int;
  2. b : int;
  3. c : int;
  4. sels : (string * Scalar.t) list;
  5. label : string;
}
val new_constraint : a:int -> b:int -> c:int -> ?qc:Scalar.t -> ?ql:Scalar.t -> ?qr:Scalar.t -> ?qo:Scalar.t -> ?qlg:Scalar.t -> ?qrg:Scalar.t -> ?qog:Scalar.t -> ?qm:Scalar.t -> ?qx5:Scalar.t -> ?qecc_ws_add:Scalar.t -> ?qecc_ed_add:Scalar.t -> ?q_plookup:Scalar.t -> ?q_table:Scalar.t -> string -> raw_constraint
type gate = raw_constraint Stdlib.Array.t
type cs = gate list
val sat : cs -> Table.t list -> Scalar.t array -> bool
val get_sel : (string * Scalar.t) list -> string -> Scalar.t
val to_string : cs -> string
val to_plonk : public_input_size:int -> ?tables:Table.t list -> cs -> t
val raw_constraint_equal : raw_constraint -> raw_constraint -> bool
val cs_encoding : cs Data_encoding.encoding
val cs_pub_size_encoding : (cs * int) Data_encoding.encoding
val scalar_encoding : Scalar.t Data_encoding.encoding
val is_linear_raw_constr : raw_constraint -> bool
val wires_of_constr_i : gate -> int -> int list

It returns the value of the 3 wires (a, b, c) of the i-th raw constraint in a gate. The value is set to -1 for wires not used by any selector.

val gate_wires : gate -> int list
val linear_terms : raw_constraint -> (Scalar.t * int) list
val mk_linear_constr : (int list * (string * Scalar.t) list) -> raw_constraint
OCaml

Innovation. Community. Security.