Evm_node_lib_prod.Evm_stateDirectory where the kernel logs are stored. The function execute below expect the directory to exist.
val execute :
?kind:Events.kernel_log_kind ->
data_dir:string ->
?log_file:string ->
?wasm_entrypoint:string ->
config:Mavkit_smart_rollup_wasm_debugger_lib.Config.config ->
t ->
[< `Input of string ] list ->
t Mavryk_base.TzPervasives.tzresult Lwt.texecute ?simulation ~data_dir ?log_file ~wasm_entrypoint ~config
evm_state messages executes the wasm_entrypoint function (default to kernel_run) with messages within the inbox of evm_state.
Kernel logs are stored under the kernel_logs_directory in log_file. simulation adds a prefix to the event to differenciate the logs.
val init : kernel:string -> t Mavryk_base.TzPervasives.tzresult Lwt.tinit ~kernel initializes the local evm_state with kernel.
modify ~key ~value evm_state sets value at key in the local EVM state.
val inspect : t -> string -> bytes option Lwt.tinspect evm_state key returns the value stored under key in evm_state, if any.
val subkeys : t -> string -> string Mavryk_base.TzPervasives.trace Lwt.tsubkeys evm_state key returns the list of value stored under key in evm_state.
val execute_and_inspect :
data_dir:string ->
?wasm_entrypoint:string ->
config:Mavkit_smart_rollup_wasm_debugger_lib.Config.config ->
input:Simulation.Encodings.simulate_input ->
t ->
bytes option list Mavryk_base.TzPervasives.tzresult Lwt.texecute_and_inspect ~data_dir ?wasm_entrypoint ~config ~input
evm_state executes the wasm_entrypoint function (default to kernel_run) with input within the inbox of evm_state, and returns input.insights_requests.
val current_block_height :
t ->
Evm_node_lib_prod_encoding.Ethereum_types.block_height Lwt.tcurrent_block_height evm_state returns the height of the latest block produced by the kernel.
val current_block_hash :
t ->
Evm_node_lib_prod_encoding.Ethereum_types.block_hash
Mavryk_base.TzPervasives.tzresult
Lwt.tSame as current_block_height for the block hash.
type apply_result = | Apply_success of t
* Evm_node_lib_prod_encoding.Ethereum_types.block_height
* Evm_node_lib_prod_encoding.Ethereum_types.block_hash| Apply_failureval apply_blueprint :
data_dir:string ->
config:Mavkit_smart_rollup_wasm_debugger_lib.Config.config ->
t ->
Blueprint_types.payload ->
apply_result Mavryk_base.TzPervasives.tzresult Lwt.tapply_blueprint ~data-dir ~config state payload applies the blueprint payload on top of evm_state. If the payload produces a block, the new updated EVM state is returned along with the new block’s height.
The data-dir is used to store the kernel logs in the kernel_logs_directory.
flag_local_exec evm_state adds a flag telling the kernel it is executed by an EVM node, not a rollup node.