package octez-smart-rollup-node-lib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type level_position =
  1. | Start
  2. | Middle
  3. | End
type info_per_level = {
  1. predecessor_timestamp : Tezos_base.Time.Protocol.t;
  2. predecessor : Tezos_base.TzPervasives.Block_hash.t;
}
type t = {
  1. ctxt : Context.ro;
  2. inbox_level : int32;
  3. state : Context.tree;
  4. reveal_map : string Utils.Reveal_hash_map.t option;
  5. nb_messages_inbox : int;
  6. level_position : level_position;
  7. info_per_level : info_per_level;
  8. plugin : (module Protocol_plugin_sig.S);
}

Type of the state for a simulation.

val start_simulation : Node_context.ro -> reveal_map:string Utils.Reveal_hash_map.t option -> Layer1.head -> t Tezos_base.TzPervasives.tzresult Lwt.t

start_simulation node_ctxt reveal_source block starts a new simulation on top of block, i.e. for an hypothetical new inbox (level).

val simulate_messages : Node_context.ro -> t -> string list -> (t * Z.t) Tezos_base.TzPervasives.tzresult Lwt.t

simulate_messages node_ctxt sim messages runs a simulation of new messages in the given simulation (state) sim and returns a new simulation state, the remaining fuel (when ?fuel is provided) and the number of ticks that happened.

end_simulation node_ctxt sim adds and End_of_level message and marks the simulation as ended.

OCaml

Innovation. Community. Security.