package tezos-store

  1. Overview
  2. Docs

File convention

type 'kind directory
type 'kind file
type ('kind, 'data) encoded_file
val dir_path : 'kind directory -> string
val file_path : 'kind file -> string
val is_json_file : ('kind, 'data) encoded_file -> bool
val make_encoded_file : ?json:bool -> 'kind directory -> filename:string -> 'a Data_encoding.t -> ('kkind, 'a) encoded_file
val encoded_file_path : ('kind, 'data) encoded_file -> string
val file_encoding : ('kind, 'data) encoded_file -> 'data Data_encoding.t

Toplevel directory

val store_dir : dir_path:string -> [ `Store_dir ] directory

Protocols directory

val protocol_store_dir : [< `Store_dir | `Snapshot_dir | `Snapshot_tmp_dir | `Tar_archive ] directory -> [ `Protocol_dir ] directory
val protocol_file : [ `Protocol_dir ] directory -> Tezos_crypto.Protocol_hash.t -> [ `Protocol ] file

Protocol file

Chain directory

val chain_dir : [< `Store_dir | `Testchains_dir ] directory -> Tezos_crypto.Chain_id.t -> [ `Chain_dir ] directory
val lock_file : [ `Chain_dir ] directory -> [ `Lockfile ] file
val reconstruction_lock_file : [ `Chain_dir ] directory -> [ `Reconstruction_lockfile ] file
val testchains_dir : [ `Chain_dir ] directory -> [ `Testchains_dir ] directory

Persistent chain data files

val chain_config_file : [ `Chain_dir ] directory -> ([ `Chain_config ], Store_types.chain_config) encoded_file
val protocol_levels_file : [< `Chain_dir ] directory -> ([ `Protocol_levels ], Store_types.Protocol_levels.activation_block Store_types.Protocol_levels.t) encoded_file
val genesis_block_file : [ `Chain_dir ] directory -> ([ `Genesis_block ], Block_repr.t) encoded_file
val current_head_file : [ `Chain_dir ] directory -> ([ `Current_head ], Store_types.block_descriptor) encoded_file
val alternate_heads_file : [ `Chain_dir ] directory -> ([ `Alternate_heads ], Store_types.block_descriptor list) encoded_file
val cementing_highwatermark_file : [ `Chain_dir ] directory -> ([ `Cementing_highwatermark ], int32 option) encoded_file
val checkpoint_file : [ `Chain_dir ] directory -> ([ `Checkpoint ], Store_types.block_descriptor) encoded_file
val target_file : [ `Chain_dir ] directory -> ([ `Target ], Store_types.block_descriptor option) encoded_file
val invalid_blocks_file : [ `Chain_dir ] directory -> ([ `Invalid_blocks ], Store_types.invalid_block Tezos_crypto.Block_hash.Map.t) encoded_file
val forked_chains_file : [ `Chain_dir ] directory -> ([ `Forked_chains ], Tezos_crypto.Block_hash.t Tezos_crypto.Chain_id.Map.t) encoded_file

Block store

val savepoint_file : [ `Chain_dir ] directory -> ([ `Savepoint ], Store_types.block_descriptor) encoded_file
val caboose_file : [ `Chain_dir ] directory -> ([ `Caboose ], Store_types.block_descriptor) encoded_file
type block_store_status =
  1. | Idle
  2. | Merging
val block_store_status_file : [ `Chain_dir ] directory -> ([ `Status ], block_store_status) encoded_file
val cemented_blocks_dir : [< `Chain_dir | `Snapshot_dir | `Snapshot_tmp_dir | `Tar_archive ] directory -> [ `Cemented_blocks_dir ] directory
val cemented_blocks_level_index_dir : [ `Cemented_blocks_dir ] directory -> [ `Cemented_level_index_dir ] directory
val cemented_blocks_level_lock_file : [ `Cemented_level_index_dir ] directory -> [ `Cemented_level_lock_file ] file
val cemented_blocks_hash_index_dir : [ `Cemented_blocks_dir ] directory -> [ `Cemented_hash_index_dir ] directory
val cemented_blocks_hash_lock_file : [ `Cemented_hash_index_dir ] directory -> [ `Cemented_hash_lock_file ] file
val cemented_blocks_file : [ `Cemented_blocks_dir ] directory -> start_level:int32 -> end_level:int32 -> [ `Cemented_blocks_file ] file
val cemented_blocks_metadata_dir : [ `Cemented_blocks_dir ] directory -> [ `Cemented_metadata_dir ] directory
val cemented_blocks_metadata_file : [ `Cemented_metadata_dir ] directory -> [ `Cemented_blocks_file ] file -> [ `Cemented_blocks_metadata ] file
val cemented_blocks_tmp_metadata_file : [ `Cemented_metadata_dir ] directory -> [ `Cemented_blocks_file ] file -> [ `Cemented_blocks_metadata ] file
type floating_kind =
  1. | RO
  2. | RW
  3. | RW_TMP
  4. | RO_TMP
  5. | Restore of floating_kind

The type of floating store's kind.

val floating_blocks_dir : [ `Chain_dir ] directory -> floating_kind -> [ `Floating_dir ] directory
val floating_blocks_index_dir : [ `Floating_dir ] directory -> [ `Floating_index_dir ] directory
val floating_blocks_file : [ `Floating_dir ] directory -> [ `Floating_blocks ] file

Snapshots

val snapshot_dir : ?snapshot_path:string -> unit -> [ `Snapshot_dir ] directory
val snapshot_file : snapshot_filename:string -> [ `Snapshot_dir ] directory -> [ `Snapshot_file ] file
val snapshot_tmp_dir : [ `Snapshot_dir ] directory -> [ `Snapshot_tmp_dir ] directory
val snapshot_tmp_tar_file : [< `Snapshot_dir | `Snapshot_tmp_dir ] directory -> [ `Snapshot_tar_file ] file
val snapshot_block_data_file : [< `Snapshot_dir | `Snapshot_tmp_dir | `Tar_archive ] directory -> [ `Snapshot_block_data ] file
val snapshot_context_file : [< `Snapshot_dir | `Snapshot_tmp_dir | `Tar_archive ] directory -> [ `Snapshot_context ] file
val snapshot_floating_blocks_file : [< `Snapshot_dir | `Snapshot_tmp_dir | `Tar_archive ] directory -> [ `Snapshot_floating_blocks ] file
val snapshot_metadata_file : [< `Snapshot_dir | `Snapshot_tmp_dir | `Tar_archive ] directory -> [ `Snapshot_metadata ] file
val snapshot_version_file : [< `Snapshot_dir | `Snapshot_tmp_dir | `Tar_archive ] directory -> [ `Snapshot_version ] file
val snapshot_protocol_levels_file : [< `Snapshot_dir | `Snapshot_tmp_dir | `Tar_archive ] directory -> ([ `Snapshot_protocol_levels ], Store_types.Protocol_levels.activation_block Store_types.Protocol_levels.t) encoded_file
val snapshot_tar_root : [ `Tar_archive ] directory
OCaml

Innovation. Community. Security.