package tezos-protocol-alpha

  1. Overview
  2. Docs
Tezos/Protocol: economic-protocol definition

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-16.1.tar.gz
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f

doc/tezos-protocol-alpha.raw/Tezos_raw_protocol_alpha/Tx_rollup_commitment_repr/Merkle/index.html

Module Tx_rollup_commitment_repr.MerkleSource

Sourcetype t

The type of a Merkle list

The type of a hash

The type of an element

Sourcetype path

A path, together with an element's position, is the proof of inclusion of an element in the Merkle list.

Sourceval dummy_path : path

A dummy path that can be used as a placeholder when no path is actually required.

Sourceval nil : t

The empty Merkle list

Sourceval empty : h

The empty hash

Sourceval root : t -> h

root t returns the root hash of a Merkle list.

Sourceval snoc : t -> elt -> t

snoc t el adds element el to a Merkle list t and returns the new list.

Sourceval snoc_tr : t -> elt -> t

Tail recursive variant of snoc.

Sourceval compute : elt list -> h

compute elems returns the root hash of the Merkle list constructed with elems.

Encoding of a path.

Sourceval bounded_path_encoding : ?max_length:int -> unit -> path Tezos_protocol_environment_alpha.Data_encoding.t

Encoding of a path, with optional bound max_length.

compute_path t pos computes the path of the element in position pos.

Can fail with Merkle_list_invalid_position if pos is negative or if it is greater than the number of elements in the list.

check_path path pos elt expected_root checks that an elt with path path at position pos has the expected_root.

Can fail with Merkle_list_invalid_position if pos is negative or if it is greater than the number of elements in the list.

Sourceval path_depth : path -> int

path_depth path returns the depth of the tree path is related to.

OCaml

Innovation. Community. Security.