Commit c2c47b4
committed
Regenerate XDR with latest Protocol 23 version (#800)
* 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 completeness1 parent 58c0138 commit c2c47b4
File tree
27 files changed
+3492
-2973
lines changed- src
- generated
- test/unit
- types
- xdr
- curr
- next
27 files changed
+3492
-2973
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
149 | 152 | | |
150 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
151 | 165 | | |
152 | 166 | | |
153 | 167 | | |
| |||
0 commit comments