Regenerate with SCSpecTypeUDTV2 - #564
Closed
leighmcculloch wants to merge 2 commits into
Closed
Conversation
This was referenced Jul 29, 2026
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.
Warning
Stacked on #562, so the diff here is only the regeneration. Depends on unmerged changes in stellar/stellar-xdr. A valid merge order for the whole stack:
SCSpecTypeUDTV2to the contract spec XDRRefvariants of the generated typesReftypesWhat
Advance the
xdrsubmodule to the contract spec definition that addsSCSpecTypeUDTV2and regenerate, which brings in theScSpecTypeUdtv2type, theScSpecTypeDef::UdtV2variant that holds it, and the const-serialization form of both.ScSpecTypeUdtv2holds a single fixed-size[u8; 8], so it has nothing to borrow and the generator emits noScSpecTypeUdtv2Reffor it.ScSpecTypeDefRef::UdtV2therefore holds the owned struct directly, the same wayScSpecTypeDefRef::BytesNholdsScSpecTypeBytesN.Why
ScSpecTypeUdtv2is the reference form that identifies the user-defined type being referenced by an 8-byte id, rather than naming it and nothing more. Downstream needs the generated type before it can build spec entries that use it, and it needs the const form in particular because the Rust SDK assembles contract specs at const evaluation time.Known limitations
The submodule points at an unmerged
stellar-xdrbranch, so this cannot merge until that lands and the pointer is moved to the merged commit.