package tezos-baking-010-PtGRANAD

  1. Overview
  2. Docs

generate_seed_nonce () is a random nonce that is typically used in block headers. When baking, bakers generate random nonces whose hash is committed in the block they bake. They will typically reveal the aforementioned nonce during the next cycle.

inject_block cctxt blk ?force ~priority ~timestamp ~fitness ~seed_nonce ~src_sk ops liquidity_baking_escape_vote tries to inject a block in the node. If ?force is set, the fitness check will be bypassed. priority will be used to compute the baking slot (level is precomputed). src_sk is used to sign the block header.

type Tezos_base__TzPervasives.error +=
  1. | Failed_to_preapply of Tezos_base.Operation.t * Tezos_error_monad.TzCore.error list
val forge_block : Tezos_client_010_PtGRANAD.Protocol_client_context.full -> ?force:bool -> ?operations: Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Operation.packed list -> ?best_effort:bool -> ?sort:bool -> ?minimal_fees:Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Tez.t -> ?minimal_nanotez_per_gas_unit:Q.t -> ?minimal_nanotez_per_byte:Q.t -> ?timestamp:Tezos_base.Time.Protocol.t -> ?mempool:string -> ?context_path:string -> ?seed_nonce_hash:Tezos_protocol_010_PtGRANAD.Protocol.Nonce_hash.t -> liquidity_baking_escape_vote:bool -> chain:Tezos_shell_services.Chain_services.chain -> priority: [ `Set of int | `Auto of Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.public_key_hash * int option ] -> delegate_pkh:Tezos_crypto.Signature.Public_key_hash.t -> delegate_sk:Tezos_client_base.Client_keys.sk_uri -> Tezos_shell_services.Block_services.block -> (Tezos_crypto.Block_hash.t, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t

forge_block cctxt ?fee_threshold ?force ?operations ?best_effort ?sort ?timestamp ?max_priority ?priority ~seed_nonce ~src_sk pk_hash parent_blk injects a block in the node. In addition of inject_block, it will:

* Operations: If ?operations is None, it will get pending operations and add them to the block. Otherwise, provided operations will be used. In both cases, they will be validated.

* Baking priority: If `Auto is used, it will be computed from the public key hash of the specified contract, optionally capped to a maximum value, and optionally restricting for free baking slot.

* Timestamp: If ?timestamp is set, and is compatible with the computed baking priority, it will be used. Otherwise, it will be set at the best baking priority.

* Fee Threshold: If ?fee_threshold is given, operations with fees lower than it are not added to the block.

val create : Tezos_client_010_PtGRANAD.Protocol_client_context.full -> user_activated_upgrades:Tezos_base.User_activated.upgrades -> ?minimal_fees:Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Tez.t -> ?minimal_nanotez_per_gas_unit:Q.t -> ?minimal_nanotez_per_byte:Q.t -> ?max_priority:int -> ?per_block_vote_file:string -> chain:Tezos_shell_services.Chain_services.chain -> context_path:string -> Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.public_key_hash list -> (Client_baking_blocks.block_info, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt_stream.t -> (unit, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t
OCaml

Innovation. Community. Security.