> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xdrcheck.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Test software that reads the Stellar ledger against rare but valid transaction shapes, each tagged with the CAP that introduced it and emitted by a real stellar-core.

XDRCheck is for maintainers of Stellar SDKs and XDR libraries (js-stellar-sdk, go-stellar-sdk, rs-stellar-xdr,
py-stellar-base) and for authors and operators of indexers (wallet-backend, stellar-etl, Horizon, your own). It
tests your code against transaction shapes that are rare but valid: a muxed account, a signed-payload signer, a fee
bump around a failed transaction, a deeply nested authorization tree. Each shape is a corpus entry tagged with the
CAP that introduced it and, where stellar-core can emit it, produced by a real stellar-core.

After this page you know what the kit has checked, and which page to open for your role.

## What you can check

Each figure is generated from a tracked file and links to the page that says how it was made and how to run it
again.

* **Pubnet ledgers 2 to 65,505,999, every one, checked.** 65,505,998 ledgers and
  10,869,626,939 transactions were read from the public data lake, decoded, re-encoded byte for byte and
  hash-checked: 0 ledgers refused and 0 mismatches over 65,505,997 header
  hash-chain links. The scan computes shapes and these checks; no pipeline or SDK was replayed over all of it.
  [Mainnet scan](https://docs.xdrcheck.dev/results/mainnet-scan.md)
* **Entries a real stellar-core emitted.** 446 corpus entries, each tagged with its CAP and protocol;
  138 of them were produced by a local, offline stellar-core under both the testnet and the mainnet
  passphrase, 143 were captured from network history and 53 come from stellar-core's own goldens.
  The 111 hand-made entries are marked synthetic. [How to read a corpus entry](https://docs.xdrcheck.dev/start/read-an-entry.md)
* **Public incidents reproduced before and after their fixes.** Three wallet-backend incidents and three
  js-stellar-sdk incidents fail on their pre-fix versions and pass on the fixed ones (`make verify-replay`,
  `make verify-conformance`). 6 of the 18 public incidents on that page are
  reproduced this way; the others are run, checked or held as corpus input.
  [Known incidents](https://docs.xdrcheck.dev/results/incidents.md)
* **One corpus across the SDKs.** 21 columns (releases of the Go, JavaScript, Python and Rust SDKs, and stellar-core)
  in one conformance matrix, so a defect found in one SDK is checked in the others.
  [SDK conformance matrix](https://docs.xdrcheck.dev/results/sdk-matrix.md)
* **Findings filed upstream.** 92 findings with a public record, 48 of them filed
  upstream. [Findings](https://docs.xdrcheck.dev/results/findings.md)

## Results

> [card] [Mainnet scan](https://docs.xdrcheck.dev/results/mainnet-scan.md)
>
> What was scanned and checked, the shape census, prevalence per entry.

> [card] [SDK conformance matrix](https://docs.xdrcheck.dev/results/sdk-matrix.md)
>
> Agrees, diverges and not run for every SDK column.

> [card] [Replay results](https://docs.xdrcheck.dev/results/replay.md)
>
> The corpus through wallet-backend and stellar-etl, before and after fixes.

> [card] [Known incidents](https://docs.xdrcheck.dev/results/incidents.md)
>
> Each public incident: reproduced, run, checked or held as input.

> [card] [Findings](https://docs.xdrcheck.dev/results/findings.md)
>
> Every finding with severity, component, entries and upstream issue.

> [card] [CAP coverage](https://docs.xdrcheck.dev/caps/overview.md)
>
> Each CAP's entries, their source ledgers and their mainnet prevalence.

## Start by role

> [card] [I maintain a Stellar SDK or XDR library](https://docs.xdrcheck.dev/start/for-sdk-maintainers.md)
>
> Put every corpus entry through your decoder in your own CI.

> [card] [I write or run an indexer](https://docs.xdrcheck.dev/start/for-indexers.md)
>
> Replay the corpus through your indexer with an adapter, then on every pull request.

> [card] [My team writes Go ingestion code](https://docs.xdrcheck.dev/guides/lint-go.md)
>
> Run `xdrlint` locally and in CI.

> [card] [I ship an SDK for a new protocol](https://docs.xdrcheck.dev/guides/protocol-upgrade-sdk.md)
>
> Test the next protocol's shapes before the SDK release.

> [card] [I add shapes for a new CAP](https://docs.xdrcheck.dev/guides/add-corpus-entries.md)
>
> Write corpus entries and check them against stellar-core.

> [card] [I want to try it first](https://docs.xdrcheck.dev/quickstart.md)
>
> Read the corpus offline from a fresh clone, then run the demo.

## What the kit is

| Part | What it does | How it works |
| - | - | - |
| Corpus | One entry per rare shape: the bytes, the CAP and protocol, and the values a correct reader must produce. Hand-made entries are marked `synthetic` | [The corpus](https://docs.xdrcheck.dev/architecture/corpus.md) |
| Generator | Runs scenarios on a local, offline stellar-core under the testnet and mainnet passphrases; imports stellar-core goldens and public-lake ledgers | [The corpus](https://docs.xdrcheck.dev/architecture/corpus.md#where-the-bytes-come-from) |
| Replay harness | Serves the corpus to your unmodified indexer as a SEP-54 data lake or a mock `getLedgers`, and compares what it stored with each entry | [Replay](https://docs.xdrcheck.dev/architecture/replay.md) |
| Service rigs and judge | Run real ledgers through wallet-backend, stellar-etl or Horizon at any commit; the judge derives what happened from each ledger's own entry changes | [Replay](https://docs.xdrcheck.dev/architecture/replay.md#real-ledgers-service-rigs-and-the-judge) |
| Conformance runner | Runs the corpus through the JavaScript, Go, Rust and Python SDKs and reports where they disagree with the bytes or with each other | [Conformance](https://docs.xdrcheck.dev/architecture/conformance.md) |
| `xdrlint` | Finds ingestion mistakes and assumptions about the ledger's form in Go code built on go-stellar-sdk | [Linter and guide](https://docs.xdrcheck.dev/architecture/linter-and-guide.md) |
| Hardening guide | Which fields stellar-core validates, which caps to set, where to take participants from | [Hardening guide](https://docs.xdrcheck.dev/hardening/overview.md) |
| Mainnet scan and `find` | A shape census of pubnet history; `xdrcheck find` turns a token, value tag or CAP into mainnet transactions to replay | [Mainnet scan](https://docs.xdrcheck.dev/architecture/mainnet-scan.md) |

Every part reads the same corpus manifest ([Manifest and index format](https://docs.xdrcheck.dev/reference/manifest.md)). The diagram of how
they connect is on [Architecture overview](https://docs.xdrcheck.dev/architecture/overview.md#how-the-parts-fit-together).

## Conventions on this site

* The command-line tools are `xdrcheck`, `xdrcheck-corpus`, `xdrlint`, `xdrcheck-judge` and `xdrcheck-tagger`
  ([Command-line reference](https://docs.xdrcheck.dev/reference/cli.md)).
* `OWNER/REPO` stands for the XDRCheck repository on GitHub, in URLs, `uses:` lines and Go module paths alike.
* Commands run from the root of a checkout of the repository unless a step says otherwise. After `make build`,
  the tools are in `./bin`; add them to your `PATH` with `export PATH="$PWD/bin:$PATH"`.
* A corpus release is named by the protocol it covers: `30.0.0` covers Protocol 30. See
  [Release and channels](https://docs.xdrcheck.dev/guides/maintain-kit.md#release-and-channels). XDRCheck is in active development toward its first release; until
  it is published, run everything from a checkout of the repository, and read `<version>` and `<commit>` in
  commands as the release or commit you pin.
* The figures on this site, the README's results and the dashboard (`apps/dashboard`) are generated from the same
  tracked files under `corpus/` and `evidence/`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.