package tezos-protocol-alpha
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=aa2f5bc99cc4ca2217c52a1af2a2cdfd3b383208cb859ca2e79ca0903396ca1d
sha512=d68bb3eb615e3dcccc845fddfc9901c95b3c6dc8e105e39522ce97637b1308a7fa7aa1d271351d5933febd7476b2819e1694f31198f1f0919681f1f9cc97cb3a
doc/tezos_raw_protocol_alpha/Tezos_raw_protocol_alpha/Ticket_costs/index.html
Module Tezos_raw_protocol_alpha.Ticket_costsSource
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 ->
step_cost:Alpha_context.Gas.cost ->
num_steps:int ->
Alpha_context.t Tezos_protocol_environment_alpha.Error_monad.tzresultconsume_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.thas_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.costadd_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.costadd_z_cost z1 z2 returns the cost of adding the values z1 and z2.