Mavkit_smart_rollup_node.Protocol_pluginstype proto_plugin = (module Protocol_plugin_sig.S)val register : proto_plugin -> unitRegister a protocol plugin for a specific protocol to be used by the rollup node.
val registered_protocols :
unit ->
Mavryk_base.TzPervasives.Protocol_hash.t listReturns the list of registered protocols.
val last_registered : unit -> Mavryk_base.TzPervasives.Protocol_hash.tReturns the last registered protocol.
NOTE: This is the last protocol with which the rollup node is linked against, and this is decided only by the order in manifest/main.ml.
val proto_plugin_for_protocol :
Mavryk_base.TzPervasives.Protocol_hash.t ->
proto_plugin Mavryk_base.TzPervasives.tzresultReturn the protocol plugin for a given protocol (or an error if not supported).
val proto_plugin_for_level :
_ Node_context.t ->
int32 ->
proto_plugin Mavryk_base.TzPervasives.tzresult Lwt.tReturn the protocol plugin for a given level (or an error if not supported).
val proto_plugin_for_level_with_store :
_ Store.t ->
int32 ->
proto_plugin Mavryk_base.TzPervasives.tzresult Lwt.tReturn the protocol plugin for a given level (or an error if not supported).
val proto_plugin_for_block :
_ Node_context.t ->
Mavryk_base.TzPervasives.Block_hash.t ->
proto_plugin Mavryk_base.TzPervasives.tzresult Lwt.tReturn the protocol plugin for a given block (or an error if not supported).
val last_proto_plugin :
_ Node_context.t ->
proto_plugin Mavryk_base.TzPervasives.tzresult Lwt.tReturns the plugin corresponding to the last protocol seen by the rollup node.
val last_proto_plugin_opt :
_ Node_context.t ->
proto_plugin option Mavryk_base.TzPervasives.tzresult Lwt.tSame as last_proto_plugin but returns None if the rollup node has not registered any protocol information yet
These functions provide a way to retrieve constants in a safe manner, depending on the context.
val get_constants_of_level :
_ Node_context.t ->
int32 ->
Mavkit_smart_rollup.Rollup_constants.protocol_constants
Mavryk_base.TzPervasives.tzresult
Lwt.tRetrieve constants for a given level (values are cached).
val get_constants_of_block_hash :
_ Node_context.t ->
Mavryk_base.TzPervasives.Block_hash.t ->
Mavkit_smart_rollup.Rollup_constants.protocol_constants
Mavryk_base.TzPervasives.tzresult
Lwt.tRetrieve constants for a given block hash (values are cached).
val get_constants_of_protocol :
?level:int32 ->
_ Node_context.t ->
Mavryk_base.TzPervasives.Protocol_hash.t ->
Mavkit_smart_rollup.Rollup_constants.protocol_constants
Mavryk_base.TzPervasives.tzresult
Lwt.tRetrieve constants for a given protocol (values are cached). level, if provided, must be a level of the protocol.