package octez-libs

  1. Overview
  2. Docs
A package that contains multiple base libraries used by the Octez suite

Install

Dune Dependency

Authors

Maintainers

Sources

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

doc/octez-libs.crypto-dal/Tezos_crypto_dal/Parameters_check/index.html

Module Tezos_crypto_dal.Parameters_checkSource

Sourceval scalar_bytes_amount : int

Number of bytes fitting in a Scalar.t. Since scalars are integer modulo r~2^255, we restrict ourselves to 248-bit integers (31 bytes).

Sourceval page_length : page_size:int -> int

The page size is a power of two and thus not a multiple of scalar_bytes_amount, hence the + 1 to account for the remainder of the division.

Sourceval domain_length : size:int -> int

for a given size (in bytes), return the length of the corresponding domain

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

slot_as_polynomial_length ~slot_size ~page_size returns the length of the polynomial of maximal degree representing a slot of size slot_size with slot_size / page_size pages (page_size must divides slot_size). The returned length thus depends on the number of pages.

Sourceval compute_lengths : redundancy_factor:int -> slot_size:int -> page_size:int -> number_of_shards:int -> int * int * int

Returns max_polynomial_length, erasure_encoded_polynomial_length & shard_length for the given parameters

Sourceval ensure_validity_without_srs : slot_size:int -> page_size:int -> redundancy_factor:int -> number_of_shards:int -> (unit, [> `Fail of string ]) result

Fails if and only if the given parameters are not suitable for the DAL.

OCaml

Innovation. Community. Security.