Octez_smart_rollup_node.Interpreterval process_head :
(module Protocol_plugin_sig.PARTIAL) ->
_ Node_context.t ->
< index : _
; state : Tezos_layer2_store.Access_mode.rw >
Tezos_layer2_store.Context.t ->
predecessor:Layer1.head ->
Layer1.head ->
(Octez_smart_rollup.Inbox.t * string list) ->
(int * int64 * Z.t) Tezos_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. NOTE: ctxt is modified in place by process_head. It is the responsibility of the caller to make a copy and revert if needed in case of error.
The genesis state can be retrieved in different variants depending on whether unsafe patches should be applied. The permission parameter tracks the access mode of the underlying PVM state.
Tag for a genesis state with patches applied.
Tag for a genesis state without patches (the original boot sector).
type ('a, 'b) both =
constraint 'a = [< `Read | `Write Read ]
constraint 'b = [< `Read | `Write Read ]Tag for requesting both the patched and unpatched genesis states.
type _ genesis_state = | Patched : 'perm Tezos_layer2_store.Context.pvmstate -> 'perm patched
genesis_stateThe PVM state after applying unsafe patches.
*)| Unpatched : 'perm Tezos_layer2_store.Context.pvmstate -> 'perm unpatched
genesis_stateThe original PVM state from the boot sector.
*)| Both : {patched : 'perm_patched Tezos_layer2_store.Context.pvmstate;original : 'perm_orig Tezos_layer2_store.Context.pvmstate;} -> ('perm_orig, 'perm_patched) both genesis_stateBoth variants at once, each with independently tracked permissions.
*)A genesis PVM state, parameterized by the requested variant.
type _ genesis_state_mode = | Patched : 'a Tezos_layer2_store.Access_mode.t -> 'a patched genesis_state_modeRequest only the patched state.
*)| Unpatched : 'a Tezos_layer2_store.Access_mode.t -> 'a unpatched
genesis_state_modeRequest only the unpatched state.
*)| Both : 'a Tezos_layer2_store.Access_mode.t
* 'b Tezos_layer2_store.Access_mode.t -> ('a, 'b) both genesis_state_modeRequest both states with potentially different access permissions.
*)Selects which genesis state variant to compute and with what access permissions.
val genesis_state :
'm genesis_state_mode ->
(module Protocol_plugin_sig.PARTIAL) ->
?genesis_block:Tezos_base.TzPervasives.Block_hash.t ->
?empty:Tezos_layer2_store.Access_mode.rw Tezos_layer2_store.Context.pvmstate ->
_ Node_context.t ->
'm genesis_state Tezos_base.TzPervasives.tzresult Lwt.tgenesis_state mode plugin ?genesis_block ?empty node_ctxt the PVM state at the genesis block with and/or without patches applied depending on mode.
val state_of_tick :
(module Protocol_plugin_sig.PARTIAL) ->
_ Node_context.t ->
Pvm_plugin_sig.state_cache ->
?start_state:
(Fuel.Accounted.t,
Tezos_layer2_store.Access_mode.rw Tezos_layer2_store.Context.pvmstate)
Pvm_plugin_sig.eval_state ->
tick:Z.t ->
int32 ->
(Fuel.Accounted.t,
Tezos_layer2_store.Access_mode.rw Tezos_layer2_store.Context.pvmstate)
Pvm_plugin_sig.eval_state
option
Tezos_base.TzPervasives.tzresult
Lwt.tstate_of_tick plugin node_ctxt cache ?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) ->
< context : 'a ; store : _ > Node_context.t ->
< index : 'a ; state : 'b > Tezos_layer2_store.Context.t ->
Layer1.head ->
'b Tezos_layer2_store.Context.pvmstate Tezos_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.