package octez-protocol-alpha-libs

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Tezos_baking_alpha.Baking_noncesSource

Sourcetype state
Sourcetype t = state
Sourcetype nonces

nonces is a hash map corresponding to the data which can be found in the file from nonces_location

load wallet location loads the file corresponding to location and returns a data structure containing the stored information.

Sourceval generate_seed_nonce : Baking_configuration.nonce_config -> Baking_state.consensus_key -> Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t -> (Tezos_protocol_alpha.Protocol.Nonce_hash.t * Tezos_protocol_alpha.Protocol.Alpha_context.Nonce.t) Tezos_base.TzPervasives.tzresult Lwt.t

generate_seed_nonce nonce_config delegate level computes a nonce via a Deterministic or Random approach, depending on the nonce_config argument; the deterministic case uses as parameters delegate and level.

Sourceval register_nonce : Tezos_client_alpha.Protocol_client_context.full -> chain_id:Tezos_base.TzPervasives.Chain_id.t -> Tezos_base.TzPervasives.Block_hash.t -> Tezos_protocol_alpha.Protocol.Alpha_context.Nonce.t -> cycle:Tezos_protocol_alpha.Protocol.Alpha_context.Cycle.t -> level:Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t -> round:Tezos_protocol_alpha.Protocol.Alpha_context.Round.t -> unit Tezos_base.TzPervasives.tzresult Lwt.t

register_nonce cctxt ~chain_id block_hash nonce ~cycle ~level ~round updates the contents from the nonces file located using cctxt and ~chain_id by adding a new entry or replacing an existing one of the form block_hash : nonce * ~cycle * ~level * ~round.

Sourceval start_revelation_worker : Tezos_client_alpha.Protocol_client_context.full -> Baking_configuration.nonce_config -> Tezos_base.TzPervasives.Chain_id.t -> Tezos_protocol_alpha.Protocol.Alpha_context.Constants.t -> Baking_state.proposal Lwt_stream.t -> Lwt_canceler.t Lwt.t

start_revelation_worker cctxt config chain_id constants block_stream represents the continuous process of receiving new proposal from block_stream and applying them to the internal state created from cctxt, config, chain_id and constants; each new proposal can produce a nonce, to be stored in a nonce file location, facilitating the nonce revelation process.

OCaml

Innovation. Community. Security.