Protocol 27 (CAP-0071) XDR - #5945
Conversation
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 stellar#503) before codegen, driven by XDR_FEATURES. Regenerated xdr/, gxdr/, and xdr/xdr_views_generated.go.
- Bump XDR_COMMIT to stellar-xdr@68fa1ac (post-stellar#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.
|
Update (CAP-71-only for p27 release) P27 ships with CAP-0071 only — CAP-0083 has been deferred. Pushed
Branch name still says |
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.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
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.
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).
Shaptic
left a comment
There was a problem hiding this comment.
I'm almost certain this can be merged as-is to move along the release on our side. Any objections?
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f8b1ff4ce9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| printf "%s" ${XDR_COMMIT} > xdr/xdr_commit_generated.txt | ||
| curl -Lsf -o $@ https://raw.githubusercontent.com/stellar/stellar-xdr/$(XDR_COMMIT)/$(@F) | ||
| # goxdr / ruby xdrgen cannot parse #ifdef; resolve CAP feature gates first (rs-stellar-xdr #503). | ||
| stellar-xdr xfile preprocess --features "$(XDR_FEATURES)" $@ > [email protected] && mv -f [email protected] $@ |
There was a problem hiding this comment.
Set Protocol 27 features for XDR regeneration
When make xdr-update is run without extra environment, this recipe preprocesses the freshly downloaded XDR with XDR_FEATURES still empty (the default just below says empty means no feature-gated definitions are emitted). In that default regeneration path the CAP-0071 definitions checked in by this commit, such as the new delegate credential arms, are filtered out before goxdr/xdrgen run, so the generated Protocol 27 files are not reproducible and future XDR refreshes can silently drop the feature unless the caller knows to pass the right feature list.
Useful? React with 👍 / 👎.
Bump stellar-core to 27.0.0-3288.7696c069d.noble and go-stellar-sdk to the protocol-next commit carrying CAP-0071 XDR (stellar/go-stellar-sdk#5945). go-xdr follows transitively (DecodeDefaultMaxDepth 250 -> 1500). Adapts test/integration_test.go to GetFile's widened return signature.
Bump stellar-core to 27.0.0-3288.7696c069d.noble and go-stellar-sdk to the protocol-next commit carrying CAP-0071 XDR (stellar/go-stellar-sdk#5945). go-xdr follows transitively (DecodeDefaultMaxDepth 250 -> 1500). Adapts test/integration_test.go to GetFile's widened return signature.
Bump stellar-core to 27.0.0-3288.7696c069d.noble and go-stellar-sdk to the protocol-next commit carrying CAP-0071 XDR (stellar/go-stellar-sdk#5945). go-xdr follows transitively (DecodeDefaultMaxDepth 250 -> 1500). Adapts test/integration_test.go to GetFile's widened return signature.
This branch was used to stand up an end-to-end Stellar Quickstart test of CAP-0083 ("Allow validators to vote to skip the current ledger", stellar-core PR #5209), together with CAP-0071. It carries the downstream changes required so a custom quickstart image (CAP-83
stellar-core+ this component) runs at protocol 27 and handles CAP-83 skip ledgers (STELLAR_VALUE_EMPTY_TX_SET).Rebased on
main; opened againstprotocol-next.go-stellar-sdk
XDR_COMMITtostellar-xdr@5187e69): CAP-0071SOROBAN_CREDENTIALS_ADDRESS_V2/ delegated credentials and CAP-0083STELLAR_VALUE_EMPTY_TX_SET.goxdrand Rubyxdrgencan't parse#ifdef, so the feature gates are resolved withstellar-xdr xfile preprocess(rs-stellar-xdr findpaths: simplify simplepath/order_book.go and fix order_book_test.go #503) before codegen, driven byXDR_FEATURES. Regeneratedxdr/,gxdr/, andxdr/xdr_views_generated.go.