Mavryk_validation.Protocol_pluginmodule type T = sig ... endType of a protocol accompanied with its main plugin (aka the validation & mempool plugin).
module type RPC = sig ... endType of a protocol-specific RPC plug-in.
module No_plugin
(Proto : Mavryk_protocol_updater.Registered_protocol.T) :
T
with type operation_data = Proto.operation_data
and type operation = Proto.operation
and type Mempool.t = Proto.Mempool.t
and type Plugin.info = unitTo use when no registered plugin is found. This module is functional; it just misses on the smarter logic that a plugin can add on top of the protocol.
module type METRICS = sig ... endThis is a protocol specific module that is used to collect all the * protocol-specific metrics. This module * allows to decode protocol data payload and provide back basic * types that can be used as metrics.
module Undefined_metrics_plugin (P : sig ... end) : METRICSEmpty metrics module. All metrics are -1.
module type SHELL_HELPERS = sig ... endProtocol specific plugin to expose some helpers function that are helpful in scope of the Shell.
val register_validation_plugin : (module T) -> unitRegister a validation plugin for a specific protocol (according to its Proto.hash).
val register_rpc : (module RPC) -> unitRegisters a RPC plug-in for a specific protocol
val register_metrics : (module METRICS) -> unitRegister a metrics plugin module
val register_shell_helpers : (module SHELL_HELPERS) -> unitRegister a Shell_helpers plugin module
val proto_with_validation_plugin :
block_hash:Mavryk_base.TzPervasives.Block_hash.t ->
Mavryk_base.TzPervasives.Protocol_hash.t ->
(module T) Mavryk_base.TzPervasives.tzresult Lwt.tRetrieves the registered protocol with the provided hash and wraps it together with its validation plugin.
If no validation plugin has been registered for the protocol, then uses No_plugin which is functional, but not as smart as a protocol-specific plugin.
Returns the error Block_validator_errors.Unavailable_protocol when there is no registered protocol with the given hash.
The block_hash argument is only used as additional information for the potential aforementioned error.
val find_rpc : Mavryk_base.TzPervasives.Protocol_hash.t -> (module RPC) optionLooks for an rpc plug-in for a specific protocol.
val find_metrics :
Mavryk_base.TzPervasives.Protocol_hash.t ->
(module METRICS) optionLooks for a metrics plugin module for a specific protocol
val safe_find_metrics :
Mavryk_base.TzPervasives.Protocol_hash.t ->
(module METRICS) Lwt.tSame as find_metrics but returns Undefined_metrics_plugin if not found
val find_shell_helpers :
Mavryk_base.TzPervasives.Protocol_hash.t ->
(module SHELL_HELPERS) optionLooks for a shell helpers plugin module for a specific protocol