Module Evm_node_lib_dev.Snapshots

type Tezos_base.TzPervasives.error +=
  1. | Invalid_snapshot_file of string
  2. | Invalid_snapshot_provider of string
  3. | Data_dir_populated of string
  4. | History_mode_mismatch of Evm_node_config.Configuration.history_mode * Evm_node_config.Configuration.history_mode
  5. | Incorrect_rollup of Octez_smart_rollup.Address.t * Octez_smart_rollup.Address.t
  6. | Outdated_snapshot of Z.t * Z.t

interpolate_snapshot_file block_number rollup_address history_mode path replaces placeholders in the given snapshot path with the provided values. The supported placeholders are:

  • %l for the block number
  • %r for the rollup address (short form)
  • %R for the rollup address (long form)
  • %h for the history mode
  • parameter block_number

    The block number to use for interpolation.

  • parameter rollup_address

    The rollup address to use for interpolation.

  • parameter history_mode

    The history mode to use for interpolation.

  • parameter path

    The path to the snapshot file, possibly containing placeholders.

interpolate_snapshot_provider ?rollup_address ?network history_mode provider replaces placeholders in the given snapshot provider with the provided values. The supported placeholders are:

  • %n for the network name
  • %r for the rollup address (short form)
  • %R for the rollup address (long form)
  • %h for the history mode
  • parameter rollup_address

    The rollup address to use for interpolation.

  • parameter network

    The network to use for interpolation.

  • parameter history_mode

    The history mode to use for interpolation.

  • parameter provider

    The snapshot provider string, possibly containing placeholders.

val export : ?desync_path:string -> ?chunk_size:Tezos_layer2_store.Desync_snapshots.chunk_size -> ?progress:bool -> target_store:string -> ?target_dir:string -> ?index_file:string -> data_dir:string -> unit -> string Tezos_base.TzPervasives.tzresult Lwt.t

export ?desync_path ?chunk_size ?progress ~target_store ?target_dir ?index_file ~data_dir () exports the data from an EVM node data directory to a snapshot index file and snapshot data in the target_store for deduplication.

  • parameter desync_path

    Path to the desync tool executable. If not provided, it will be looked for in the system's PATH.

  • parameter chunk_size

    Specifies the chunking strategy for the desync tool.

  • parameter progress

    Displays a progress bar if true.

  • parameter target_store

    The path to the desync store where snapshot data will be stored.

  • parameter target_dir

    The directory where the snapshot index file will be created.

  • parameter index_file

    The name of the snapshot index file.

  • parameter data_dir

    The path to the EVM node data directory.

val info : ?desync_path:string -> source_store:string -> ?index_dir:string -> index_file:string -> unit -> (metadata * int) Tezos_base.TzPervasives.tzresult Lwt.t

info ?desync_path ~source_store ?index_dir ~index_file () returns the metadata and the size of a snapshot.

  • parameter desync_path

    Path to the desync tool executable. If not provided, it will be looked for in the system's PATH.

  • parameter source_store

    The path to the desync store containing the snapshot data.

  • parameter index_dir

    The directory where the snapshot index file is located.

  • parameter index_file

    The name of the snapshot index file.

val import : ?desync_path:string -> force:bool -> ?history_mode:Evm_node_config.Configuration.history_mode -> source_store:string -> ?index_dir:string -> index_file:string -> data_dir:string -> unit -> Evm_node_config.Configuration.history_mode option Tezos_base.TzPervasives.tzresult Lwt.t

import ?desync_path ~force ?history_mode ~source_store ?index_dir ~index_file ~data_dir () imports a snapshot into an EVM node data directory.

  • parameter desync_path

    Path to the desync tool executable. If not provided, it will be looked for in the system's PATH.

  • parameter force

    If true, existing data in the data directory will be overwritten.

  • parameter history_mode

    The history mode for the imported data.

  • parameter source_store

    The path to the desync store containing the snapshot data.

  • parameter index_dir

    The directory where the snapshot index file is located.

  • parameter index_file

    The name of the snapshot index file.

  • parameter data_dir

    The path to the EVM node data directory.