package octez-protocol-017-PtNairob-libs

  1. Overview
  2. Docs
Octez protocol 017-PtNairob libraries

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-18.0.tar.gz
sha256=dbc3b675aee59c2c574e5d0a771193a2ecfca31e7a5bc5aed66598080596ce1c
sha512=b97ed762b9d24744305c358af0d20f394376b64bfdd758dd4a81775326caf445caa57c4f6445da3dd6468ff492de18e4c14af6f374dfcbb7e4d64b7b720e5e2a

doc/octez-protocol-017-PtNairob-libs.baking/Tezos_baking_017_PtNairob/Liquidity_baking_vote/index.html

Module Tezos_baking_017_PtNairob.Liquidity_baking_voteSource

This module is used to load the baker's liquidity baking vote 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"}

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.

Sourcetype Tezos_base.TzPervasives.error +=
  1. | Block_vote_file_not_found of string
Sourcetype Tezos_base.TzPervasives.error +=
  1. | Block_vote_file_invalid of string
Sourcetype Tezos_base.TzPervasives.error +=
  1. | Block_vote_file_wrong_content of string
Sourcetype Tezos_base.TzPervasives.error +=
  1. | Block_vote_file_missing_liquidity_baking_toggle_vote of string
Sourcetype Tezos_base.TzPervasives.error +=
  1. | Missing_vote_on_startup
Sourceval default_vote_json_filename : string

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

Sourceval read_liquidity_baking_toggle_vote_no_fail : default_liquidity_baking_vote: Tezos_protocol_017_PtNairob.Protocol.Alpha_context.Liquidity_baking.liquidity_baking_toggle_vote -> per_block_vote_file:string -> Tezos_protocol_017_PtNairob.Protocol.Alpha_context.Liquidity_baking.liquidity_baking_toggle_vote Lwt.t

Reads the content of per_block_vote_file and returns a vote. If any error occurs (e.g. Non-existing file, unparsable content, etc.), default_liquidity_baking_vote will be returned.

Sourceval load_liquidity_baking_config : per_block_vote_file_arg:string option -> toggle_vote_arg: Tezos_protocol_017_PtNairob.Protocol.Alpha_context.Liquidity_baking.liquidity_baking_toggle_vote option -> Baking_configuration.liquidity_baking_config Tezos_base.TzPervasives.tzresult Lwt.t

Load a liquidity baking configuration given two possible arguments. If neither are provided, it fails. Otherwise, it tries, in priority, to read the per_block_vote_file_arg file if it is given and loads a config using its content. Otherwise, the toggle_vote_arg is used.

OCaml

Innovation. Community. Security.