package tezos-context

  1. Overview
  2. Docs
Tezos: on-disk context abstraction for `octez-node`

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-16.1.tar.gz
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f

doc/tezos-context.dump/Tezos_context_dump/Context_dump/Make/argument-1-I/index.html

Parameter Make.I

type index
type context
type tree
type hash
type contents := bytes
type step := string
type commit_info
type batch
val batch : index -> (batch -> 'a Lwt.t) -> 'a Lwt.t
val commit_info_encoding : commit_info Tezos_base.TzPervasives.Data_encoding.t
val hash_equal : hash -> hash -> bool
module Block_header : sig ... end
module Commit_hash : sig ... end
val context_parents : context -> Commit_hash.t list
val context_info : context -> commit_info
val checkout : index -> Commit_hash.t -> context option Lwt.t
val set_context : info:commit_info -> parents:Commit_hash.t list -> context -> Commit_hash.t -> bool Lwt.t
val context_tree : context -> tree
val make_context : index -> context
val update_context : context -> tree -> context
val add_bytes : batch -> bytes -> tree Lwt.t
module Snapshot : sig ... end

This type exposes the internal nodes used in irmin in order to use them during snapshot import and export.

val tree_iteri_unique : ?on_disk:bool -> index -> (Snapshot.t -> unit Lwt.t) -> tree -> int Lwt.t

tree_iteri_unique ?on_disk index f tree traverses tree, applying f to all inodes and contents.

f is called in post-order, that is f is first called on the leaves, and the last call to f is on the root of the tree.

The traversal order is stable.

The traversal skips objects that are structurally equal to objects that were already traversed. In other words, tree_iteri_unique internally uses a hash set in order to guarantee that all the objects passed to f don't hash the same way.

If on_disk is true (by default its false), it uses an on_disk index.

Returns the total number of elements visited.

type import
val v_import : ?in_memory:bool -> index -> import

v_import ?in_memory index creates an importer instance. If in_memory is true, the import will be fully in memory. in_memory is set to false by default.

val save_inode : index -> import -> Snapshot.t -> tree option Lwt.t

save_inode index importer elt saves elt to the store.

val close_import : import -> index -> unit

close importer close the importer instance.

OCaml

Innovation. Community. Security.