package tezos-protocol-015-PtLimaPt

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

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-16.0.tar.gz
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b

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.