Skip to content

[enhancement]: serve a checkpoint's ledger headers so browsers can run ancestry #15

Open

Description

@samjay8

Context

The verifier can prove an older ledger from archived headers (externalize ancestry), but SDF's history archives don't send CORS headers, so a browser can't fetch ledger-*.xdr.gz files itself. exnode already fetches and caches these files.

Scope

  • Add GET /v1/checkpoints/{checkpoint}/ledger. It returns that checkpoint's ledger-*.xdr.gz byte for byte (Content-Type: application/gzip), from the cache when present.
  • checkpoint must be a checkpoint sequence ((n + 1) % 64 == 0). Anything else is a 400 naming the right one.
  • Archived files never change: serve them with the same immutable Cache-Control and ETag as bundles.
  • Document the route in api/openapi.yaml and the README.

Out of scope: Serving scp-* or results-* files.

Done when

  • A server test serves the fixture checkpoint's file byte-identical to testdata/archive.
  • A test covers the 400 for a non-checkpoint sequence and the 404 for an unpublished one.

Comment to be assigned before starting. Read CONTRIBUTING.md for the checks this repository runs.

Activity

  1. added
    enhancement
    complexity:medium
    Stellar Wave
    on Oct 26, 2026
  2. sparkysolutions10-pixel commented on Oct 26, 2026

    @sparkysolutions10-pixel

    Hi @samjay8, I would like to work on this. I will implement GET /v1/checkpoints/{checkpoint}/ledger serving the cached raw gzip ledger headers with sequence validation ((n+1)%64==0), immutable Cache-Control headers, tests against testdata/archive, and OpenAPI updates. Could you please assign it to me? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar Wavearea/apiarea/archivecomplexity:mediumenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions