Skip to content

Definition of the version field in OneKey data structures & change type to a positive byte data type #193

@jwrosewell

Description

@jwrosewell

The documentation contains multiple definitions for the "version" field of the signature.

Identity Response - "The type of contracting party in the PAF ecosystem"
Identifier and preferences - "A version number made of a "major" and a "minor" version numbers. To be detailed."

Now that we're approaching live deployments the meaning of the version field is becoming more important and should be defined consistently across the data model. It should reference a version of this documentation which describes the fields and how they are populated and used. It should not relate to any other considerations.

This is also an opportunity to optimise the data model by using a single positive byte between 1 and 255 to represent the version.

Where the data is stored as JSON there will be no impact to the number of bytes consumed. "0.1" uses three bytes. 255, the largest version available, would also use 3 bytes. Where the data is stored as a byte array then 1 byte will be needed compared to 4 bytes for the equivalent string encoding. When considering data consumption and overall performance, and the number of times this field will appear in transactions the saving could be significant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions