package octez-proto-libs

  1. Overview
  2. Docs
Octez protocol libraries

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-octez-v20.1.tag.bz2
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65

doc/octez-proto-libs.protocol-environment/Tezos_protocol_environment/V8/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 parameters_encoding : parameters Data_encoding.t

An encoding for values of type parameters.

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

Sourceval parameters : t -> parameters

parameters t returns the parameters given when t was initialised with the function make

Commitment to a polynomial.

Sourcemodule Commitment : sig ... end

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

Sourcemodule Commitment_proof : sig ... end
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 = bytes

The original slot can be split into a list of pages of fixed size. This size is given by the parameter page_size given to the function make.

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 pages_per_slot : parameters -> int

pages_per_slot t returns the number of expected pages per slot.

Sourceval verify_page : t -> commitment -> page_index:int -> page -> page_proof -> (bool, [> `Segment_index_out_of_range | `Page_length_mismatch ]) Result.t

verify_page t srs 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 or if the page is not of the expected length page_size given for the initialisation of t.

OCaml

Innovation. Community. Security.