package octez-proto-libs

  1. Overview
  2. Docs
Octez protocol libraries

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-18.1.tar.gz
sha256=aa2f5bc99cc4ca2217c52a1af2a2cdfd3b383208cb859ca2e79ca0903396ca1d
sha512=d68bb3eb615e3dcccc845fddfc9901c95b3c6dc8e105e39522ce97637b1308a7fa7aa1d271351d5933febd7476b2819e1694f31198f1f0919681f1f9cc97cb3a

doc/octez-proto-libs.protocol-environment/Tezos_protocol_environment/Proxy_context/index.html

Module Tezos_protocol_environment.Proxy_contextSource

This module is the location where the proxy tweaks the behavior of a vanilla client. A regular mockup client uses a Memory_context in place of this implementation. Compared to Memory_context, this instance features a Proxy_Delegate.T which under the hood relies on Proxy_getter.

Other *_context modules of Tezos_protocol_environment, i.e. siblings of this file, are backed by different type of values coming from Tezos_context. This file is backed by M.t below, which is a thin layer over Tezos_memory_context.Context. Because of that, this instance of Tezos_protocol_environment is close to the Memory_context one.

Whereas Memory_context is a regular recursive map, Proxy_context obtains values by delegating to endpoints when receiving requests. Hence, right after having created an empty value with an instance of Proxy_Delegate.T, this value behaves as the distant endpoint it delegates to.

Sourcemodule M : sig ... end

The module by which to parameterize Environment_context.Context.kind below.

Sourcetype Tezos_protocol_environment__.Environment_context.Context.kind +=
  1. | Context : M.t Tezos_protocol_environment__.Environment_context.Context.kind

The additional kind identifying Proxy_context values. Used to detect at runtime when a proxy context is expected, to disambiguate from other kinds.

Sourceval empty : Proxy_delegate.t option -> Tezos_protocol_environment__.Environment_context.Context.t

Constructs an empty context, possibly giving the delegate (the function querying the endpoint) right away. Otherwise set it later with set delegate

OCaml

Innovation. Community. Security.