Mavkit_smart_rollup_node.Interpreterval process_head :
(module Protocol_plugin_sig.PARTIAL) ->
Node_context.rw ->
'a Mavryk_layer2_store.Context.t ->
predecessor:Layer1.head ->
Layer1.head ->
(Mavkit_smart_rollup.Inbox.t * string list) ->
('a Mavryk_layer2_store.Context.t * int * int64 * Z.t)
Mavryk_base.TzPervasives.tzresult
Lwt.tprocess_head plugin node_ctxt ctxt ~predecessor head (inbox, messages) interprets the messages associated with a head (where predecessor is the predecessor of head in the L1 chain). This requires the inbox to be updated beforehand. It returns (ctxt, num_messages, num_ticks, tick) where ctxt is the updated layer 2 context (with the new PVM state), num_messages is the number of messages, num_ticks is the number of ticks taken by the PVM for the evaluation and tick is the tick reached by the PVM after the evaluation.
val genesis_state :
(module Protocol_plugin_sig.PARTIAL) ->
?genesis_block:Mavryk_base.TzPervasives.Block_hash.t ->
_ Node_context.t ->
(Mavryk_layer2_store.Context.pvmstate * original_genesis_state)
Mavryk_base.TzPervasives.tzresult
Lwt.tgenesis_state plugin ?genesis_block node_ctxt returns a pair s1, s2 where s1 is the PVM state at the genesis block and s2 is the genesis state without any patches applied. s2 is meant to be used to compute the genesis commitment. If there are no unsafe patches for the rollup s2 is the same as s1.
val state_of_tick :
(module Protocol_plugin_sig.PARTIAL) ->
Node_context.rw ->
?start_state:Fuel.Accounted.t Pvm_plugin_sig.eval_state ->
tick:Z.t ->
int32 ->
Fuel.Accounted.t Pvm_plugin_sig.eval_state option
Mavryk_base.TzPervasives.tzresult
Lwt.tstate_of_tick plugin node_ctxt ?start_state ~tick level returns Some
state for a given tick if this tick happened before level and where state is the PVM evaluation state before tick happened. Otherwise, returns None. If provided, the evaluation is resumed from start_state.
val state_of_head :
(module Protocol_plugin_sig.PARTIAL) ->
'a Node_context.t ->
'a Mavryk_layer2_store.Context.t ->
Layer1.head ->
Mavryk_layer2_store.Context.pvmstate Mavryk_base.TzPervasives.tzresult Lwt.tstate_of_head plugin node_ctxt ctxt head returns the state corresponding to the block head, or the state at rollup genesis if the block is before the rollup origination.