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/Nonce_storage/index.html

Module Tezos_raw_protocol_alpha.Nonce_storageSource

This module provides types and functions to manipulate nonces.

A nonce is a byte sequence of fixed length, which is supposed to be random and used only once, provided by a block producer and used to generate a random seed (see Seed_repr).

Sourcetype nonce = t
Sourcetype Tezos_protocol_environment_alpha.Error_monad.error +=
  1. | Too_late_revelation
  2. | Too_early_revelation
  3. | Already_revealed_nonce
  4. | Inconsistent_nonce
Sourcetype status =
  1. | Unrevealed of unrevealed
  2. | Revealed of Seed_repr.nonce
Sourcetype nonce_presence =
  1. | No_nonce_expected
  2. | Nonce_expected of status

Checks that a nonce revelation operation can be safely applied.

  • returns

    Error Too_early_revelation if the current cycle is the cycle 0 or if the previous cycle is lesser than the cycle of the input level.

  • returns

    Error Too_late_revelation if the previous cycle is greater than the cycle of the input level. This error is also returned if the current level cycle position is greater or equal to the nonce revelation threshold.

  • returns

    Error Already_revealed_nonce if a nonce is already revealed in the context for the input level.

  • returns

    Error Inconsistent_nonce if the hash of the input nonce does not correspond to the nonce recover from the context for the given level.

Sourceval check_hash : nonce -> Nonce_hash.t -> bool
OCaml

Innovation. Community. Security.