Mavkit_smart_rollup_wasm_benchmark_lib.Exec
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
.
val 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.
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 :
Mavryk_scoru_wasm.Wasm_pvm_state.Internal_state.pvm_state ->
(Mavryk_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:Mavryk_scoru_wasm.Builtins.reveals ->
phase ->
Mavryk_scoru_wasm.Wasm_pvm_state.Internal_state.pvm_state ->
(Mavryk_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:Mavryk_scoru_wasm.Builtins.reveals ->
Mavryk_scoru_wasm.Wasm_pvm_state.Internal_state.pvm_state ->
(Mavryk_scoru_wasm.Wasm_pvm_state.Internal_state.pvm_state * int64) Lwt.t
Execute one top level call using fast execution.
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.