Module Tezos_version.Octez_node_version

Node version information.

This module provides several information regarding the node's version:

type t = {
  1. version : Version.t;
  2. network_version : Network_version.t;
  3. commit_info : commit_info option;
}
and commit_info = {
  1. commit_hash : string;
  2. commit_date : string;
}
val namespace : string

the namespace used for the node metrics

val version_encoding : Version.t Data_encoding.t
val commit_info_encoding : commit_info Data_encoding.t
val commit_info_pp : Stdlib.Format.formatter -> commit_info -> unit
val commit_info_pp_short : Stdlib.Format.formatter -> commit_info -> unit
val commit_info_equivalent : commit_info -> commit_info -> bool
val encoding : t Data_encoding.t
val partially_compare : Version.t -> commit_info option -> Version.t -> commit_info option -> int option

partially_compare v1 c1 v2 c2 is similar to compare like function but returns None when versions are not comparable. If v1, c1 and v2, c2 are comparable and 1 is older than 2, Some x with x<0 is returned.

v1, c1 and v2, c2 are comparable if:

  • they have the same product and
  • they are Beta, RC or Release or
  • they are Dev, Beta_dev or RC_dev and
  • have commit info and
  • version and commit info are equal. If v1 and v2 are equal, but c1 and c2 are not then they are not comparable.

c1 and c2 are used only for equality. If the hash of c1 or c2 is a prefix or equal to the other one, they are considered as equal.

To determine which version is more recent or old:

  • major has the priority on minor
  • minor has priority on additional_info
  • Beta is older than RC
  • RC is older than Release