Repository navigation
Add Record Marking Standard (RFC 5531) documentation to XDR page - #2244
Merged
Merged
Conversation
Document the framing format used when multiple XDR objects are stored sequentially, referencing RFC 5531 Section 11 and noting Stellar's specific usage in history archives and the Rust XDR library.
Added information on decoding XDR with stellar-cli.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds missing documentation for the Record Marking Standard (RFC 5531 §11) to the XDR fundamentals page, so developers parsing Stellar history archives / streams have an in-doc explanation of the framing layer wrapped around XDR objects.
Changes:
- Introduces a new “Record Marking / Frames in Streams” section describing fragment headers (last-fragment bit + length) and big-endian encoding.
- Documents current Stellar usage (single-fragment records) and where this framing appears (history archives, LedgerCloseMeta streaming).
- Adds an RFC 5531 §11 reference link.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Something went wrong with PR preview build please check |
5 similar comments
This was referenced Feb 12, 2026
github-merge-queue Bot
pushed a commit
to stellar/stellar-core
that referenced
this pull request
Feb 27, 2026
# Description Add doc comments to `getXDRSize` and `writeOne` in `src/util/XDRStream.h` referencing [RFC 5531 Section 11](https://www.rfc-editor.org/rfc/rfc5531#section-11). Replace the informal "continuation bit" terminology with the RFC's "last-fragment flag" and document the full fragment header layout (bit 31 = last-fragment flag, bits 0-30 = data length). The existing comments describe the high bit as an XDR "continuation" bit, which is not a term the RFC uses and can mislead readers into thinking it is part of the XDR specification itself. Linking to RFC 5531 and using its terminology makes the code self-documenting and easier to cross-reference for anyone implementing compatible readers or writers. ## Related - stellar/stellar-docs#2244 - stellar/rs-stellar-xdr#495 # Checklist - [ ] Reviewed the [contributing](https://github.com/stellar/stellar-core/blob/master/CONTRIBUTING.md#submitting-changes) document - [ ] Rebased on top of master (no merge commits) - [ ] Ran `clang-format` v8.0.0 (via `make format` or the Visual Studio extension) - [ ] Compiles - [ ] Ran all tests - [ ] If change impacts performance, include supporting evidence per the [performance document](https://github.com/stellar/stellar-core/blob/master/performance-eval/performance-eval.md)
graydon
approved these changes
Mar 2, 2026
zachfedor
pushed a commit
to zachfedor/stellar-docs
that referenced
this pull request
Jun 18, 2026
…llar#2244) * Add Record Marking Standard (RFC 5531) documentation to XDR page Document the framing format used when multiple XDR objects are stored sequentially, referencing RFC 5531 Section 11 and noting Stellar's specific usage in history archives and the Rust XDR library. * Update xdr.mdx * Update xdr.mdx * Update xdr.mdx * Update xdr.mdx with decoding instructions Added information on decoding XDR with stellar-cli. * Update docs/learn/fundamentals/data-format/xdr.mdx Co-authored-by: Copilot <[email protected]> * Update docs/learn/fundamentals/data-format/xdr.mdx * remove blank line between reference link definitions --------- Co-authored-by: Copilot <[email protected]>
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
Add a "Record Marking" section to the XDR fundamentals page (
docs/learn/fundamentals/data-format/xdr.mdx). The new section documents the fragment-based framing format defined in RFC 5531 Section 11, including the 4-byte header layout (last-fragment bit and 30-bit length), and notes where Stellar uses this framing: history archive bucket/checkpoint files in stellar-core and theFrametype in rs-stellar-xdr.Why
The XDR docs page explains what XDR is and how to parse it, but omits the record marking layer that wraps XDR objects in files and streams. Developers working with history archives or the Rust XDR library encounter this framing without any reference in the Stellar documentation. Adding this section closes the gap and gives a direct pointer to the RFC.
Related