package octez-l2-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module V1 : sig ... end
include Versioned_data.S with type t = V1.t
type versioned

The type of versioned values, including the one that is currently used and the previous ones.

val versioned_encoding : versioned Tezos_base.TzPervasives.Data_encoding.t

Encoding for versioned values, corresponds to the one defined by the protocol.

val of_versioned : versioned -> V1.t

Conversion to the currently used representation. In practice this function must provide ways to translate values of older versions to the latest one.

val to_versioned : V1.t -> versioned

Wrapping a current value as a versioned one.

include module type of V1 with type dissection_chunk = V1.dissection_chunk and type step = V1.step and type refutation = V1.refutation and type index = V1.index and type player = V1.player and type game_state = V1.game_state and type conflict = V1.conflict and type t = V1.t
type dissection_chunk = V1.dissection_chunk = {
  1. state_hash : State_hash.t option;
  2. tick : Z.t;
}
type step = V1.step =
  1. | Dissection of dissection_chunk list
  2. | Proof of string
type refutation = V1.refutation =
  1. | Start of {
    1. player_commitment_hash : Octez_smart_rollup.Commitment.Hash.t;
    2. opponent_commitment_hash : Octez_smart_rollup.Commitment.Hash.t;
    }
  2. | Move of {
    1. choice : Z.t;
    2. step : step;
    }
val dissection_chunk_encoding : dissection_chunk Tezos_base.TzPervasives.Data_encoding.t
val dissection_encoding : dissection_chunk list Tezos_base.TzPervasives.Data_encoding.t
val step_encoding : step Tezos_base.TzPervasives.Data_encoding.t
val refutation_encoding : refutation Tezos_base.TzPervasives.Data_encoding.t
val index_encoding : index Tezos_base.TzPervasives.Data_encoding.t
type player = V1.player =
  1. | Alice
  2. | Bob
type game_state = V1.game_state =
  1. | Dissecting of {
    1. dissection : dissection_chunk list;
    2. default_number_of_sections : int;
    }
  2. | Final_move of {
    1. agreed_start_chunk : dissection_chunk;
    2. refuted_stop_chunk : dissection_chunk;
    }
type t = V1.t = {
  1. turn : player;
  2. inbox_snapshot : Inbox.V1.history_proof;
  3. dal_snapshot : Dal.Slot_history.t;
  4. start_level : int32;
  5. inbox_level : int32;
  6. game_state : game_state;
}
type conflict = V1.conflict = {
  1. other : Tezos_crypto.Signature.Public_key_hash.t;
  2. their_commitment : Commitment.t;
  3. our_commitment : Commitment.t;
  4. parent_commitment : Octez_smart_rollup.Commitment.Hash.t;
}
val game_state_equal : game_state -> game_state -> bool
val player_encoding : player Tezos_base.TzPervasives.Data_encoding.t
val game_state_encoding : game_state Tezos_base.TzPervasives.Data_encoding.t
val encoding : t Tezos_base.TzPervasives.Data_encoding.t
val conflict_encoding : conflict Tezos_base.TzPervasives.Data_encoding.t
OCaml

Innovation. Community. Security.