The protocol can be thought of as the set of rules that nodes in the network agree to follow, and this versioning system helps nodes to keep track of which set of rules they are adhering to and also allows for the decentralized updating of the protocol parameters without requiring a hard fork.

Hierarchy

  • ProtocolVersion

Constructors

  • Initializes a new instance of the ProtocolVersion class.

    Parameters

    • major: number

      Changes when there are significant alterations to the protocol that are not backward compatible. It would require nodes to upgrade to continue participating in the network.

    • minor: number

      Reflects backward-compatible changes. Nodes running an older version can still communicate with nodes running the updated version, but they might not take advantage of new features.

    Returns Serialization.ProtocolVersion

Properties

#major: number
#minor: number
#originalBytes: undefined | HexBlob = undefined

Methods

  • Gets the major component of the version.

    This number is increased when there are changes that are significant alterations to the protocol that are not backward compatible.

    It would require nodes to upgrade to continue participating in the network.

    Returns

    The major version.

    Returns number

  • Gets the minor component of the version.

    This number is increased when changes are backward-compatible.

    Nodes running an older version can still communicate with nodes running the updated version, but they might not take advantage of new features.

    Returns

    The minor version.

    Returns number

Generated using TypeDoc