package octez-smart-rollup-node-lib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

process_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.

type original_genesis_state =
  1. | Original of Tezos_layer2_store.Context.pvmstate

genesis_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.

state_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.

state_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.

OCaml

Innovation. Community. Security.