-
Notifications
You must be signed in to change notification settings - Fork 138
Regenerate XDR with latest Protocol 23 version #800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Size Change: +8.76 kB (+0.26%) Total Size: 3.32 MB
|
Change the commit hash to the right sha of stellar/stellar-xdr. Add any new filenames (if needed: here Stellar-exporter.x for Galexie). Run `make reset-xdr` from the project root.
53feed7
to
0d719c4
Compare
* Move `xdr.Operation` into a hidden namespace to avoid conflicts with the SDK's `Operation`. * Minimize the diff by running `sed -ie s/\"/\'/g types/{curr,next}.d.ts` (because the generator uses a different prettier config--this could probably be fixed in the generator itself, but this is easy enough for now). * Add workarounds: - `type Hash = Opaque[];` is a necessary alias that doesn't get gen'd - `Hyper`, `UnsignedHyper`, and `ScSpecEventV0` need their signatures fixed because it should take a proper `Array` instead of a naked `[]` (enforced by `yarn lint`). - Some constants aren't generated correctly, ref. the linked issue Account for generator bugs: constants that aren't present
* This accounts for any fields that encountered a rename as part of the new XDR version. In this case, `readBytes` was renamed to `diskReadBytes` because it's measured differently as a result of Core's state living in memory rather than on disk in most cases. * It also accounts for the unused extension point actually having a name now, so `xdr.ExtensionPoint` needs to use the structure- specific `xdr.SorobanTransactionDataExt`, instead.
the separate commits for each step are great. Do you think it's worth including link to this pr as example of those steps in the existing README#xdr-update, it doesn't mention this type of guidance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, my approval is probably half strengh, I'm not active in js layer as much.
Yep good call @sreuland, I jotted that down as a TODO but might as well throw it in. I think your ✔️ is good enough - there's no major code changes here and CI passes. |
* 1. Run the generator: Change the commit hash to the right sha of stellar/stellar-xdr. Add any new filenames (if needed: here Stellar-exporter.x for Galexie). Run `make reset-xdr` from the project root. * 2. Post-generation fixups to work around bugs or project-specific stuff: * Move `xdr.Operation` into a hidden namespace to avoid conflicts with the SDK's `Operation`. * Minimize the diff by running `sed -ie s/\"/\'/g types/{curr,next}.d.ts` (because the generator uses a different prettier config--this could probably be fixed in the generator itself, but this is easy enough for now). * Add workarounds: - `type Hash = Opaque[];` is a necessary alias that doesn't get gen'd - `Hyper`, `UnsignedHyper`, and `ScSpecEventV0` need their signatures fixed because it should take a proper `Array` instead of a naked `[]` (enforced by `yarn lint`). - Some constants aren't generated correctly, ref. the linked issue * 3. Accommodate XDR additions or renames: * This accounts for any fields that encountered a rename as part of the new XDR version. In this case, `readBytes` was renamed to `diskReadBytes` because it's measured differently as a result of Core's state living in memory rather than on disk in most cases. * It also accounts for the unused extension point actually having a name now, so `xdr.ExtensionPoint` needs to use the structure- specific `xdr.SorobanTransactionDataExt`, instead. * Add docs to README for completeness
* Add strkey support for liquidity pools and claimable balances (#799) * Regenerate XDR with latest Protocol 23 version (#800) * Migrate cryptographic libraries to use modern @noble/curves. (#802) * Add support for encoding `Address` to/from new `StrKey`s (#801) * Allow specifying mixed types for vectors in `nativeToScVal` (#803) * Prepare v14.0.0-rc.1, Protocol 23 for release (#804)
This corresponds to stellar/stellar-xdr@4b7a2ef.
This is a great example of the step-by-step process to update XDR with each commit message describing the detailed separate steps of the process.