package octez-libs

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

Module Cryptobox.Internal_for_testsSource

Sourceval init_prover_dal : unit -> unit

The initialisation parameters can be too large for testing purposes. This function creates an unsafe initialisation parameters using default parameters designed to handle test cases.

Sourceval init_verifier_dal : unit -> unit

This function creates an unsafe initialisation parameters for the verifier using default parameters designed to handle test cases.

Sourceval init_verifier_dal_default : unit -> unit

This function loads in memory the default verifier SRS. The difference with init_verifier_dal is that the latter loads a SRS that should be only used for tests.

Sourceval make_dummy_shards : t -> state:Random.State.t -> shard Seq.t

Returns a randomized valid sequence of shards using the random state state for the given parameters.

Sourceval polynomials_equal : polynomial -> polynomial -> bool

polynomials_equal p1 p2 returns true if and only if p1 and p2 represent the same polynomial.

Sourceval page_proof_equal : page_proof -> page_proof -> bool

page_proof_equal proof1 proof2 returns true if and only if proof1 and proof2 represent the same proof.

Sourceval alter_page_proof : page_proof -> page_proof

alter_page_proof page_proof returns a different page proof than the input.

Sourceval alter_shard_proof : shard_proof -> shard_proof

alter_shard_proof shard_proof returns a different shard proof than the input.

Sourceval alter_commitment_proof : commitment_proof -> commitment_proof

alter_commitment_proof commitment_proof returns a different commitment proof than the input.

Sourceval minimum_number_of_shards_to_reconstruct_slot : t -> int

minimum_number_of_shards_to_reconstruct_slot t returns the minimum number of shards to reconstruct a slot using polynomial_from_shards.

Sourceval dummy_commitment : state:Random.State.t -> unit -> commitment
Sourceval dummy_page_proof : state:Random.State.t -> unit -> page_proof
Sourceval dummy_shard_proof : state:Random.State.t -> unit -> shard_proof
Sourceval make_dummy_shard : state:Random.State.t -> index:int -> length:int -> shard
Sourceval number_of_pages : t -> int
Sourceval shard_length : t -> int
Sourceval dummy_polynomial : state:Random.State.t -> degree:int -> polynomial
Sourceval srs_size_g1 : t -> int
Sourceval select_fft_domain : int -> int * int * int

select_fft_domain domain_size selects a suitable domain for the FFT.

The domain size domain_size is expected to be strictly positive. Return (size, power_of_two, remainder) such that: * If domain_size > 1, then size is the smallest integer greater or equal to domain_size and is of the form 2^a * 3^b * 11^c * 19^d, where:

a ∈ ⟦0, 32⟧, b ∈ {0, 1}, c ∈ {0, 1}, d ∈ {0, 1}

* If domain_size = 1, then size = 2. * size = power_of_two * remainder, power_of_two is a power of two, and remainder is not divisible by 2.

Sourceval encoded_share_size : t -> int
Sourceval ensure_validity : parameters -> bool

ensure_validity parameters returns true if the parameters are valid. See implementation file for details.

Sourceval ensure_validity_without_srs : parameters -> (unit, [> `Fail of string ]) result

Same as ensure_validity parameters, except that it returns an error if the parameters aren't valid and doesn't check the SRS.

Sourceval slot_as_polynomial_length : slot_size:int -> page_size:int -> int
OCaml

Innovation. Community. Security.