package tezos-protocol-012-Psithaca

  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-012-Psithaca.raw/Tezos_raw_protocol_012_Psithaca/Script_interpreter/index.html

Module Tezos_raw_protocol_012_Psithaca.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_012_Psithaca.Error_monad.error +=
  1. | Michelson_too_many_recursive_calls
Sourcetype execution_result = {
  1. ctxt : Alpha_context.context;
  2. storage : Alpha_context.Script.expr;
  3. lazy_storage_diff : Alpha_context.Lazy_storage.diffs option;
  4. operations : Alpha_context.packed_internal_operation list;
}

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.

kstep logger ctxt step_constants kinstr accu stack interprets the script represented by kinstr under the context ctxt. This will turn a stack whose topmost element is accu and remaining elements stack into a new accumulator and a new stack. This function also returns an updated context. If logger is given, kstep calls back its functions at specific points of the execution. The execution is parameterized by some step_constants.

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
OCaml

Innovation. Community. Security.