Repository navigation
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Generated headers can remain stale when toggling the option, and the new build mode lacks automated coverage.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds optional pointer-backed XDR union generation and updates XDR query validation for the newer xdrpp API.
Changes:
- Adds
--enable-xdrpp-uptr. - Passes
-uptrduring XDR header generation. - Uses union metadata to validate fields without copying unions.
| File | Description |
|---|---|
configure.ac |
Defines the optional uptr configuration flag. |
src/Makefile.am |
Passes configured flags to xdrc. |
src/util/xdrquery/XDRFieldResolver.h |
Adapts union-field validation to the new API. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
24fa527 to
b427129
Compare
b427129 to
e7b9b5b
Compare
e7b9b5b to
dcf658c
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The build rule has a critical clean-build failure, and the new mode lacks CI coverage.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (2)
Resolved since last review (1)
0a118b5 to
72eaedb
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The missing include and lack of CI coverage for the new supported mode must be addressed.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
Resolved since last review (2)
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The default configuration selects an invalid empty threshold, and the new storage modes lack CI coverage.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (2)
Resolved since last review (1)
cb4fe81 to
b5d9614
Compare
b5d9614 to
dfc717a
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Dependency incompatibilities block builds, union validation accepts invalid paths, and unchanged headers repeatedly regenerate.
Review effort: Balanced
Findings: 1
Open (4)
Resolved since last review (1)
dfc717a to
a7819c9
Compare
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The default union-storage change needs human review backed by build, runtime, and performance validation against the adopted xdrpp revision.
Review effort: Balanced
Findings: 1
Resolved since last review (1)
1e19beb to
b22c7aa
Compare
b22c7aa to
5a92319
Compare
5a92319 to
488e91a
Compare
| #include "test/test.h" | ||
| #include "xdr/Stellar-SCP.h" | ||
| #include "xdr/Stellar-contract-config-setting.h" | ||
| #include "xdr/Stellar-contract-env-meta.h" |
sisuresh
left a comment
There was a problem hiding this comment.
--enable-xdrpp-uptrnow defaults to 32 (configure.ac:544), contrary to the description. EveryLedgerEntry.dataarm is >32 bytes, and the new xdrpp allocates indirect arms on default-construct, copy and move. Replaying theLiveBucketload path over 1k accounts gave ~4k allocations vs 2 and was >2x slower. I'd keep it opt-in until there's an apply-load/catchup benchmark.- CI-private was skipped on this PR and the docker builds use
--disable-tests, so none of theBUILD_TESTScode (dump-xdr-unions, the new resolver test, fuzz/autocheck utils) has been compiled or run in CI. CommandLine.cpp:55-58includesStellar-contract-env-meta.h,Stellar-contract-meta.handStellar-exporter.h, which the VS project doesn't generate, so clean VS builds will fail.- Interrupting make during
xdr-stamp(Makefile.am:127-145) leaves a truncated header and.h.tmp, since the backup is only restored when xdrc fails normally.
488e91a to
e5e6df3
Compare
| [Indirect xdrpp union arms larger than BYTES (default 32); pass | ||
| --enable-xdrpp-uptr to indirect every arm, or --disable-xdrpp-uptr | ||
| to store every arm inline]), | ||
| [], [enable_xdrpp_uptr=32]) |
| dumpUnionLayouts(xdr::xdr_union_types_Stellar_SCP{}, totals); | ||
| dumpUnionLayouts(xdr::xdr_union_types_Stellar_transaction{}, totals); | ||
| dumpUnionLayouts(xdr::xdr_union_types_Stellar_types{}, totals); |
e5e6df3 to
060153d
Compare
060153d to
0feefb4
Compare



This adopts the xdrpp changes in https://github.com/xdrpp/xdrpp/tree/cxx20-uptr-hybrid and enables it at 32 byte default threshold for out-of-line allocations; it also adds
--enable-xdrpp-uptr=Nflag to configure this threshold.