package octez-protocol-019-PtParisB-libs

  1. Overview
  2. Docs
Octez protocol 019-PtParisB libraries

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-octez-v20.1.tag.bz2
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65

doc/octez-protocol-019-PtParisB-libs.baking/Tezos_baking_019_PtParisB/Per_block_vote_file/index.html

Module Tezos_baking_019_PtParisB.Per_block_vote_fileSource

This module is used to load the baker's per block votes configurations. When a file is given as configuration, its content is expected to be a valid JSON matching the following examples:

  • {"liquidity_baking_toggle_vote": "on"}
  • {"liquidity_baking_toggle_vote": "off"}
  • {"liquidity_baking_toggle_vote": "pass"}
  • {"adaptive_issuance_vote": "on"}
  • {"adaptive_issuance_vote": "off"}
  • {"adaptive_issuance_vote": "pass"}
  • {"liquidity_baking_toggle_vote": "on","adaptive_issuance_vote": "on"}
  • {"liquidity_baking_toggle_vote": "on","adaptive_issuance_vote": "off"}
  • {"liquidity_baking_toggle_vote": "on","adaptive_issuance_vote": "pass"}
  • {"liquidity_baking_toggle_vote": "off","adaptive_issuance_vote": "on"}
  • {"liquidity_baking_toggle_vote": "off","adaptive_issuance_vote": "off"}
  • {"liquidity_baking_toggle_vote": "off","adaptive_issuance_vote": "pass"}
  • {"liquidity_baking_toggle_vote": "pass","adaptive_issuance_vote": "on"}
  • {"liquidity_baking_toggle_vote": "pass","adaptive_issuance_vote": "off"}
  • {"liquidity_baking_toggle_vote": "pass","adaptive_issuance_vote": "pass"}

Moreover, in order to handle dynamic voting (i.e. change the baker's vote without having to restart it), each time a block is being built, the baker will try and read the vote file present in the config in order to check for updated votes.

Sourceval default_vote_json_filename : string

Default vote file name that should be looked up when the baker starts.

Sourceval read_per_block_votes_no_fail : default: Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Per_block_votes.per_block_votes -> per_block_vote_file:string -> Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Per_block_votes.per_block_votes Lwt.t

Reads the content of per_block_vote_file and returns the votes. If any error occurs (e.g. Non-existing file, unparsable content, etc.), given default values will be used to fill the gaps.

Sourceval load_per_block_votes_config : default_liquidity_baking_vote: Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Per_block_votes.per_block_vote option -> default_adaptive_issuance_vote: Tezos_protocol_019_PtParisB.Protocol.Alpha_context.Per_block_votes.per_block_vote option -> per_block_vote_file:string option -> Baking_configuration.per_block_votes_config Tezos_base.TzPervasives.tzresult Lwt.t

Load a configuration of per-block votes. Liquidity baking toggle vote is mandatory, it has to come from either the per-block vote file per_block_vote_file or from default_liquidity_baking_vote. If a vote cannot be determined from those values, this function fails. Adaptive issuance feature vote is optional. Priority is given to the values in the per_block_vote_file file for all votes at the time of the block (the file is freshly read each time).

OCaml

Innovation. Community. Security.