package tezos-store

  1. Overview
  2. Docs
Tezos: store for `octez-node`

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-17.3.tar.gz
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc

doc/tezos-store.unix-reconstruction/Tezos_store_unix_reconstruction/Reconstruction/index.html

Module Tezos_store_unix_reconstruction.ReconstructionSource

Storage reconstruction

The storage reconstruction feature aims to re-compute the contexts (ledger state) and the blocks metadata of a full mode storage, and thus, migrate a storage from a full history mode to an archive one.

To do so, it is needed to re-validate the whole chain, by applying (using the standard validation method: Tezos_validation.Block_validation.apply) all the blocks from the genesis on empty context. As a storage running a full history mode will not store all the ledger state but keeps all the blocks (and operations), it is the only mode that can be reconstructed. The operation consist of two major steps:

  • Reconstructing the cemented block store: for each cemented cycle, the context of each block along with their associated metadatas are restored.
  • Reconstructing the floating block stores: this step is only necessary if the store was recently imported from a snapshot as some metadata will be missing.

As the reconstruction procedure changes the state of the storage, it cannot be run while a node is running on the storage to reconstruct. If the reconstruction is interrupted, it will be resumed if restarted.

Sourcetype failure_kind =
  1. | Nothing_to_reconstruct
  2. | Cannot_read_block_hash of Tezos_base.TzPervasives.Block_hash.t
  3. | Cannot_read_block_level of Int32.t
  4. | Cannot_read_resulting_context_hash of Tezos_base.TzPervasives.Block_hash.t
Sourcetype Tezos_base.TzPervasives.error +=
  1. | Reconstruction_failure of failure_kind
Sourceval reconstruct : ?patch_context: (Tezos_protocol_environment.Context.t -> Tezos_protocol_environment.Context.t Tezos_base.TzPervasives.tzresult Lwt.t) -> store_dir:string -> context_dir:string -> Tezos_base.TzPervasives.Genesis.t -> user_activated_upgrades:Tezos_base.TzPervasives.User_activated.upgrades -> user_activated_protocol_overrides: Tezos_base.TzPervasives.User_activated.protocol_overrides -> operation_metadata_size_limit: Tezos_shell_services.Shell_limits.operation_metadata_size_limit -> progress_display_mode:Tezos_stdlib_unix.Animation.progress_display_mode -> unit Tezos_base.TzPervasives.tzresult Lwt.t

reconstruct ?patch_context ~store_dir ~context_dir genesis uau uapo omsl reconstructs the storage located in store_dir and context_dir. The resulting storage will see its history mode changed to archive.

OCaml

Innovation. Community. Security.