Module Mavryk_001_PtAtLas_test_helpers.Sc_rollup_helpers

val originated_rollup : Mavryk_raw_protocol_001_PtAtLas__Alpha_context.packed_operation -> Mavryk_raw_protocol_001_PtAtLas__Alpha_context.Contract.t
module Make_in_memory_context (Context : sig ... end) : sig ... end
module Wrong_in_memory_context : sig ... end
val genesis_commitment : boot_sector:string -> origination_level:Mavryk_raw_protocol_001_PtAtLas__Alpha_context.Raw_level.t -> Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Sc_rollup.Kind.t -> Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Sc_rollup.Commitment.t Lwt.t

Inbox message helpers.

Above Alpha_context.

Message is the combination of a message and its associated input.

message is used to:

  • Construct the protocol inbox, when message is `Message. The protocol adds `SOL and `EOL itself.
  • Construct the players' inboxes.

input is used to evaluate the players' inboxes.

type payloads_per_level = {
  1. messages : string list;
    (*

    List of external messages.

    *)
  2. payloads : Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Sc_rollup.Inbox_message.serialized list;
    (*

    List of external serialized messages.

    *)
  3. predecessor_timestamp : Mavryk_base.TzPervasives.Time.Protocol.t;
    (*

    predecessor timestamp of the Info_per_level.

    *)
  4. predecessor : Mavryk_base.TzPervasives.Block_hash.t;
    (*

    Predecessor of the Info_per_level.

    *)
  5. level : Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Raw_level.t;
  6. inputs : Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Sc_rollup.input list;
    (*

    List of all inputs for the level, to be read by a PVM.

    *)
}

Put as much information as possible in this record so it can be used in different setups: 1. Creating an inbox on the protocol-side, requires messages only. 2. Re-construct an inbox, requires payloads, timestamp, predecessor. 3. Evaluate inputs in a PVM, requires inputs

level is useful for (1) (2) (3).

val pp_input : Stdlib.Format.formatter -> Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Sc_rollup.input -> unit
val pp_message : Stdlib.Format.formatter -> message -> unit

Creates inputs based on string messages.

Transform the list of all inputs the PVM should read.

Wrap messages, predecessor_timestamp and predecessor of a level into a payloads_per_level .

An empty inbox level is a SOL,IPL and EOL.

val gen_payloads_for_levels : start_level:int -> max_level:int -> string QCheck2.Gen.t -> payloads_per_level list QCheck2.Gen.t

Below Alpha_context.

type message_repr = {
  1. input_repr : Mavryk_protocol_001_PtAtLas.Protocol.Sc_rollup_PVM_sig.input;
  2. message_repr : [ `SOL | `Message of string | `EOL ];
}

Message is the combination of a message and its associated input.

message is used to:

  • Construct the protocol inbox, when message is `Message. The protocol adds `SOL and `EOL itself.
  • Construct the players' inboxes.

input is used to evaluate the players' inboxes.

val pp_input_repr : Stdlib.Format.formatter -> Mavryk_protocol_001_PtAtLas.Protocol.Sc_rollup_PVM_sig.input -> unit
val pp_message_repr : Stdlib.Format.formatter -> message_repr -> unit

An empty inbox level is a SOL,IPL and EOL.

Creates input_reprs based on string message_reprs.

val wrap_message_reprs_repr : Mavryk_protocol_001_PtAtLas.Protocol.Raw_level_repr.raw_level -> string list -> message_repr list

Transform message_reprs into input_reprs and wrap them between SOL and EOL.

val gen_message_reprs_for_levels_repr : start_level:int -> max_level:int -> string QCheck2.Gen.t -> (Mavryk_protocol_001_PtAtLas.Protocol.Raw_level_repr.raw_level * message_repr list) list QCheck2.Gen.t
module Payloads_histories : sig ... end
val get_payloads_history : 'a Payloads_histories.t -> Payloads_histories.key -> 'b Lwt.t
val list_of_inputs_from_list_of_messages : message list list -> Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Sc_rollup.input list list
val dumb_init : Mavryk_raw_protocol_001_PtAtLas__Alpha_context.Raw_level.t -> Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Sc_rollup.Inbox.t
module Node_inbox : sig ... end
module Protocol_inbox : sig ... end
module Protocol_inbox_with_ctxt : sig ... end
val tick_of_int_exn : ?__LOC__:string -> int -> Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Sc_rollup.Tick.t
module type PVM_eval = sig ... end
module Make_PVM_eval (PVM : sig ... end) : PVM_eval with type context = PVM.context and type state = PVM.state
module Arith_pvm_eval : sig ... end
module Wasm_pvm_eval : sig ... end
val make_pvm_with_context_and_state : (module Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Sc_rollup.PVM.S with type context = 'context and type state = 'state) -> state:'state0 -> context:'context0 -> reveal: (Mavryk_raw_protocol_001_PtAtLas.Sc_rollup_reveal_hash.t -> string option Mavryk_protocol_environment_001_PtAtLas.Lwt.t) -> inbox:Node_inbox.t -> unit -> (module Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Sc_rollup.Proof.PVM_with_context_and_state)