package tezos-protocol-015-PtLimaPt

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

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-17.3.tar.gz
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc

doc/tezos-protocol-015-PtLimaPt.raw/Tezos_raw_protocol_015_PtLimaPt/Nonce_storage/index.html

Module Tezos_raw_protocol_015_PtLimaPt.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_015_PtLimaPt.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.