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_ir_translator/index.html

Module Tezos_raw_protocol_012_Psithaca.Script_ir_translatorSource

Michelson Existential Witness types

Sourcetype ('ta, 'tb) eq =
  1. | Eq : ('same, 'same) eq
Sourcetype ex_comparable_ty =
  1. | Ex_comparable_ty : 'a Script_typed_ir.comparable_ty -> ex_comparable_ty
Sourcetype ex_ty =
  1. | Ex_ty : 'a Script_typed_ir.ty -> ex_ty
Sourcetype ex_stack_ty =
  1. | Ex_stack_ty : ('a, 's) Script_typed_ir.stack_ty -> ex_stack_ty
Sourcetype ex_script =
  1. | Ex_script : ('a, 'b) Script_typed_ir.script -> ex_script
Sourcetype ('arg, 'storage) code = {
  1. code : (('arg, 'storage) Script_typed_ir.pair, (Script_typed_ir.operation Script_typed_ir.boxed_list, 'storage) Script_typed_ir.pair) Script_typed_ir.lambda;
  2. arg_type : 'arg Script_typed_ir.ty;
  3. storage_type : 'storage Script_typed_ir.ty;
  4. views : Script_typed_ir.view Script_typed_ir.SMap.t;
  5. root_name : Script_ir_annot.field_annot option;
  6. code_size : Cache_memory_helpers.sint;
    (*

    This is an over-approximation of the value size in memory, in bytes, of the contract's static part, that is its source code. This includes the code of the contract as well as the code of the views. The storage size is not taken into account by this field as it has a dynamic size.

    *)
}
Sourcetype ex_code =
  1. | Ex_code : ('a, 'c) code -> ex_code
Sourcetype 'storage ex_view =
  1. | Ex_view : ('input * 'storage, 'output) Script_typed_ir.lambda -> 'storage ex_view
Sourcetype ('a, 's, 'b, 'u) cinstr = {
  1. apply : 'r 'f. ('a, 's) Script_typed_ir.kinfo -> ('b, 'u, 'r, 'f) Script_typed_ir.kinstr -> ('a, 's, 'r, 'f) Script_typed_ir.kinstr;
}
Sourcetype ('a, 's, 'b, 'u) descr = {
  1. loc : Alpha_context.Script.location;
  2. bef : ('a, 's) Script_typed_ir.stack_ty;
  3. aft : ('b, 'u) Script_typed_ir.stack_ty;
  4. instr : ('a, 's, 'b, 'u) cinstr;
}
Sourcetype tc_context =
  1. | Lambda : tc_context
  2. | Dip : ('a, 's) Script_typed_ir.stack_ty * tc_context -> tc_context
  3. | Toplevel : {
    1. storage_type : 'sto Script_typed_ir.ty;
    2. param_type : 'param Script_typed_ir.ty;
    3. root_name : Script_ir_annot.field_annot option;
    } -> tc_context
Sourcetype ('a, 's) judgement =
  1. | Typed : ('a, 's, 'b, 'u) descr -> ('a, 's) judgement
  2. | Failed : {
    1. descr : 'b 'u. ('b, 'u) Script_typed_ir.stack_ty -> ('a, 's, 'b, 'u) descr;
    } -> ('a, 's) judgement
Sourceval close_descr : ('a, 'b, 'c, 'd) descr -> ('a, 'b, 'c, 'd) Script_typed_ir.kdescr
Sourcetype unparsing_mode =
  1. | Optimized
  2. | Readable
  3. | Optimized_legacy

Flag that drives unparsing of typed values to nodes.

  • Optimized_legacy must be kept backward-compatible in order to compute valid hashes (of big map keys).
  • Optimized may be used as long as the result can be read by parse_data.
  • Readable produces with string values instead of bytes when feasible.
Sourcetype merge_type_error_flag =
  1. | Default_merge_type_error
  2. | Fast_merge_type_error

Create an empty big_map

Update a big map, returning the old value of the given key and the new map.

This does not modify the underlying storage, only the diff table.

parse_ty specialized for the right-hand side part of a big map type, i.e. the `value` in `big_map key value`.

parse_ty allowing big_map values, operations, contract and tickets.

Sourceval parse_ty : Alpha_context.context -> legacy:bool -> allow_lazy_storage:bool -> allow_operation:bool -> allow_contract:bool -> allow_ticket:bool -> Alpha_context.Script.node -> (ex_ty * Alpha_context.context) Tezos_protocol_environment_012_Psithaca.Error_monad.tzresult

We expose parse_ty for convenience to external tools. Please use specialized versions such as parse_packable_ty, parse_parameter_ty, parse_comparable_ty, or parse_big_map_value_ty if possible.

Sourceval ty_of_comparable_ty : 'a Script_typed_ir.comparable_ty -> 'a Script_typed_ir.ty

High-level function to typecheck a Michelson script. This function is not used for validating operations but only for the typecheck_code RPC.

If show_types is set to true, details of the typechecking are returned in the type_map, otherwise the returned type_map is empty.

Sourceval serialize_ty_for_error : 'a Script_typed_ir.ty -> Alpha_context.Script.expr

Combines parse_code and parse_storage

Sourcetype lazy_storage_ids
Sourceval no_lazy_storage_id : lazy_storage_ids
Sourceval list_of_big_map_ids : lazy_storage_ids -> Alpha_context.Big_map.Id.t list

Produce a lazy storage diff, containing in-memory writes to lazy data structures such as big_maps yet to be committed.

The resulting diff can be committed to the underlying storage (context) using Lazy_storage_diff.apply.

  • parameter to_duplicate

    Lazy data structure reference produced via collect_lazy_storage that can not be reused. Typically collected via traversing the parameters to a smart contract.

  • parameter to_update

    Lazy data structure reference produced via collect_lazy_storage that can be reused. Typically collected via traversing the previous storage of a smart contract.

Sourceval script_size : ex_script -> int * Gas_limit_repr.cost

script_size script returns an overapproximation of the size of the in-memory representation of script as well as the cost associated to computing that overapproximation.

OCaml

Innovation. Community. Security.