There is an interface SoftwareVersion which has three implementations: BasicSoftwareVersion, PlatformSoftwareVersion, and HederaSoftwareVersion. The difference between PlatformSoftwareVersion and HederaSoftwareVersion is that the latter also has an HAPI version. These classes are self-serializable, so we were able to work around the fact that they are serialized differently. Now, when we need to represent PlatformState as a protobuf object, they become incompatible. There is no straightforward way to convert HederaSoftwareVersion into a PBJ SemanticVersion, as HederaSoftwareVersion is represented with two objects of the SemanticVersion type.
The solution to this discrepancy:
Create PlatformSoftwareVersion in HAPI repository that consists of two SemanticVersion objects - representing the platform version and HAPI version
Change the type of PlatformState#creationSoftwareVersion from SemanticVersion to PlatformSoftwareVersion
This is a follow-up for https://github.com/hashgraph/hedera-services/issues/13124
There is an interface
SoftwareVersion
which has three implementations:BasicSoftwareVersion
,PlatformSoftwareVersion
, andHederaSoftwareVersion
. The difference betweenPlatformSoftwareVersion
andHederaSoftwareVersion
is that the latter also has an HAPI version. These classes are self-serializable, so we were able to work around the fact that they are serialized differently. Now, when we need to representPlatformState
as a protobuf object, they become incompatible. There is no straightforward way to convertHederaSoftwareVersion
into a PBJSemanticVersion
, asHederaSoftwareVersion
is represented with two objects of theSemanticVersion
type.The solution to this discrepancy:
PlatformSoftwareVersion
in HAPI repository that consists of twoSemanticVersion
objects - representing the platform version and HAPI versionPlatformState#creationSoftwareVersion
fromSemanticVersion
toPlatformSoftwareVersion