Split the interface version into protocol and pre-release-version (curr)#212
Merged
leighmcculloch merged 1 commit intocurrfrom Sep 1, 2024
Merged
Split the interface version into protocol and pre-release-version (curr)#212leighmcculloch merged 1 commit intocurrfrom
leighmcculloch merged 1 commit intocurrfrom
Conversation
anupsdf
approved these changes
Aug 31, 2024
github-merge-queue bot
pushed a commit
to stellar/rs-soroban-env
that referenced
this pull request
Sep 3, 2024
### What Update with stellar-xdr with split interface version. ### Why See: - stellar/stellar-xdr#212 Dependent on: - stellar/stellar-xdr#212 - stellar/stellar-xdr#213 - stellar/rs-stellar-xdr#389
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: