Protocol 27 Support#5947
Merged
Merged
Conversation
* xdr: regenerate for Protocol 27 CAP-0071 + CAP-0083 Bump XDR to stellar-xdr@5187e69 (CAP-0071 address-bound/delegated Soroban credentials + CAP-0083 STELLAR_VALUE_EMPTY_TX_SET). goxdr and Ruby xdrgen cannot parse #ifdef, so CAP_0071/CAP_0083 gates are resolved with 'stellar-xdr xfile preprocess' (rs-stellar-xdr #503) before codegen, driven by XDR_FEATURES. Regenerated xdr/, gxdr/, and xdr/xdr_views_generated.go. * xdr: drop CAP-0083 from regen; only CAP-0071 ships in p27 - Bump XDR_COMMIT to stellar-xdr@68fa1ac (post-#303 which ungated CAP-0071). - Clear XDR_FEATURES default so CAP-0083 #ifdef blocks are stripped during preprocess. CAP-0071 is ungated and needs no feature flag. - Regenerate gxdr/, xdr/xdr_generated.go, xdr/xdr_views_generated.go. - randxdr: add IsDeepNestedDelegates preset to cap recursion through CAP-71 SorobanDelegateSignature.nestedDelegates, mirroring the existing IsDeepAuthorizedInvocationTree handling for subInvocations. Without it TestView_RandXDR_RawRoundTrip stack-overflows on unbounded random trees. * go.mod: bump go-xdr to 0bf8f49 (raise DecodeDefaultMaxDepth to 1500) Pulls in stellar/go-xdr#32 which lifts the default XDR decode depth from 250 → 1500 and adds the DecodeUnlimitedDepth sentinel. Necessary so the CAP-71 SorobanDelegateSignature delegate chain (which the protocol allows to nest arbitrarily, with only Soroban's runtime trap policing depth) can be decoded by stellar-core LCM consumers without stalling. * go.sum: drop stale go-xdr@a87d4d0 entry (go mod tidy) The previous commit bumped go-xdr to 0bf8f49 in go.mod, but go.sum still carried the old a87d4d0789c3 lines. CI's gomod.sh runs `go mod tidy` and fails the build on the residual diff. * ci: bump go-test timeout to 20m The default per-test-binary timeout is 10m, which is borderline for this repo's race-cover suite (xdr/ alone takes ~230s with -race locally, longer on slower CI runners). CAP-71's added generated XDR pushed the run past 10m, killing the test job with SIGTERM before xdr/ and txnbuild/ finished. 20m gives generous headroom and matches the conservative timeout other Stellar Go repos use for race+cover runs. * txnbuild: cap CAP-71 nestedDelegates recursion in TestOperationCoverage TestOperationCoverage generates 10,000 random gxdr.Operation values which now include InvokeHostFunctionOp.auth[].credentials carrying the new SorobanAddressCredentialsWithDelegates with the recursive nestedDelegates field. Without bounding, the random generator recurses unboundedly through SorobanDelegateSignature.nestedDelegates and the test hangs past go test's default 10-minute per-binary timeout, killing the CI test matrix. Add IsDeepNestedDelegates preset (already defined in randxdr/presets.go for LedgerCloseMetaPresets) — caps the tree height at 2. With the preset, the test runs in ~8s under -race instead of timing out. Pairs with the -timeout=20m bump on the test workflow (which is now just headroom — the real fix is this preset).
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the SDK for Stellar Protocol 27 by regenerating XDR artifacts for CAP-0071 (including new Soroban credential / authorization variants) and adjusting generation/test infrastructure to handle newly introduced recursive structures safely and within CI time limits.
Changes:
- Regenerate
xdr/,gxdr/, and XDR “views” to include new Protocol 27/CAP-0071 types and enum arms. - Add recursion-capping presets for CAP-71 delegate chains in
randxdrand apply them totxnbuildcoverage tests. - Bump
github.com/stellar/go-xdrand extend GitHub Actionsgo testtimeout to reduce CI flakes/timeouts.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
xdr/xdr_views_generated.go |
Regenerated view types; adds CAP-0071-related views and new discriminants. |
xdr/xdr_generated.go |
Regenerated Go XDR types/unions/enums to include new Protocol 27/CAP-0071 definitions. |
gxdr/xdr_generated.go |
Regenerated goxdr-based types/enums/unions for the updated XDR schema. |
xdr/Stellar-transaction.x |
Updates XDR schema with Soroban delegate signature structures and new credential variants. |
xdr/Stellar-ledger-entries.x |
Extends EnvelopeType with ENVELOPE_TYPE_SOROBAN_AUTHORIZATION_WITH_ADDRESS. |
xdr/Stellar-types.x |
Minor schema formatting change as part of regeneration. |
xdr/xdr_commit_generated.txt |
Updates recorded upstream stellar-xdr commit used for generation. |
randxdr/presets.go |
Adds IsDeepNestedDelegates selector and applies it to canonical presets. |
txnbuild/operation_test.go |
Applies new preset to avoid runaway recursion during random operation generation. |
Makefile |
Updates XDR commit and adds a preprocessing step prior to codegen. |
go.mod |
Bumps github.com/stellar/go-xdr dependency. |
go.sum |
Updates module sums for the new go-xdr version. |
.github/workflows/go.yml |
Increases go test timeout to 20 minutes for race+cover runs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tamirms
approved these changes
Jun 9, 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.
xdr: regenerate for Protocol 27 CAP-0071
go.mod: bump go-xdr to 0bf8f49 (raise DecodeDefaultMaxDepth to 1500)
ci: bump go-test timeout to 20m
txnbuild: cap CAP-71 nestedDelegates recursion in TestOperationCoverage