package octez-proto-libs

  1. Overview
  2. Docs
Octez protocol libraries

Install

Dune Dependency

Authors

Maintainers

Sources

octez-19.1.tar.gz
sha256=55ea1fb8bb3273a7fc270ca8f650d45c56449665619482aad9bc12f3ea736b7e
sha512=fec850fc2d17d7490bbabd5147d62aad13b3aaed8774270f8a38ab419670ed03e0fd30cf8642a97984eca5c2446726fe590ad99c015f7ec50919dc7652f25053

doc/octez-proto-libs.protocol-environment/Tezos_protocol_environment/V7/Make/Dal/index.html

Module Make.DalSource

Sourcetype t

A precomputed set of constants

Sourcetype parameters = Tezos_crypto_dal.Cryptobox.Verifier.parameters = {
  1. redundancy_factor : int;
  2. page_size : int;
  3. slot_size : int;
  4. number_of_shards : int;
}

Parameters to build a value of type t

Sourceval make : parameters -> (t, [> `Fail of string ]) Pervasives.result

make precomputes the set of values needed by cryptographic primitives defined in this module and store them in a value of type t

Commitment to a polynomial.

Sourcemodule Commitment : sig ... end
Sourcetype commitment_proof

A proof that the polynomial associated to some commitment is bounded by a constant.

Sourceval commitment_proof_encoding : commitment_proof Data_encoding.t

An encoding for the proof of a commitment.

Sourceval verify_commitment : t -> commitment -> commitment_proof -> bool

verify_commitment srs commitment proof checks whether commitment is a valid commitment. In particular, it check that the size of the data committed via commitment do not exceed C.slot_size. The verification time is constant.

Sourcetype page = {
  1. index : int;
  2. content : bytes;
}

The original slot can be split into a list of pages of size page_size. A page is consequently encoded as a pair of an index and the content of this page.

Sourcetype page_proof

A proof that the evaluation of points of a polynomial is part of a commitment.

Sourceval page_proof_encoding : page_proof Data_encoding.t

An encoding for the proof of a page.

Sourceval verify_page : t -> commitment -> page -> page_proof -> (bool, [> `Degree_exceeds_srs_length of string | `Segment_index_out_of_range ]) Result.t

verify_page t commitment page page_proof returns Ok true if the proof certifies that the slot_page is indeed included in the slot committed with commitment commitment. Returns Ok false otherwise.

Fails if the index of the page is out of range.

OCaml

Innovation. Community. Security.