package tezos-protocol-alpha

  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-alpha.raw/Tezos_raw_protocol_alpha/Seed_storage/index.html

Module Tezos_raw_protocol_alpha.Seed_storageSource

This modules handles the storage of random nonce seeds.

This module is responsible for maintaining the table Storage.Seed.For_cycle.

Sourcetype seed_computation_status =
  1. | Nonce_revelation_stage
  2. | Vdf_revelation_stage of {
    1. seed_discriminant : Seed_repr.seed;
    2. seed_challenge : Seed_repr.seed;
    }
  3. | Computation_finished
Sourcetype Tezos_protocol_environment_alpha.Error_monad.error +=
  1. | Unknown of {
    1. oldest : Cycle_repr.t;
    2. cycle : Cycle_repr.t;
    3. latest : Cycle_repr.t;
    }
  2. | Already_accepted
  3. | Unverified_vdf
  4. | Too_early_revelation

Generates the first preserved_cycles+2 seeds for which there are no nonces.

Verifies if a VDF (result, proof) is valid.

  • returns

    Error Too_early_revelation if the nonce revelation threshold is greater than the current level cycle position.

  • returns

    Error Already_accepted if a VDF seed has already been recorded.

Returns the seed associated with the given cycle. Returns a generic storage error when the seed is not available.

Returns the seed associated with the given cycle. Returns the Unknown error when the seed is not available.

Computes RANDAO output for cycle #(current_cycle + preserved + 1)

Must be run at the end of the cycle, resets the VDF state and returns unrevealed nonces to know which party has to forfeit its endorsing rewards for that cycle.

Return the random seed computation status, that is whether the VDF computation period has started, and if so the information needed, or if it has finished for the current cycle.

Removes the seed associated with the given cycle from the storage. It assumes the seed exists. If it does not it returns a generic storage error.

OCaml

Innovation. Community. Security.