package octez-proto-libs

  1. Overview
  2. Docs
type shell_header = Tezos_base.TzPervasives.Block_header.shell_header = {
  1. level : Int32.t;
    (*

    Height of the block, from the genesis block.

    *)
  2. proto_level : int;
    (*

    Number (uint8) of protocol changes since genesis modulo 256.

    *)
  3. predecessor : Block_hash.t;
    (*

    Hash of the preceding block.

    *)
  4. timestamp : Time.t;
    (*

    Timestamp at which the block is claimed to have been created.

    *)
  5. validation_passes : int;
    (*

    Number (uint8) of validation passes (also number of lists of operations).

    *)
  6. operations_hash : Operation_list_list_hash.t;
    (*

    Hash of the list of lists (actually root hashes of merkle trees) of operations included in the block. There is one list of operations per validation pass.

    *)
  7. fitness : Bytes.t list;
    (*

    A sequence of sequences of unsigned bytes, ordered by length and then lexicographically. It represents the claimed fitness of the chain ending in this block.

    *)
  8. context : Context_hash.t;
    (*

    Hash of the state of the context after application of this block.

    *)
}
val shell_header_encoding : shell_header Data_encoding.t
type t = Tezos_base.TzPervasives.Block_header.t = {
  1. shell : shell_header;
  2. protocol_data : bytes;
}
include S.HASHABLE with type t := t and type hash := Block_hash.t
include S.T with type t := t
include Compare.S with type t := t
val (=) : t -> t -> bool

x = y iff compare x y = 0

val (<>) : t -> t -> bool

x <> y iff compare x y <> 0

val (<) : t -> t -> bool

x < y iff compare x y < 0

val (<=) : t -> t -> bool

x <= y iff compare x y <= 0

val (>=) : t -> t -> bool

x >= y iff compare x y >= 0

val (>) : t -> t -> bool

x > y iff compare x y > 0

val compare : t -> t -> int

compare an alias for the functor parameter's compare function

val equal : t -> t -> bool

equal x y iff compare x y = 0

val max : t -> t -> t

max x y is x if x >= y otherwise it is y

val min : t -> t -> t

min x y is x if x <= y otherwise it is y

val pp : Format.formatter -> t -> unit
val encoding : t Data_encoding.t
val to_bytes : t -> bytes
val of_bytes : bytes -> t option
val hash : t -> Block_hash.t
val hash_raw : bytes -> Block_hash.t
OCaml

Innovation. Community. Security.