package tezos-protocol-015-PtLimaPt
- Overview
 - No Docs
 
You can search for identifiers within the package.
in-package search v0.2.0
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
    
    
  sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b
    
    
  doc/tezos-protocol-015-PtLimaPt.raw/Tezos_raw_protocol_015_PtLimaPt/Seed_storage/index.html
Module Tezos_raw_protocol_015_PtLimaPt.Seed_storageSource
This modules handles the storage of random nonce seeds.
This module is responsible for maintaining the table Storage.Seed.For_cycle.
type seed_computation_status = | Nonce_revelation_stage| Vdf_revelation_stage of {seed_discriminant : Seed_repr.seed;seed_challenge : Seed_repr.seed;
}| Computation_finished
type Tezos_protocol_environment_015_PtLimaPt.Error_monad.error += | Unknown of {oldest : Cycle_repr.t;cycle : Cycle_repr.t;latest : Cycle_repr.t;
}| Already_accepted| Unverified_vdf| Too_early_revelation
val init : 
  ?initial_seed:State_hash.t ->
  Raw_context.t ->
  Raw_context.t Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
    Tezos_protocol_environment_015_PtLimaPt.Lwt.tGenerates the first preserved_cycles+2 seeds for which there are no nonces.
val check_vdf : 
  Raw_context.t ->
  Seed_repr.vdf_solution ->
  unit Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
    Tezos_protocol_environment_015_PtLimaPt.Lwt.tVerifies if a VDF (result, proof) is valid.
val update_seed : 
  Raw_context.t ->
  Seed_repr.vdf_solution ->
  Raw_context.t Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
    Tezos_protocol_environment_015_PtLimaPt.Lwt.tUpdates the seed with a function of the VDF result.
val raw_for_cycle : 
  Raw_context.t ->
  Cycle_repr.t ->
  Seed_repr.seed Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
    Tezos_protocol_environment_015_PtLimaPt.Lwt.tReturns the seed associated with the given cycle. Returns a generic storage error when the seed is not available.
val for_cycle : 
  Raw_context.t ->
  Cycle_repr.t ->
  Seed_repr.seed Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
    Tezos_protocol_environment_015_PtLimaPt.Lwt.tReturns the seed associated with the given cycle. Returns the Unknown error when the seed is not available.
val compute_randao : 
  Raw_context.t ->
  Raw_context.t Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
    Tezos_protocol_environment_015_PtLimaPt.Lwt.tComputes RANDAO output for cycle #(current_cycle + preserved + 1)
val cycle_end : 
  Raw_context.t ->
  Cycle_repr.t ->
  (Raw_context.t * Nonce_storage.unrevealed list)
    Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
    Tezos_protocol_environment_015_PtLimaPt.Lwt.tMust 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.
val get_seed_computation_status : 
  Raw_context.t ->
  seed_computation_status
    Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
    Tezos_protocol_environment_015_PtLimaPt.Lwt.tReturn 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.
val remove_for_cycle : 
  Raw_context.t ->
  Cycle_repr.t ->
  Raw_context.t Tezos_protocol_environment_015_PtLimaPt.Error_monad.tzresult
    Tezos_protocol_environment_015_PtLimaPt.Lwt.tRemoves 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.