Part 1: read the corpus (offline, no build)
The corpus is plain files:corpus/index.json lists every entry, and each entry points at its XDR bytes and its
expected decoded value. The Python loader in packages/python uses only the standard library (and the zstd
command or the zstandard module for the decoded sidecars).
1
Open the corpus
From the root of a clone:
v.blob() checks the bytes against the sha256 and length in the index; v.expected_json() returns the
SEP-51 JSON value a correct decoder must produce.2
Find the entries of a CAP
Each entry names its CAPs. CAP coverage lists them all, with the pattern, protocol, origin and
source ledger of each. How to read a corpus entry walks one entry field by field.
Part 2: fetch once, build, run (Linux)
You need mise and rustup.1
Toolchains, the one networked step, and the build
OFFLINE=1 to a make
target to enforce it.2
Run the demo
make demo exits 0 when the replay finds the planted bug. The bug is the block marked SEEDED BUG in
go/adapters/demo/main.go; remove it and the same replay passes.3
Compute the judge's facts for a corpus ledger
The judge reads a ledger with rs-stellar-xdr and states, from the ledger’s own entry changes, what each
transaction did. For the signed-payload entry above:
make build builds the judge and the tagger into target/release/ with the rest of the Rust workspace, but
does not link them into ./bin.4
Show an entry
--decoded testnet prints that variant’s SEP-51 JSON;
xdrcheck entry --cap 40 lists the entries of a CAP.5
Find captured ledgers of a CAP
find --cap answers from the corpus alone. With the mainnet dataset installed
(Mainnet scan), the same command and --token, --class and --tag answer from
every transaction of mainnet history.Requirements
Every version the kit builds against or tests is pinned in
pins.toml.
If it does not work
make toolchain fails
make toolchain fails
A tool is missing or at another version than
pins.toml. Run mise install again from the repository root,
and check that rustup is on your PATH.make demo says the replay did not report the planted bug
make demo says the replay did not report the planted bug
The replay exited with something other than 1. Read
reports-demo/replay.log. Exit code 2 means the harness
itself could not run, for example because a tool was not built: run make build again.You are on macOS
You are on macOS
The replay harness, the rigs and the conformance runner are Linux-only. On macOS you can read the corpus,
lint Go code (Lint Go code) and use the corpus in an SDK’s CI (SDK CI).
Next steps
- SDK or XDR library: For SDK maintainers.
- Indexer: For indexer authors and operators.
- Every command: Command-line reference.