Kagome
Polkadot Runtime Engine in C++17
kagome::primitives::Version Struct Reference

#include <version.hpp>

Collaboration diagram for kagome::primitives::Version:

Public Member Functions

bool operator== (const Version &rhs) const
 
bool operator!= (const Version &rhs) const
 

Public Attributes

std::string spec_name
 
std::string impl_name
 
uint32_t authoring_version = 0u
 authoring_version is the version of the authorship interface More...
 
uint32_t spec_version = 0u
 
uint32_t impl_version = 0u
 
ApisVec apis
 List of supported API "features" along with their versions. More...
 
uint32_t transaction_version = 1u
 
uint8_t state_version = 0u
 Version of the state implementation used by this runtime. More...
 

Detailed Description

Runtime version. This should not be thought of as classic Semver (major/minor/tiny). This triplet have different semantics and mis-interpretation could cause problems. In particular: bug fixes should result in an increment of spec_version and possibly authoring_version, absolutely not impl_version since they change the semantics of the runtime.

Definition at line 46 of file version.hpp.

Member Function Documentation

bool kagome::primitives::Version::operator!= ( const Version rhs) const
inline

Definition at line 94 of file version.hpp.

bool kagome::primitives::Version::operator== ( const Version rhs) const
inline

Definition at line 85 of file version.hpp.

Member Data Documentation

ApisVec kagome::primitives::Version::apis

List of supported API "features" along with their versions.

Definition at line 78 of file version.hpp.

uint32_t kagome::primitives::Version::authoring_version = 0u

authoring_version is the version of the authorship interface

Definition at line 63 of file version.hpp.

std::string kagome::primitives::Version::impl_name

Name of the implementation of the spec. This is of little consequence for the node and serves only to differentiate code of different implementation teams. For this codebase, it will be kagome. If there were a non-Rust implementation of the Polkadot runtime (e.g. C++), then it would identify itself with an accordingly different impl_name.

Definition at line 60 of file version.hpp.

uint32_t kagome::primitives::Version::impl_version = 0u

Definition at line 75 of file version.hpp.

std::string kagome::primitives::Version::spec_name

Identifies the different Substrate runtimes. There'll be at least polkadot and node.

Definition at line 51 of file version.hpp.

uint32_t kagome::primitives::Version::spec_version = 0u

Version of the implementation of the specification. Nodes are free to ignore this; it serves only as an indication that the code is different; as long as the other two versions are the same then while the actual code may be different, it is nonetheless required to do the same thing. Non-consensus-breaking optimizations are about the only changes that could be made which would result in only the impl_version changing.

Definition at line 73 of file version.hpp.

uint8_t kagome::primitives::Version::state_version = 0u

Version of the state implementation used by this runtime.

Definition at line 83 of file version.hpp.

uint32_t kagome::primitives::Version::transaction_version = 1u

Definition at line 80 of file version.hpp.


The documentation for this struct was generated from the following file: