package tezos-protocol-010-PtGRANAD

  1. Overview
  2. Docs
Tezos/Protocol: economic-protocol definition

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-16.1.tar.gz
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f

doc/tezos-protocol-010-PtGRANAD.raw/Tezos_raw_protocol_010_PtGRANAD/Alpha_context/Gas/index.html

Module Alpha_context.GasSource

Sourcetype t = private
  1. | Unaccounted
  2. | Limited of {
    1. remaining : Arith.fp;
    }
Sourceval free : cost
Sourceval atomic_step_cost : 'a Saturation_repr.t -> cost
Sourceval step_cost : 'a Saturation_repr.t -> cost
Sourceval alloc_cost : 'a Saturation_repr.t -> cost
Sourceval alloc_bytes_cost : int -> cost
Sourceval alloc_mbytes_cost : int -> cost
Sourceval read_bytes_cost : int -> cost
Sourceval write_bytes_cost : int -> cost
Sourceval (*@) : 'a Saturation_repr.t -> cost -> cost
Sourceval (+@) : cost -> cost -> cost

Checks that the given gas limit does not exceed the hard gas limit per operation

Consumes gas equal to the given operation gas limit in the current block gas level of the context. May fail if not enough gas remains in the block

Sourceval set_limit : context -> 'a Arith.t -> context

Sets a limit to the consumable operation gas

Sourceval set_unlimited : context -> context

Allows unlimited gas consumption

Consumes operation gas. May fail if not enough gas remains for the operation

Sourceval remaining_operation_gas : context -> Arith.fp

Returns the current gas counter.

Sourceval update_remaining_operation_gas : context -> Arith.fp -> context

Update gas counter in the context.

Triggers an error in case of gas exhaustion.

Sourceval level : context -> t

Returns operation gas level

Sourceval consumed : since:context -> until:context -> Arith.fp

Returns the operation gas level difference between two contexts. Returns Arith.zero if any of the contexts are set to unlimited gas

Sourceval block_level : context -> Arith.fp

Returns block gas level

Sourceval cost_of_repr : Gas_limit_repr.cost -> cost
OCaml

Innovation. Community. Security.