Octez_smart_rollup_node.SimulationSourcetype info_per_level = {predecessor_timestamp : Tezos_base.Time.Protocol.t;predecessor : Tezos_base.TzPervasives.Block_hash.t;}type t = {ctxt : Context.ro;inbox_level : int32;state : Context.tree;reveal_map : string Octez_smart_rollup_node.Utils.Reveal_hash_map.t option;nb_messages_inbox : int;level_position : level_position;info_per_level : info_per_level;plugin : (module Protocol_plugin_sig.S);}Type of the state for a simulation.
val start_simulation :
Node_context.ro ->
reveal_map:string Octez_smart_rollup_node.Utils.Reveal_hash_map.t option ->
Layer1.head ->
t Tezos_base.TzPervasives.tzresult Lwt.tstart_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.tsimulate_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.