Skip to content

Document the Galexie data lake storage format - #2827

Merged
ElliotFriend merged 8 commits into
mainfrom
docs-agent/1605-galexie-storage-format
Oct 13, 2026
Merged

ElliotFriend merged 8 commits into
mainfrom
docs-agent/1605-galexie-storage-format

Conversation

@kaankacar

@kaankacar kaankacar commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Automated message from Kaan's Automated Triage Bot.

This adds a Data Lake Storage Format page for readers who consume a Galexie data lake directly, instead of through the ingest SDK or Stellar RPC. It summarizes SEP-54 and links to it as the specification: the object key layout, the reversed-sequence hex prefix, the zstd-compressed LedgerCloseMetaBatch payload, the .config.json manifest and the per-object metadata. Three existing pages now link to it: the Galexie overview, the Data Organization settings in the Galexie admin guide, and the RPC data lake integration guide.

Every fact came from a primary source or a live read:

  • SEP-54 is now a numbered SEP at ecosystem/sep-0054.md, status Draft, updated 2026-01-07.
  • The key format matches DataStoreSchema.GetObjectKeyFromSequenceNumber in go-stellar-sdk/support/datastore/schema.go.
  • .config.json and the field names match DatastoreManifest and manifestFilename in the same package.
  • The current suffix is .xdr.zst (ZstdCompressor.Name() returns zst); .xdr.zstd is the legacy form the code still reads.
  • LedgerCloseMetaBatch is in stellar-xdr Stellar-exporter.x and in stellar-xdr v28.0.0, which the Stellar CLI depends on.
  • The worked example key was fetched from the public bucket. It returns 200 and carries the metadata headers the page lists.

Refs #1605 (and not Closes), because SEP-54 is still status Draft. Please close the issue when you are satisfied with that half.

Add a Data Lake Storage Format page for readers who consume a Galexie
data lake directly instead of through the ingest SDK or Stellar RPC.

The page summarizes SEP-54 (Ledger Metadata Storage) and links to it as
the specification: object key layout, the reversed-sequence hex prefix,
the zstd-compressed LedgerCloseMetaBatch payload, the .config.json
manifest and the per-object metadata. It also shows the layout of the
public AWS Open Data lake with a worked read of one ledger.

Link the new page from the Galexie overview, from the Data Organization
settings in the Galexie admin guide and from the RPC data lake
integration guide.

Refs #1605

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds documentation for directly consuming Galexie data lakes, aligned with SEP-54.

Changes:

  • Documents object layout, manifests, compression, metadata, and integrity considerations.
  • Adds a public AWS data lake example.
  • Links the guide from Galexie and RPC documentation.
  • Five code fences need text language identifiers (data-lake-format.mdx:20,30,36,88,107).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
routes.txt Registers the new route.
galexie/README.mdx Links to the storage guide.
galexie/data-lake-format.mdx Adds the SEP-54-based guide.
admin_guide/configuring.mdx Connects storage settings to the guide.
rpc/admin-guide/data-lake-integration.mdx Links direct consumers to the guide.
Suppressed comments (4)

docs/data/indexers/build-your-own/galexie/data-lake-format.mdx:30

  • This code fence is missing a language identifier. Mark the partition-name example as text so syntax handling is explicit.
**docs/data/indexers/build-your-own/galexie/data-lake-format.mdx:36**
* This code fence is missing a language identifier. Mark these batch filenames as `text` to satisfy the docs fence convention.

docs/data/indexers/build-your-own/galexie/data-lake-format.mdx:88

  • This code fence is missing a language identifier. Mark the S3 paths as text so the fence declares its content type.
**docs/data/indexers/build-your-own/galexie/data-lake-format.mdx:107**
* This code fence is missing a language identifier. Mark the worked object key as `text` to comply with the documentation convention.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions github-actions Bot added the preview Preview builds for PRs by SDF employees. label Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Copilot AI review requested due to automatic review settings September 8, 2026 01:10
@github-actions github-actions Bot removed the preview Preview builds for PRs by SDF employees. label Sep 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

@github-actions github-actions Bot added the preview Preview builds for PRs by SDF employees. label Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Copilot AI review requested due to automatic review settings September 8, 2026 01:15
@github-actions github-actions Bot removed the preview Preview builds for PRs by SDF employees. label Sep 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@github-actions github-actions Bot added the preview Preview builds for PRs by SDF employees. label Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

@kaankacar

Copy link
Copy Markdown
Contributor Author

🤖 Automated message from Kaan's Automated Triage Bot.

Verified against SEP-54, the go-stellar-sdk datastore package and the live AWS bucket. I pushed two corrections: the Testnet path holds one data store per reset, and older stores have no .config.json.

All checks are green at 5885d29. Ready to merge.

@kaankacar kaankacar added the bot:ready-to-merge Bot verified and approved; waiting for a maintainer to merge label Sep 8, 2026

@ElliotFriend ElliotFriend left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a pretty good start. i've left some comments throughout the new page. i also want to get the eyes of someone from the data team on this, so our bases are covered.

sidebar_position: 10
---

# Data Lake Storage Format

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line isn't actually necessary. it's the exact same text as the frontmatter's title field. in the absence of any <h1> tag (or the equivalent in markdown), docusaurus will automatically place an h1 element with the title's value.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated message from the Stellar Triage Bot.

Removed in 84a3081. Docusaurus now renders the frontmatter title as the H1.

<ledgers-path>/<partition>/<batch>.xdr.zst
```

Galexie omits the partition directory when [`files_per_partition`](./admin_guide/configuring.mdx#data-organization-optional) is 1.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Galexie omits the partition directory when [`files_per_partition`](./admin_guide/configuring.mdx#data-organization-optional) is 1.
Galexie omits the partition directory when [`files_per_partition`](./admin_guide/configuring.mdx#data-organization-optional) is `1`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated message from the Stellar Triage Bot.

Applied in 84a3081.

s3://aws-public-blockchain/v1.1/stellar/ledgers/pubnet
```

Testnet resets. Each reset starts a new data store, in a directory named after the reset date:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line has a sentence fragment to begin it. this should be rephrased to maximize clarity.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated message from the Stellar Triage Bot.

Rephrased in 84a3081: "Testnet is reset regularly, and each reset starts a new data store."

Comment on lines +102 to +126
The Pubnet configuration file holds one ledger per batch and 64,000 batches per partition:

```json title="v1.1/stellar/ledgers/pubnet/.config.json"
{
"networkPassphrase": "Public Global Stellar Network ; September 2015",
"version": "1.0",
"compression": "zstd",
"ledgersPerBatch": 1,
"batchesPerPartition": 64000
}
```

With those sizes, ledger 50000000 falls in the partition that starts at ledger 49984000, so its object key is:

```text
v1.1/stellar/ledgers/pubnet/FD054DFF--49984000-50047999/FD050F7F--50000000.xdr.zst
```

Download that ledger and print it as JSON with [`stellar xdr decode`](../../../../tools/cli/stellar-cli.mdx#stellar-xdr-decode):

```sh
curl -s https://aws-public-blockchain.s3.amazonaws.com/v1.1/stellar/ledgers/pubnet/FD054DFF--49984000-50047999/FD050F7F--50000000.xdr.zst \
| zstd -dc \
| stellar xdr decode --type LedgerCloseMetaBatch --input single --output json-formatted
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it feels like the testnet information above interrupts part of this configuration file section. the details about the AWS public lake could be its own section, but the config info here feels like it's more at home in the config section

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated message from the Stellar Triage Bot.

Moved in 84a3081:

  • The Pubnet .config.json example and the worked object key now sit in the "Configuration file" section.
  • "The public Stellar data lake" section now has the Pubnet path, then the download example, then Testnet last.

@sydneynotthecity sydneynotthecity left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I think it would be helpful for us to add when you should read directly from the data store yourself versus using RPC or ingest SDK. In this guide we don't make it clear when that would be the recommendation or preferred solution over other data services. Couple nits to improve readability of the page


Galexie stores ledger metadata in an object store as compressed XDR files.

Most applications never read those files directly. Read them through the [ingest SDK](../ingest-sdk/README.mdx) or through [Stellar RPC](../../../apis/rpc/admin-guide/data-lake-integration.mdx) instead. Both hide the layout described here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be written to something that is clearer, like:

Unless you are building for a highly specialized edge case, use the ingest SDK or Stellar RPC rather than reading these files directly. Both tools abstract away the underlying layout described here so your application doesn't have to manage it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated message from the Stellar Triage Bot.

Applied your wording in 84a3081, with the original relative links. The next line now says to read this page only when an app must read the object store itself, or builds a compatible data store.

On your wider point: I did not add a longer list of direct-read use cases. I found no source for one. If the data team has cases in mind, a short list there would help.

@kaankacar kaankacar Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a short list in 378da87 of when to read the data lake directly:

  • Bulk reads, for example a backfill or an analytics job, with parallel fetches from the bucket.
  • Apps not written in Go. They cannot use the ingest SDK and may not want to run RPC for history.
  • Building a data store that other Stellar tools must read.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated message from the Stellar Triage Bot.

Back on this because @kaankacar replied.

Thanks. The list is in 0118a62, which I already checked. The preview now shows it, and the ingest SDK page confirms the SDK is Go only. No change from me. The label stays bot:ready-to-merge.

A data store does not necessarily hold the whole ledger history. List the oldest partition to find where its history starts.

:::

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be helpful if there was a full example of the full path + filename so a reader could see how all keys work together

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated message from the Stellar Triage Bot.

Added in 84a3081, right after the batch names:

<ledgers-path>/FFFFFFFF--0-15/FFFFFFFD--2-3.xdr.zst

The Pubnet example later on the page shows a real full key too.


Every batch in one data store holds the same number of ledgers. Refer to the [XDR](../../../../learn/fundamentals/data-format/xdr.mdx) documentation for more information on the encoding.

Older data stores use the `.xdr.zstd` suffix instead of `.xdr.zst`. Both suffixes mean Zstandard. A client reads the suffix from an existing object rather than assuming one.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would delete this, idk of any data stores with that standard and we updated all code to use the new zstd suffix

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated message from the Stellar Triage Bot.

Deleted in 84a3081. The Galexie v23.0.0 changelog confirms the move from .zstd to .zst, and the page now names .zst only.

| `ledgersPerBatch` | integer | The number of ledgers in each batch file. |
| `batchesPerPartition` | integer | The number of batch files in each partition directory. |

The Galexie configuration file names the last two values [`ledgers_per_file` and `files_per_partition`](./admin_guide/configuring.mdx#data-organization-optional).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hyperlinking is confusing. I would link file instead

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated message from the Stellar Triage Bot.

Done in 84a3081. The link now sits on "configuration file".


The Galexie configuration file names the last two values [`ledgers_per_file` and `files_per_partition`](./admin_guide/configuring.mdx#data-organization-optional).

Older data stores do not hold this file. A client that reads one must get the batch and partition sizes from its own configuration. The Go `datastore` package does that when the file is absent.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rephrase to reference the old versions of Galexie that do not include the config.json to make this less confusing. Something like "Data stores that are created by operating a version of Galexie X.X or earlier do not use a config.json file...."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated message from the Stellar Triage Bot.

Done in 84a3081. The page now says "Data stores written by Galexie versions before v23.0.0 do not hold this file." Galexie v23.0.0 (2025-08-14) is the release that added .config.json, per its changelog.

Copilot AI balanced review requested due to automatic review settings October 6, 2026 22:29
@github-actions github-actions Bot removed the preview Preview builds for PRs by SDF employees. label Oct 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Recommendation: NEEDS-CHANGES — document the pre-v23 .xdr.zstd suffix for legacy stores.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
Resolved since last review (1)

Copilot AI balanced review requested due to automatic review settings October 6, 2026 22:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The new page contains an inaccurate fixed-batch-size claim and lacks required description metadata.

Review effort: Balanced
Findings: None

Resolved since last review (1)
Previously missed (2)

In code that hasn't changed since last review

Low severity Add a description for SEO and link previews

docs/​data/​indexers/​build-your-own/​galexie/​data-lake-format.mdx:4

New pages must include a description for SEO and link previews (CONTRIBUTING.md:71). This page currently defines only its title and sidebar position.

Low severity Handle shorter Galexie genesis batches

docs/​data/​indexers/​build-your-own/​galexie/​data-lake-format.mdx:70

This fixed-size claim is not true for Galexie's genesis batch when ledgersPerBatch is greater than 1. Galexie aligns that range to sequence 0 but starts its contents at Stellar's genesis ledger 2 (for example, a configured size of 64 produces entries 2–63), so direct readers must tolerate a shorter first batch.

…ct the batch size claim

Add the frontmatter description that CONTRIBUTING.md asks for.

List the cases where an application reads the data lake directly. The
data team asked for this in review.

The first batch of a data store can hold fewer ledgers than
ledgersPerBatch. Galexie aligns batch ranges to sequence 0 but exports
from ledger 2. Say so instead of claiming every batch has the same size.
Copilot AI balanced review requested due to automatic review settings October 12, 2026 14:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The documentation is complete, internally consistent, and verified against current primary sources.

0 open findings

🧠 Review effort: Balanced

@github-actions github-actions Bot added the preview Preview builds for PRs by SDF employees. label Oct 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@stellar-doxie

stellar-doxie Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

🤖 Automated message from the Stellar Triage Bot.

Back on this because @kaankacar pushed new commits.

Verified at 0118a62: the first-batch claim matches Galexie adjustLedgerRange (align to the batch boundary, then start at ledger 2). All checks are green. The preview host was not serving, so I used the green build / build instead. Ready to merge.

@sydneynotthecity sydneynotthecity left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for addressing my feedback 😄

@ElliotFriend
ElliotFriend merged commit b3cb1c5 into main Oct 13, 2026
11 checks passed
@ElliotFriend
ElliotFriend deleted the docs-agent/1605-galexie-storage-format branch October 13, 2026 15:23
@github-actions github-actions Bot removed the preview Preview builds for PRs by SDF employees. label Oct 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR Preview: torn down

oceans404 added a commit that referenced this pull request Oct 21, 2026
New page first in the Galexie group (sidebar_position 10, before the
Admin Guide), with links to it from the Galexie landing page,
Configuring, and RPC data lake integration. routes.txt dropped.

Checks: parity clean (only link conversion), guard clean, mint
validate passed, broken-links at baseline 8, all four pages 200, and
all three new links resolve to the new page.
ElliotFriend pushed a commit that referenced this pull request Oct 21, 2026
Port of b3cb1c5 to the Mintlify tree.

Refs #2827

Co-Authored-By: Claude Opus 5.5 <[email protected]>
ElliotFriend added a commit that referenced this pull request Oct 22, 2026
)

Replaces the Docusaurus site with Mintlify's converted tree (base bcec501),
with tooling trimmed to prettier, husky, redocly, the OpenRPC build, and the
mint CLI. Commits that landed on main after bcec501 were ported by hand.

Ported:
Refs #2448
Refs #2671
Refs #2672
Refs #2727
Refs #2827
Refs #2828
Refs #2837
Refs #2856
Refs #2857
Refs #2869
Refs #2871
Refs #2878
Refs #2880
Refs #2881
Refs #2885
Refs #2886
Refs #2890
Refs #2892
Refs #2893
Refs #2895
Refs #2900
Refs #2901
Refs #2902
Refs #2903
Refs #2905
Refs #2912
Refs #2913
Refs #2915
Refs #2918
Refs #2922

Merged into the branch:
Refs #2936
Refs #2937
Refs #2938
Refs #2940

Co-authored-by: alexistabak-cpu <[email protected]>
Co-authored-by: Emir Ayral <[email protected]>
Co-authored-by: John Wooten <[email protected]>
Co-authored-by: Kaan Kacar <[email protected]>
Co-authored-by: Leigh <[email protected]>
Co-authored-by: maz <[email protected]>
Co-authored-by: Michael Lip <[email protected]>
Co-authored-by: Scopuly <[email protected]>
Co-authored-by: stellar-triage-bot[bot] <333411864+stellar-triage-bot[bot]@users.noreply.github.com>
Co-authored-by: Steph <[email protected]>
Co-authored-by: urvisavla <[email protected]>
Co-authored-by: water-k-max <[email protected]>
Co-authored-by: Wlademyr Mendes <[email protected]>
Co-Authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:ready-to-merge Bot verified and approved; waiting for a maintainer to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants