Evm_node_lib_prod.Evm_contexttype head = {current_block_hash : Evm_node_lib_prod_encoding.Ethereum_types.block_hash;next_blueprint_number : Evm_node_lib_prod_encoding.Ethereum_types.quantity;evm_state : Evm_state.t;}val start :
?kernel_path:string ->
data_dir:string ->
preimages:string ->
preimages_endpoint:Uri.t option ->
smart_rollup_address:string ->
unit ->
init_status Mavryk_base.TzPervasives.tzresult Lwt.tstart ~data_dir ~preimages ~preimages_endpoint ~smart_rollup_address () creates a new worker to manage a local EVM context where it initializes the index, and use a checkpoint mechanism to load the latest store if any.
Returns a value telling if the context was loaded from disk (Loaded) or was initialized from scratch (Created).
val init_from_rollup_node :
data_dir:string ->
rollup_node_data_dir:string ->
unit Mavryk_base.TzPervasives.tzresult Lwt.tinit_from_rollup_node ~data_dir
~rollup_node_data_dir ~inspect_current_blueprint_number initialises the irmin context and metadata of the evm using the latest known evm state of the given rollup node.
val apply_evm_events :
?finalized_level:int32 ->
Evm_node_lib_prod_encoding.Ethereum_types.Evm_events.t list ->
unit Mavryk_base.TzPervasives.tzresult Lwt.tapply_evm_events ~finalized_level events applies all the events events on the local context. The events are performed in a transactional context.
Stores finalized_level with new_last_known_l1_level if provided.
val inspect : string -> bytes option Mavryk_base.TzPervasives.tzresult Lwt.tinspect ctxt path returns the value stored in path of the freshest EVM state, if it exists.
val execute_and_inspect :
?wasm_entrypoint:string ->
Simulation.Encodings.simulate_input ->
bytes option list Mavryk_base.TzPervasives.tzresult Lwt.texecute_and_inspect ~input ctxt executes input using the freshest EVM state, and returns input.insights_requests.
If wasm_entrypoint is omitted, the kernel_run function of the kernel is executed.
val last_produced_blueprint :
unit ->
Blueprint_types.t Mavryk_base.TzPervasives.tzresult Lwt.tlast_produced_blueprint ctxt returns the blueprint used to create the current head of the chain.
val apply_blueprint :
Mavryk_base.TzPervasives.Time.Protocol.t ->
Blueprint_types.payload ->
Evm_node_lib_prod_encoding.Ethereum_types.hash list ->
unit Mavryk_base.TzPervasives.tzresult Lwt.tapply_blueprint timestamp payload delayed_transactions applies payload in the freshest EVM state stored under ctxt at timestamp timestamp, forwards the Blueprint_types.with_events. It commits the result if the blueprint produces the expected block.
val head_info : unit -> head Lwt.tval blueprints_watcher :
unit ->
Blueprint_types.with_events Lwt_stream.t * Lwt_watcher.stopperval blueprint :
Evm_node_lib_prod_encoding.Ethereum_types.quantity ->
Blueprint_types.with_events option Mavryk_base.TzPervasives.tzresult Lwt.tval last_known_l1_level :
unit ->
int32 option Mavryk_base.TzPervasives.tzresult Lwt.tval new_last_known_l1_level :
int32 ->
unit Mavryk_base.TzPervasives.tzresult Lwt.tval shutdown : unit -> unit Mavryk_base.TzPervasives.tzresult Lwt.tval delayed_inbox_hashes :
unit ->
Evm_node_lib_prod_encoding.Ethereum_types.hash list
Mavryk_base.TzPervasives.tzresult
Lwt.tdelayed_inbox_hashes ctxt returns the hashes in the delayed inbox.