package octez-l2-libs
Utilities used to run the PVM
the different phases in a top level call
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
.
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.
val show_phase : phase -> string
show_phase phase
returns the name of a given phase, for debugging and logging.
val finish_top_level_call_on_state :
Tezos_scoru_wasm.Wasm_pvm_state.Internal_state.pvm_state ->
(Tezos_scoru_wasm.Wasm_pvm_state.Internal_state.pvm_state * int64) Lwt.t
execute the PVM until a the end of a top level call e.g. until a snapshotable state is reached
val execute_on_state :
reveal_builtins:Tezos_scoru_wasm.Builtins.reveals ->
phase ->
Tezos_scoru_wasm.Wasm_pvm_state.Internal_state.pvm_state ->
(Tezos_scoru_wasm.Wasm_pvm_state.Internal_state.pvm_state * int64) Lwt.t
execute_on_state ~reveal_builtins phase state
Execute a given phase
of the execution loop on the state.
val execute_fast :
reveal_builtins:Tezos_scoru_wasm.Builtins.reveals ->
Tezos_scoru_wasm.Wasm_pvm_state.Internal_state.pvm_state ->
(Tezos_scoru_wasm.Wasm_pvm_state.Internal_state.pvm_state * int64) Lwt.t
Execute one top level call using fast execution.
val 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
val 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)
Inputs can be given : as a filename containing the input, or directly as a string.
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
val 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.