package tezos-protocol-alpha
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=55ea1fb8bb3273a7fc270ca8f650d45c56449665619482aad9bc12f3ea736b7e
sha512=fec850fc2d17d7490bbabd5147d62aad13b3aaed8774270f8a38ab419670ed03e0fd30cf8642a97984eca5c2446726fe590ad99c015f7ec50919dc7652f25053
doc/tezos_raw_protocol_alpha/Tezos_raw_protocol_alpha/Ticket_costs/index.html
Module Tezos_raw_protocol_alpha.Ticket_costs
Source
This module contains constants and utility functions for gas metering functions used for extracting and handling tickets for the global ticket balance table.
val consume_gas_steps :
Alpha_context.t ->
num_steps:int ->
Alpha_context.t Tezos_protocol_environment_alpha.Error_monad.tzresult
consume_gas_steps ctxt ~num_steps
consumes gas corresponding to a given num_steps
and step_cost
. It's useful for paying for gas upfront where the number of steps can be determined.
This function is generic and should probably be moved. See issue https://gitlab.com/tezos/tezos/-/issues/1950.
val has_tickets_of_ty_cost :
('a, _) Script_typed_ir.ty ->
Saturation_repr.may_saturate Saturation_repr.t
has_tickets_of_ty_cost ty
returns the cost of producing a has_tickets
, used internally in the Ticket_scanner
module.
negate_cost z
returns the cost of negating the given value z
.
val add_int_cost :
Script_int.n Script_int.num ->
Script_int.n Script_int.num ->
Alpha_context.Gas.cost
add_int_cost n1 n2
returns the cost of adding the values n1
and n2
.
val add_z_cost :
Tezos_protocol_environment_alpha.Z.t ->
Tezos_protocol_environment_alpha.Z.t ->
Alpha_context.Gas.cost
add_z_cost z1 z2
returns the cost of adding the values z1
and z2
.