package tezos-protocol-alpha

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Hash : sig ... end
module V1 : sig ... end

A commitment represents a claim about the state of the Inbox and PVM at some Inbox level.

Versioning, see Sc_rollup_data_version_sig.S for more information.

include Sc_rollup_data_version_sig.S with type t = V1.t
type versioned
val of_versioned : versioned -> V1.t
val to_versioned : V1.t -> versioned
include module type of V1 with type t = V1.t

A commitment represents a claim about the state of the Inbox and PVM at some Inbox level.

More formally, a commitment is a claim that:

  • assuming the PVM and Inbox are in a state implied by predecessor
  • the PVM consumes all the messages until inbox_level (not included) from the inbox ;
  • the PVM advances to the state compressed_state over number_of_ticks ticks.

Commitments are disjoint. The next correct commitment is a function of the previous machine state and Inbox.

compressed_state and number_of_ticks can be proven/disproven by PVM execution, or equivalently, by an interactive proof game between conflicting parties, such that a correct executor always wins the game.

type t = V1.t = {
  1. compressed_state : Sc_rollup_repr.State_hash.t;
  2. inbox_level : Raw_level_repr.t;
  3. predecessor : Hash.t;
  4. number_of_ticks : Sc_rollup_repr.Number_of_ticks.t;
}
val hash_uncarbonated : t -> Hash.t
val genesis_commitment : origination_level:Raw_level_repr.t -> genesis_state_hash:Sc_rollup_repr.State_hash.t -> t

genesis_commitment ~origination_level ~genesis_state_hash is the commitment that the protocol "publish" and "cement" when originating a new rollup. Each rollup have a different genesis_commitment because the compressed_state is computed after the boot sector is set. It has the following values:

where Sc_rollup_repr.Number_of_messages.min_value and Sc_rollup_repr.Number_of_ticks.min_value are equal to zero.

See Sc_rollup_storage.originate for the usage.

type genesis_info = {
  1. level : Raw_level_repr.t;
  2. commitment_hash : Hash.t;
}

The genesis of a rollup is characterized by the Tezos level of the rollup origination, and the hash of the commitment computed by the protocol to specialize the PVM initial state with the provided boot sector.

OCaml

Innovation. Community. Security.