Generate for CAP-0071, update hashing, and record features#524
Merged
sisuresh merged 5 commits intostellar:mainfrom Apr 10, 2026
Merged
Generate for CAP-0071, update hashing, and record features#524sisuresh merged 5 commits intostellar:mainfrom
sisuresh merged 5 commits intostellar:mainfrom
Conversation
Hash XDR files after stripping #ifdef/#endif blocks and removing all whitespace. This produces a canonical hash of the base XDR content that is stable regardless of feature ifdefs or formatting differences, ensuring compatibility between builds with different feature flags.
Lists the XDR feature flags enabled in this build, allowing consumers to verify that both sides of a bridge have the same features active.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the generated Stellar XDR Rust/types + JSON schemas to incorporate CAP-0071 additions, makes XDR file hashing stable across formatting/feature-ifdef differences, and exposes enabled XDR feature flags via VERSION for downstream compatibility checks.
Changes:
- Add CAP-0071 XDR additions (new envelope type + new Soroban credential/delegate types) across generated Rust and JSON schema outputs.
- Compute stored XDR file SHA256 hashes after stripping
#ifdef/#else/#endifblocks and whitespace. - Record enabled XDR feature flags in
VERSIONand addcap_0071Cargo feature.
Reviewed changes
Copilot reviewed 49 out of 56 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| xdr-version | Updates tracked XDR version hash. |
| xdr-generator-rust/xdr-parser/src/parser.rs | Hashing now strips ifdefs/whitespace; parser enum handling adjusted for ifdef-wrapped commas. |
| Cargo.toml | Adds cap_0071 feature flag. |
| src/lib.rs | Extends VERSION with enabled XDR feature list. |
| src/generated.rs | Regenerates file-hash list and wires in new CAP-0071 generated modules/types. |
| src/generated/envelope_type.rs | Adds CAP-0071 conditional ENVELOPE_TYPE_SOROBAN_AUTHORIZATION_WITH_ADDRESS. |
| src/generated/hash_id_preimage.rs | Adds CAP-0071 conditional SorobanAuthorizationWithAddress union arm. |
| src/generated/hash_id_preimage_soroban_authorization_with_address.rs | New nested struct for CAP-0071 hash preimage with address. |
| src/generated/soroban_credentials_type.rs | Adds CAP-0071 conditional credential type enum variant. |
| src/generated/soroban_credentials.rs | Adds CAP-0071 conditional credential union variant. |
| src/generated/soroban_delegate_signature.rs | New CAP-0071 struct for delegate signatures. |
| src/generated/soroban_address_credentials_with_delegates.rs | New CAP-0071 struct for address credentials with delegates. |
| xdr-json/EnvelopeType.json | Updates schema description to include CAP-0071 conditional envelope type. |
| xdr-json/HashIdPreimage.json | Updates schema description to include CAP-0071 conditional union arm. |
| xdr-json/HashIdPreimageSorobanAuthorizationWithAddress.json | New JSON schema for CAP-0071 nested struct. |
| xdr-json/SorobanCredentialsType.json | Updates schema description to include CAP-0071 conditional enum value. |
| xdr-json/SorobanCredentials.json | Updates schema description to include CAP-0071 conditional union arm. |
| xdr-json/SorobanAuthorizationEntry.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/SorobanAuthorizationEntries.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/InvokeHostFunctionOp.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/Operation.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/OperationBody.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/Transaction.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/TransactionEnvelope.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/TransactionV0.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/TransactionV0Envelope.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/TransactionV1Envelope.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/TransactionSignaturePayload.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/TransactionSignaturePayloadTaggedTransaction.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/TransactionSet.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/TransactionSetV1.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/TxSetComponent.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/TxSetComponentTxsMaybeDiscountedFee.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/TransactionPhase.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/TransactionHistoryEntry.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/TransactionHistoryEntryExt.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/StoredTransactionSet.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/StoredDebugTransactionSet.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/StellarMessage.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/AuthenticatedMessage.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/AuthenticatedMessageV0.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/FeeBumpTransaction.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/FeeBumpTransactionEnvelope.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/FeeBumpTransactionInnerTx.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/GeneralizedTransactionSet.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/DependentTxCluster.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/ParallelTxExecutionStage.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/ParallelTxsComponent.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/PersistedScpState.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/PersistedScpStateV0.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/LedgerCloseMeta.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/LedgerCloseMetaBatch.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/LedgerCloseMetaV0.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/LedgerCloseMetaV1.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
| xdr-json/LedgerCloseMetaV2.json | Updates embedded SorobanCredentials schema description for CAP-0071. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
The JSON schema portion of this is a little weird. It can be addressed in a follow up. Looks like files for new types aren't generated, and parent types have the ifdefs in their descriptions. |
dmkozh
approved these changes
Apr 10, 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.
What
Part of stellar/stellar-core#5154 and https://github.com/stellar/pod-fsr/issues/29
You can see this in use in these draft PRs - stellar-core and rs-soroban-env.