package tezos-protocol-017-PtNairob

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

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-17.3.tar.gz
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc

doc/tezos-protocol-017-PtNairob.raw/Tezos_raw_protocol_017_PtNairob/Script_interpreter/index.html

Module Tezos_raw_protocol_017_PtNairob.Script_interpreterSource

This is the Michelson interpreter.

This module offers a way to execute either a Michelson script or a Michelson instruction.

Implementation details are documented in the .ml file.

Sourcetype Tezos_protocol_environment_017_PtNairob.Error_monad.error +=
  1. | Michelson_too_many_recursive_calls
Sourcetype execution_result = {
  1. script : Script_ir_translator.ex_script;
  2. code_size : int;
  3. storage : Alpha_context.Script.expr;
  4. lazy_storage_diff : Alpha_context.Lazy_storage.diffs option;
  5. operations : Script_typed_ir.packed_internal_operation list;
  6. ticket_diffs : Tezos_protocol_environment_017_PtNairob.Z.t Ticket_token_map.t;
  7. ticket_receipt : Ticket_receipt.t;
}

The result from script interpretation.

execute ?logger ctxt ~cached_script mode step_constant ~script ~entrypoint ~parameter ~internal interprets the script's entrypoint for a given parameter.

This will update the local storage of the contract step_constants.self. Other pieces of contextual information (source, payer, amount, and chaind_id) are also passed in step_constant.

internal is true if and only if the execution happens within an internal operation.

mode is the unparsing mode, as declared by Script_ir_translator.

cached_script is the cached elaboration of script, that is the well typed abstract syntax tree produced by the type elaboration of script during a previous execution and stored in the in-memory cache.

execute_with_typed_parameter ?logger ctxt ~cached_script mode step_constant ~script ~entrypoint loc ~parameter_ty ~parameter ~internal interprets the script's entrypoint for a given (typed) parameter.

See execute for more details about the function's arguments.

Internal interpretation loop ============================

The following types and the following functions are exposed in the interface to allow the inference of a gas model in snoop.

Strictly speaking, they should not be considered as part of the interface since they expose implementation details that may change in the future.

Sourcemodule Internals : sig ... end

Internally, the interpretation loop uses a local gas counter.

OCaml

Innovation. Community. Security.