package octez-l2-libs

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

Module Octez_smart_rollup_wasm_benchmark_lib.ExecSource

Utilities used to run the PVM

Sourcetype phase =
  1. | Decoding
  2. | Initialising
  3. | Linking
  4. | Evaluating
  5. | Padding

the different phases in a top level call

Sourceval do_while : ('a -> bool Lwt.t) -> ('a -> 'a Lwt.t) -> 'a -> 'a Lwt.t

do_while reboot f a apply f on a state a regardless of it's type. Will reboot at the end of the last phase according to reboot.

Sourceval run_loop : ?reboot:('a -> bool Lwt.t) option -> ('a -> phase -> 'a Lwt.t) -> 'a -> 'a Lwt.t

run_loop ~reboot f a folds f on all phases of an exection on a state a regardless of it's type. Will reboot at the end of the last phase according to the reboot predicate.

Sourceval show_phase : phase -> string

show_phase phase returns the name of a given phase, for debugging and logging.

execute the PVM until a the end of a top level call e.g. until a snapshotable state is reached

execute_on_state ~reveal_builtins phase state Execute a given phase of the execution loop on the state.

Execute one top level call using fast execution.

Sourceval run : Lwt_io.file_name -> (string -> 'a Lwt.t) -> 'a Lwt.t

run path k execute k on the content of the file at path

Sourceval initial_boot_sector_from_kernel : ?max_tick:int64 -> string -> Pvm_instance.Wasm.tree Lwt.t

initial_boot_sector_from_kernel "src/lib_scoru_wasm/bench/inputs/my_kernel.wasm" initialize a state from a kernel (byte format)

Sourcetype input =
  1. | File of string
  2. | Str of string

Inputs can be given : as a filename containing the input, or directly as a string.

Sourcetype message =
  1. | Transfer of input
  2. | Other of input
  3. | Encoded of input

Types of messages to send to inbox. Can be either already encoded, or not. If it's not encoded then it must be designated as Deposit or Other to allow encoding

Sourceval load_messages : message list -> int32 -> Pvm_instance.Wasm.tree -> Pvm_instance.Wasm.tree Lwt.t

load_messages messages level state sends messages to the inbox, at a given level. Will fail if the VM is not accepting input, and advance until next Snapshot.

OCaml

Innovation. Community. Security.