Module Evm_node_lib_dev.Data_dir

val store_path : data_dir:string -> string

Path of EVM state store.

type store_info = {
  1. rollup_address : Octez_smart_rollup.Address.t;
  2. current_number : Evm_node_lib_dev_encoding.Ethereum_types.quantity;
  3. legacy_block_storage : bool;
  4. history_mode : Evm_node_config.Configuration.history_mode;
  5. first_number : Evm_node_lib_dev_encoding.Ethereum_types.quantity;
}
val export_store : data_dir:string -> output_db_file:string -> store_info Tezos_base.TzPervasives.tzresult Lwt.t

export_store ~data_dir ~output_db_file exports the store database with data from the data_dir into the output_db_file and returns the rollup address and the current level.

val lock : data_dir:string -> unit Tezos_base.TzPervasives.tzresult Lwt.t

lock ~data_dir takes an exclusive lock on data_dir for the duration of the process. It fails if there is already another evm node with a lock.

val use : data_dir:string -> (unit -> 'a Tezos_base.TzPervasives.tzresult Lwt.t) -> 'a Tezos_base.TzPervasives.tzresult Lwt.t

use ~data_dir k creates data_dir if necessary before executing k (), and deletes data_dir if it was created and k () fails.

val populated : data_dir:string -> bool Lwt.t

Returns true if the data dir is already populated with a store and/or evm context.