package octez-proto-libs
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=c6df840ebbf115e454db949028c595bec558a59a66cade73b52a6d099d6fa4d4
sha512=d8aee903b9fe130d73176bc8ec38b78c9ff65317da3cb4f3415f09af0c625b4384e7498201fdb61aa39086a7d5d409d0ab3423f9bc3ab989a680cf444a79bc13
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.
The module by which to parameterize Environment_context.Context.kind below.
type Tezos_protocol_environment__.Environment_context.Context.kind += | 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.
val empty :
Proxy_delegate.t option ->
Tezos_protocol_environment__.Environment_context.Context.tConstructs an empty context, possibly giving the delegate (the function querying the endpoint) right away. Otherwise set it later with set delegate