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. node_ctxt : Node_context.ro;
  2. ctxt : Context.ro;
  3. inbox_level : int32;
  4. state : Context.tree;
  5. reveal_map : string Utils.Reveal_hash_map.t option;
  6. nb_messages_inbox : int;
  7. level_position : level_position;
  8. info_per_level : info_per_level;
  9. 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 -> ?log_kernel_debug_file:string -> Layer1.head -> t Tezos_base.TzPervasives.tzresult Lwt.t

start_simulation node_ctxt ~reveal_map ?log_kernel_debug_file block starts a new simulation on top of block, i.e. for an hypothetical new inbox (level). If log_kernel_debug_file is provided, kernel logs will be written to node_ctxt.data_dir/simulation_kernel_logs/log_kernel_debug_file.

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

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

val end_simulation : t -> (t * Z.t) Tezos_base.TzPervasives.tzresult Lwt.t

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

OCaml

Innovation. Community. Security.