package octez-l2-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

This module type defines the state for the PVM. For use in lib_scoru_wasm only.

General state of the PVM

The following describes the general state transitions.

stateDiagram
Collect --> Padding
Snapshot --> Evaluation
state Evaluation {
  Decode --> Link
  Link --> Init
  Init --> Eval
}
Evaluation --> Padding : evaluation succeeded
Padding --> Snapshot : reboot flag is set
Padding --> Collect : reboot flag is not set
Evaluation --> Stuck : something went wrong
type output_buffer_parameters = {
  1. validity_period : int32;
    (*

    Number of levels an outbox is kept before being cleaned-up.

    *)
  2. message_limit : Z.t;
    (*

    Maximum number of messages per inbox

    *)
}
type pvm_state = {
  1. last_input_info : input_info option;
    (*

    Info about last read input.

    *)
  2. current_tick : Z.t;
    (*

    Current tick of the PVM.

    *)
  3. reboot_counter : Z.t;
    (*

    Number of reboots for the current input.

    *)
  4. durable : Durable.t;
    (*

    The durable storage of the PVM.

    *)
  5. buffers : Tezos_webassembly_interpreter.Eval.buffers;
    (*

    Input and outut buffers used by the PVM host functions.

    *)
  6. tick_state : tick_state;
    (*

    The current tick state.

    *)
  7. last_top_level_call : Z.t;
    (*

    Last tick corresponding to a top-level call.

    *)
  8. max_nb_ticks : Z.t;
    (*

    Number of ticks between top level call.

    *)
  9. maximum_reboots_per_input : Z.t;
    (*

    Number of reboots between two inputs.

    *)
  10. output_buffer_parameters : output_buffer_parameters;
    (*

    Outbox paramaters defined by the protocol.

    *)
}
type computation_status =
  1. | Yielding
  2. | Forcing_yield
  3. | Running
  4. | Failing
  5. | Reboot
OCaml

Innovation. Community. Security.