Mavryk_raw_protocol_001_PtAtLas.Nonce_storage
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
).
type t = Seed_repr.nonce
type nonce = t
val encoding : nonce Mavryk_protocol_environment_001_PtAtLas.Data_encoding.t
type unrevealed = Storage.Seed.unrevealed_nonce = {
nonce_hash : Nonce_hash.t;
delegate : Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t;
}
val check_unrevealed :
Raw_context.t ->
Level_repr.t ->
nonce ->
unit Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
Checks that a nonce revelation operation can be safely applied.
val of_bytes :
bytes ->
nonce Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
val hash : nonce -> Nonce_hash.t
val check_hash : nonce -> Nonce_hash.t -> bool