Skip to content

Proposed guide for indexer builders: what stellar-core validates, and nine rules for turning ledger data into records #3166

Open

Description

@hackcat29

The Build your own indexer section explains how to read ledger data, but not which of its properties stellar-core guarantees and which an indexer has to handle itself. Several indexer bugs this year came from that gap: a signed-payload signer stored where an account key was expected (stellar/wallet-backend#729), a trustline created by the SAC's trust() with no operation to key on (stellar/wallet-backend#731, stellar/stellar-etl#460), muxed addresses colliding with their G… form (stellar/wallet-backend#716), amounts above 2^53 stroops rounded through a float (stellar/stellar-etl#454).

I have a draft guide for that section, written for the SCF RFP "XDR/CAP-Coverage Audit Tool and Indexer-Hardening Guide", which asks for a guide ready for developers.stellar.org and gates its publication on review by a stellar-core or platform engineer. That review hasn't happened, and every page says so.

What it covers (14 pages):

  1. What stellar-core validates, field by field, and what it passes through untouched: signatures, sequence numbers, fees, time bounds, bounded vectors, memo text, muxed IDs, authorization trees, contract values, signer keys, pool assets, amounts, effects of contract calls, ledger headers (15 rows).
  2. Recommended depth and size limits for recursive values, with the host's own limits cited.
  3. Nine rules for turning ledger data into records: effects and participants from the meta, not the envelope; 64-bit integers kept exact; muxed and signed-payload addresses per SEP-0023; SAC-created trustlines; fees net of Soroban refunds; consensus data only; and so on.
  4. A checklist.

Each row and rule points at corpus fixtures from mainnet, testnet and a pinned stellar-core 30.0.0 (137 in all), and CI checks the field table against every fixture's manifest. A manifest shows what a ledger contains, not what core would have refused, so seven rows rest on stellar-core's behaviour as described rather than on a probe; the review notes list them so a reviewer can start there.

The pages use Istravex's snippets and link to its docs; I'd adapt both to this repository's layout, and run its checks, before any pull request.

A related proposal is open in #3165 (a single page on what stellar-core validates). I'm happy to combine efforts, or defer to whichever shape you prefer.

Two questions:

  1. Is a guide like this wanted under docs/data/indexers/build-your-own/, or somewhere else, or not at all?
  2. It shouldn't be published until someone who knows stellar-core's transaction validation has read it. Who is the right person to ask?

Activity

  1. stellar-doxie commented on Nov 18, 2026

    @stellar-doxie
    Contributor

    🤖 Automated message from Doxie.

    I saw this issue. Nobody with permission has called me in, so I take no action on it. A maintainer can call me in.

    How to reach me:

    • Anyone with write permission can call me in. Comment /triage, add the bot:take label, or assign @kaankacar, @ElliotFriend or @wmendes.
    • The issue author can send me away with /triage stop.
    • People with write permission can also add the bot:hands-off label.
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

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions