package octez-libs

  1. Overview
  2. Docs

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

val fake_srs1 : Kzg.Bls.Srs_g1.t Lazy.t

Generates an unsafe SRS₁ of size 2¹⁶ from a known seed

val fake_srs2 : Kzg.Bls.Srs_g2.t Lazy.t

Generates an unsafe SRS₂ of size 2¹⁶ from a known seed

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

Same as fake_srs but the returned SRS₁ is of size 2⁸, which is enough to suit the verifier needs in our tests

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

Returns the fake SRS₂ points needed by the verifier

val print_verifier_srs_from_file : ?max_srs_size:int -> srs_g1_path:string -> srs_g2_path:string -> unit -> (unit, [> `End_of_file of string | `Invalid_point of int ]) result Lwt.t

Prints the minimal srs needed for mainnet params, in an OCaml-readable format. Run with let _ = Lwt_main.run @@ Srs.Internal_for_tests.( print_verifier_srs_from_file ~zcash_g1_path ~zcash_g2_path) () This function can be used to add points in srs_g1 & srs_g2 in Zcash_srs

OCaml

Innovation. Community. Security.