package octez-shell-libs

  1. Overview
  2. Docs
Octez shell libraries

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-octez-v20.1.tag.bz2
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65

doc/octez-shell-libs.shell-context/Tezos_shell_context/Proxy_delegate_maker/index.html

Module Tezos_shell_context.Proxy_delegate_makerSource

Sourceval of_memory_tree : Tezos_context_memory.Context.tree -> Tezos_protocol_environment.Proxy_delegate.t

of_memory_tree t creates a delegate that is backed by the tree t. This is an alternative to delegating to a distant endpoint by doing RPCs (as done in the client, see e.g. proto_alpha/lib_client/proxy.ml). As delegates created by of_memory_tree are backed by an in-memory tree, they are as fast as they can be.

This constructor is easier to use than of_memory_context, because it requires only a tree of data; not a context. This constructor is typically useful for tests.

Sourceval of_memory_context : Tezos_context_memory.Context.t -> Tezos_protocol_environment.Proxy_delegate.t

of_memory_context m creates a delegate that is backed by the tree underlying m. This is an alternative to delegating to a distant endpoint by doing RPCs (as done in the client, see e.g. proto_alpha/lib_client/proxy.ml). As delegates created by of_memory_context are backed by an in-memory tree, they are as fast as they can be.

This constructor is slightly harder to use than of_memory_tree, because it requires a full-fledged context instead of a tree (a context contains a tree, so a context is harder to obtain).

Sourceval make_index : context_path:string -> Tezos_context.Context.index Lwt.t

make_index context_path creates an index that is suitable for being passed to of_index.

Sourceval of_index : index:Tezos_context.Context.index -> Tezos_crypto.Hashed.Context_hash.t -> Tezos_protocol_environment.Proxy_delegate.t Tezos_base.TzPervasives.tzresult Lwt.t

of_index index ctxt_hash creates a delegate that checkouts the given index at the given ctxt_hash. It fails in the error monad if the hash is unknown. Otherwise it returns a delegate that queries the tree of data at this hash.

This constructor is the hardest to use of all of this file, because to obtain an index, you need a full-fledged context on disk.

OCaml

Innovation. Community. Security.