Split the interface version into protocol and pre-release-version (curr) #212
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Split the 64bit interface version field in the env meta into two separate fields for the data it contains.
Why
The interface version is a 64bit value that contains two 32 bit values, the protocol version and the prerelease version.
In formal releases the prerelease version is always zero.
Because the values are joined together in the 64bit value it renders are a confusing large number that developers don’t understand. Humans can’t see a large integer and know that it actually means “protocol 21”.
While there has been some attempt to render the larger number as its components in developer tooling like the CLI, developers end up looking at the code decoded in other formats based off the xdr structure, such as the json equivalent, and seeing the large integers still.
There was discussion in the following thread about splitting the components into their own env meta key value pairs, and in hindsight that’s how we should have implemented it in the first place:
However, we can get 80% of the benefit by changing the xdr structure to interpret the existing bytes as two distinct fields. It’ll be backwards compatible.
Visible difference in developer tooling:
Before:
After: