package tezos-protocol-015-PtLimaPt
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
    
    
  sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc
    
    
  doc/tezos-protocol-015-PtLimaPt.raw/Tezos_raw_protocol_015_PtLimaPt/Seed_repr/index.html
Module Tezos_raw_protocol_015_PtLimaPt.Seed_reprSource
Tezos Protocol Implementation - Random number generation
This is not expected to be a good cryptographic random number generator. In particular this is supposed to be used in situations where the seed is a globally known information.
The only expected property is: It should be difficult to find a seed such that the generated sequence is a given one.
Random Generation
The state of the random number generator
A random seed, to derive random sequences from
A random sequence, to derive random values from
type vdf_setup =
  Tezos_protocol_environment_015_PtLimaPt.Vdf.discriminant
  * Tezos_protocol_environment_015_PtLimaPt.Vdf.challengeA VDF discriminant and challenge
type vdf_solution =
  Tezos_protocol_environment_015_PtLimaPt.Vdf.result
  * Tezos_protocol_environment_015_PtLimaPt.Vdf.proofA VDF result, to derive a seed from
val pp_solution : 
  Tezos_protocol_environment_015_PtLimaPt.Format.formatter ->
  vdf_solution ->
  unitCompare only the first element of two vdf_solution, that are of Vdf.result.
val verify : 
  vdf_setup ->
  Tezos_protocol_environment_015_PtLimaPt.Int64.t ->
  vdf_solution ->
  bool optioninitialize_new state ident returns a new generator
take_int32 s bound generates the next random value as a bounded int32
take_int64 s bound generates the next random value as a bounded int64
Entropy
A nonce for adding entropy to the generator
Use a byte sequence as a nonce
Compute the hash of a nonce
check_hash nonce hash is true if the nonce correspond to the hash
For using nonce hashes as keys in the hierarchical database
Returns a new seed by hashing the one passed with a constant.
initial_seeds n generates the first n seeds for which there are no nonces. The first seed is a constant value. The kth seed is the hash of seed (k-1) concatenated with a constant. If an initial_seed is provided, the first seed is created using it as the first one.
Predefined nonce
Serializers
val vdf_solution_encoding : 
  vdf_solution Tezos_protocol_environment_015_PtLimaPt.Data_encoding.tval seed_status_encoding : 
  seed_status Tezos_protocol_environment_015_PtLimaPt.Data_encoding.t