package tezos-base

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Distributed_db protocol version.

module Name : sig ... end
type t = private int

An abstract version number for the high-level Distributed_db messages.

val equal : t -> t -> bool
val compare : t -> t -> int
val pp : Format.formatter -> t -> unit
val encoding : t Data_encoding.t
val zero : t
val one : t

This version adds the following messages:

  • Get_checkpoint/Checkpoint for fetching the checkpoint of a peer.
  • Get_protocol_branch/Protocol_branch for fetching the branch of a peer given a protocol level.
  • Get_predecessor_header/Predecessor_header for fetching a block header given an offset from a block hash.

Those messages can help to implement a faster bootstrap.

val two : t

This version adds no messages. However, the semantics of the message Current_head is changed. In particular, a peer can send a message Current_head which was only prechecked but the block was not validated yet. This means that a peer which sends a Current_head message with a block for which the precheck function will return true but is invalid should not be kicked anymore.

OCaml

Innovation. Community. Security.