Mavryk_alpha_test_helpers.Sc_rollup_helpers
module Arith_pvm = Mavryk_smart_rollup_alpha.Pvm_in_memory.Arith
module Wasm_pvm = Mavryk_smart_rollup_alpha.Pvm_in_memory.Wasm
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_alpha__Alpha_context.Raw_level.t ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.Kind.t ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.Commitment.t Lwt.t
val genesis_commitment_raw :
boot_sector:string ->
origination_level:Mavryk_protocol_alpha.Protocol.Raw_level_repr.raw_level ->
Mavryk_protocol_alpha.Protocol.Sc_rollups.Kind.t ->
Mavryk_protocol_alpha.Protocol.Sc_rollup_commitment_repr.t Lwt.t
Alpha_context
.val make_external_inbox_message :
string ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.Inbox_message.serialized
val make_external_input :
?inbox_level:Mavryk_protocol_alpha.Protocol.Alpha_context.Raw_level.raw_level ->
?message_counter:Mavryk_protocol_environment_alpha.Z.t ->
string ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.input
val make_sol :
inbox_level:Mavryk_protocol_alpha.Protocol.Alpha_context.Raw_level.raw_level ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.input
val make_eol :
inbox_level:Mavryk_protocol_alpha.Protocol.Alpha_context.Raw_level.raw_level ->
message_counter:Mavryk_protocol_environment_alpha.Z.t ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.input
val make_info_per_level :
inbox_level:Mavryk_protocol_alpha.Protocol.Alpha_context.Raw_level.raw_level ->
predecessor_timestamp:Mavryk_protocol_environment_alpha.Time.t ->
predecessor:Mavryk_protocol_environment_alpha.Block_hash.t ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.input
val make_protocol_migration :
inbox_level:Mavryk_protocol_alpha.Protocol.Alpha_context.Raw_level.raw_level ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.input
type message = {
input : Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.input;
message : [ `SOL
| `Info_per_level of
Mavryk_protocol_alpha.Protocol.Alpha_context.Timestamp.t
* Mavryk_base.TzPervasives.Block_hash.t
| `Message of string
| `EOL ];
}
Message is the combination of a message
and its associated input
.
message
is used to:
message
is `Message
. The protocol adds `SOL
and `EOL
itself.input
is used to evaluate the players' inboxes.
type payloads_per_level = {
messages : string list;
List of external messages.
*)payloads : Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.Inbox_message.serialized
list;
List of external serialized messages.
*)predecessor_timestamp : Mavryk_base.TzPervasives.Time.Protocol.t;
predecessor timestamp of the Info_per_level
.
predecessor : Mavryk_base.TzPervasives.Block_hash.t;
Predecessor of the Info_per_level
.
level : Mavryk_protocol_alpha.Protocol.Alpha_context.Raw_level.t;
inputs : Mavryk_protocol_alpha.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_alpha.Protocol.Alpha_context.Sc_rollup.input ->
unit
val pp_message : Stdlib.Format.formatter -> message -> unit
val strs_to_inputs :
Mavryk_protocol_alpha.Protocol.Alpha_context.Raw_level.raw_level ->
string list ->
message list * Mavryk_protocol_environment_alpha.Z.t
Creates inputs based on string messages.
val make_inputs :
first_block:bool ->
Mavryk_protocol_environment_alpha.Time.t ->
Mavryk_protocol_environment_alpha.Block_hash.t ->
string list ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Raw_level.raw_level ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.input list
Transform the list of all inputs the PVM should read.
val predecessor_timestamp_and_hash_from_level :
Mavryk_protocol_alpha.Protocol.Alpha_context.Raw_level.raw_level ->
Mavryk_base.TzPervasives.Time.Protocol.t
* Mavryk_base.TzPervasives.Block_hash.t
val wrap_messages :
Mavryk_protocol_alpha.Protocol.Alpha_context.Raw_level.raw_level ->
?pred_info:
(Mavryk_base.TzPervasives.Time.Protocol.t
* Mavryk_base.TzPervasives.Block_hash.t) ->
string list ->
payloads_per_level
Wrap messages, predecessor_timestamp and predecessor of a level into a payloads_per_level
.
val make_empty_level :
?pred_info:
(Mavryk_base.TzPervasives.Time.Protocol.t
* Mavryk_base.TzPervasives.Block_hash.t) ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Raw_level.raw_level ->
payloads_per_level
An empty inbox level is a SOL,IPL and EOL.
val gen_messages :
?pred_info:
(Mavryk_base.TzPervasives.Time.Protocol.t
* Mavryk_base.TzPervasives.Block_hash.t) ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Raw_level.raw_level ->
string QCheck2.Gen.t ->
payloads_per_level QCheck2.Gen.t
val gen_payloads_for_levels :
start_level:int ->
max_level:int ->
string QCheck2.Gen.t ->
payloads_per_level list QCheck2.Gen.t
Alpha_context
.val message_serialize_repr :
Mavryk_protocol_alpha.Protocol.Sc_rollup_inbox_message_repr.t ->
Mavryk_protocol_alpha.Protocol.Sc_rollup_inbox_message_repr.serialized
val make_external_inbox_message_repr :
string ->
Mavryk_protocol_alpha.Protocol.Sc_rollup_inbox_message_repr.serialized
val make_internal_inbox_message_repr :
Mavryk_protocol_alpha.Protocol.Sc_rollup_inbox_message_repr.internal_inbox_message ->
Mavryk_protocol_alpha.Protocol.Sc_rollup_inbox_message_repr.serialized
val make_input_repr :
?inbox_level:Mavryk_protocol_alpha.Protocol.Raw_level_repr.raw_level ->
?message_counter:Mavryk_protocol_environment_alpha.Z.t ->
Mavryk_raw_protocol_alpha.Sc_rollup_inbox_message_repr.serialized ->
Mavryk_protocol_alpha.Protocol.Sc_rollup_PVM_sig.input
val make_external_input_repr :
?inbox_level:Mavryk_protocol_alpha.Protocol.Raw_level_repr.raw_level ->
?message_counter:Mavryk_protocol_environment_alpha.Z.t ->
string ->
Mavryk_protocol_alpha.Protocol.Sc_rollup_PVM_sig.input
val make_sol_repr :
inbox_level:Mavryk_protocol_alpha.Protocol.Raw_level_repr.raw_level ->
Mavryk_protocol_alpha.Protocol.Sc_rollup_PVM_sig.input
val make_eol_repr :
inbox_level:Mavryk_protocol_alpha.Protocol.Raw_level_repr.raw_level ->
message_counter:Mavryk_protocol_environment_alpha.Z.t ->
Mavryk_protocol_alpha.Protocol.Sc_rollup_PVM_sig.input
type message_repr = {
input_repr : Mavryk_protocol_alpha.Protocol.Sc_rollup_PVM_sig.input;
message_repr : [ `SOL | `Message of string | `EOL ];
}
Message is the combination of a message
and its associated input
.
message
is used to:
message
is `Message
. The protocol adds `SOL
and `EOL
itself.input
is used to evaluate the players' inboxes.
val pp_input_repr :
Stdlib.Format.formatter ->
Mavryk_protocol_alpha.Protocol.Sc_rollup_PVM_sig.input ->
unit
val pp_message_repr : Stdlib.Format.formatter -> message_repr -> unit
val make_empty_level_repr :
Mavryk_protocol_alpha.Protocol.Raw_level_repr.raw_level ->
Mavryk_protocol_alpha.Protocol.Raw_level_repr.raw_level * message_repr list
An empty inbox level is a SOL,IPL and EOL.
val strs_to_input_reprs_repr :
Mavryk_protocol_alpha.Protocol.Raw_level_repr.raw_level ->
string list ->
message_repr list * Mavryk_protocol_environment_alpha.Z.t
Creates input_reprs based on string message_reprs.
val wrap_message_reprs_repr :
Mavryk_protocol_alpha.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_alpha.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 inbox_message_of_input :
Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.input ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.inbox_message option
val payloads_from_messages :
message list ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.Inbox_message.serialized
list
val first_after :
payloads_per_level list ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Raw_level.t ->
Z.t ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.inbox_message option
val list_of_inputs_from_list_of_messages :
message list list ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.input list list
val dumb_init :
Mavryk_raw_protocol_alpha__Alpha_context.Raw_level.t ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.Inbox.t
val dumb_init_repr :
Mavryk_raw_protocol_alpha.Raw_level_repr.t ->
Mavryk_protocol_alpha.Protocol.Sc_rollup_inbox_repr.t
val origination_op :
?force_reveal:bool ->
?counter:Mavryk_protocol_alpha.Protocol.Alpha_context.Manager_counter.t ->
?fee:Mavryk_protocol_alpha.Protocol.Alpha_context.Tez.t ->
?gas_limit:Op.gas_limit ->
?storage_limit:Z.t ->
?boot_sector:string ->
?parameters_ty:string ->
?whitelist:Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.Whitelist.t ->
Context.t ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Contract.t ->
Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.Kind.t ->
(Mavryk_protocol_alpha.Protocol.Alpha_context.packed_operation
* Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.t)
Mavryk_base.TzPervasives.tzresult
Lwt.t
module Node_inbox : sig ... end
module Protocol_inbox : sig ... end
val construct_node_and_protocol_inbox :
?inbox_creation_level:
Mavryk_protocol_alpha.Protocol.Alpha_context.Raw_level.raw_level ->
?genesis_predecessor_timestamp:Mavryk_base.TzPervasives.Time.Protocol.t ->
?genesis_predecessor:Mavryk_base.TzPervasives.Block_hash.t ->
payloads_per_level list ->
(Node_inbox.t
* Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.Inbox.t,
Mavryk_base.TzPervasives.tztrace)
Stdlib.result
module Protocol_inbox_with_ctxt : sig ... end
val is_reveal_enabled_default :
Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.is_reveal_enabled
val tick_of_int_exn :
?__LOC__:string ->
int ->
Mavryk_protocol_alpha.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_alpha.Protocol.Alpha_context.Sc_rollup.PVM.S
with type context = 'context
and type state = 'state) ->
state:'state0 ->
context:'context0 ->
reveal:
(Mavryk_raw_protocol_alpha.Sc_rollup_reveal_hash.t ->
string option Mavryk_protocol_environment_alpha.Lwt.t) ->
inbox:Node_inbox.t ->
unit ->
(module Mavryk_protocol_alpha.Protocol.Alpha_context.Sc_rollup.Proof.PVM_with_context_and_state)