package octez-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type srs_verifier = {
  1. shards : Kzg.Bls.G2.t;
  2. pages : Kzg.Bls.G2.t;
  3. commitment : Kzg.Bls.G2.t;
}

SRS points needed by the verifier of the DAL

val get_verifier_srs1 : unit -> Kzg.Bls.Srs_g1.t

Returns ZCash SRS₁ resized for the verifier, according to mainnet parameters

val get_verifier_srs2 : max_polynomial_length:int -> page_length_domain:int -> shard_length:int -> srs_verifier

Return the ZCash SRS₂ points needed by the verifier, according to mainnet parameters

val ensure_srs_validity : is_fake:bool -> mode:[< `Prover | `Verifier ] -> slot_size:int -> page_size:int -> redundancy_factor:int -> number_of_shards:int -> (unit, [> `Fail of string ]) result

Fails if and only if the SRS does not suits the parameters, ie SRS₁ would be too short to commit or SRS₂ does not contain the needed points

exception Failed_to_load_trusted_setup of string
val read_srs : ?len:int -> srs_g1_path:string -> srs_g2_path:string -> unit -> (Kzg.Bls.Srs_g1.t * Kzg.Bls.Srs_g2.t, [> `End_of_file of string | `Invalid_point of int ]) result Lwt.t

Returns SRS₁ of size len (by default, 2²¹) read from the file given by path. May raise Failed_to_load_trusted_setup exception

module Internal_for_tests : sig ... end

This module is used to handle a fake SRS in the DAL. This is more flexible and easier to handle in the CI than loading ZCash SRS

OCaml

Innovation. Community. Security.