package octez-l2-libs
This module type defines the state for the PVM. For use in lib_scoru_wasm only.
type tick_state =
| Snapshot
| Decode of Tezos_webassembly_interpreter.Decode.decode_kont
| Link of {
ast_module : Tezos_webassembly_interpreter.Ast.module_;
externs : Tezos_webassembly_interpreter.Instance.extern Tezos_webassembly_interpreter.Instance.Vector.t;
imports_offset : int32;
}
| Init of {
self : Tezos_webassembly_interpreter.Instance.module_key;
ast_module : Tezos_webassembly_interpreter.Ast.module_;
init_kont : Tezos_webassembly_interpreter.Eval.init_kont;
module_reg : Tezos_webassembly_interpreter.Instance.module_reg;
}
| Eval of {
config : Tezos_webassembly_interpreter.Eval.config;
module_reg : Tezos_webassembly_interpreter.Instance.module_reg;
}
| Collect
| Stuck of Wasm_pvm_errors.t
| Padding
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 = {
validity_period : int32;
(*Number of levels an outbox is kept before being cleaned-up.
*)message_limit : Z.t;
(*Maximum number of messages per inbox
*)
}
type pvm_state = {
last_input_info : input_info option;
(*Info about last read input.
*)current_tick : Z.t;
(*Current tick of the PVM.
*)reboot_counter : Z.t;
(*Number of reboots for the current input.
*)durable : Durable.t;
(*The durable storage of the PVM.
*)buffers : Tezos_webassembly_interpreter.Eval.buffers;
(*Input and outut buffers used by the PVM host functions.
*)tick_state : tick_state;
(*The current tick state.
*)last_top_level_call : Z.t;
(*Last tick corresponding to a top-level call.
*)max_nb_ticks : Z.t;
(*Number of ticks between top level call.
*)maximum_reboots_per_input : Z.t;
(*Number of reboots between two inputs.
*)output_buffer_parameters : output_buffer_parameters;
(*Outbox paramaters defined by the protocol.
*)
}
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>