package tezos-tx-rollup-015-PtLimaPt

  1. Overview
  2. Docs

Types for L2 block and header

Hash with b58check encoding BTx(53), for hashes of L2 block headers

type hash = Hash.t

Alias for block (header) hashes

type header = {
  1. level : level;
    (*

    The level of the L2 block

    *)
  2. tezos_block : Tezos_base.TzPervasives.Block_hash.t;
    (*

    The Tezos block on which this L2 block in anchored, i.e. the Tezos block in which the inbox was sent

    *)
  3. predecessor : hash option;
    (*

    The hash predecessor L2 block

    *)
  4. context : Tezos_protocol_015_PtLimaPt.Protocol.Tx_rollup_l2_context_hash.t;
    (*

    The hash of the context resulting of the application of the L2 block's inbox

    *)
  5. commitment : Tezos_protocol_015_PtLimaPt.Protocol.Alpha_context.Tx_rollup_commitment_hash.t;
    (*

    The hash of the commitment for the inbox of this block

    *)
}

Type of L2 block headers

type 'inbox block = {
  1. hash : hash;
  2. header : header;
  3. inbox : 'inbox;
  4. commitment : Tezos_protocol_015_PtLimaPt.Protocol.Alpha_context.Tx_rollup_commitment.Full.t;
}

L2 blocks are composed of a header and an inbox. The inbox contains the actual messages. The hash in the block structure corresponds the hash of the header.

type t = Inbox.t block
type commitment_included_info = {
  1. block : Tezos_base.TzPervasives.Block_hash.t;
  2. operation : Tezos_base.TzPervasives.Operation_hash.t;
}
type metadata = {
  1. commitment_included : commitment_included_info option;
    (*

    Contains information if the commitment for this block has been included on L1

    *)
  2. finalized : bool;
    (*

    Flag to signal if the commitment for this block is finalized on L1

    *)
}

Metadata for the block

Encoding

val level_to_string : level -> string

Hashing

val hash_header : header -> hash

Returns the hash of an L2 block header

OCaml

Innovation. Community. Security.