1
Pick the recipe for your language
The recipes need none of this repository’s build. Go, Rust and Python need your SDK’s language and a zstd
decoder; JavaScript installs the corpus release’s npm runner.
2
Copy it into your repository
Copy
workflow.yml to .github/workflows/xdrcheck.yml and the rest of the recipe where the workflow’s header
comment says (xdrcheck/ for Go, Rust and JavaScript; tests/corpus/ for Python). The workflow downloads one corpus release pinned by version and sha256, and stops before reading anything if the
archive does not match.3
Write, review and commit the expected-failure list
Run the test once with
XDRCHECK_WRITE_EXPECTED_FAILURES=1 (JavaScript: --write-expected-failures FILE).
Read each line, then commit the list with the pinned version. From then on the job fails on a failure the list
does not name (NEW-FAILURE) and on a listed failure that now passes (UNEXPECTED-PASS): remove that line in
the same change as the fix.4
Test an unreleased branch
The recipes judge bytes only (decode, consume every byte, re-encode identically; Rust and Python also compare
the SEP-51 JSON). For decoded values, transaction parsing and the
api operations, run
xdrcheck conform run --sdk ../your-sdk-checkout from a checkout of this repository
(SDK CI, section 8).When the job fails
Limits
- The loaders and the npm runner are not on a package registry. Pin them by commit or vendor them (one file each; Go: two).
- The recipes judge conformance level L0 (bytes). The levels above it need
xdrcheck conformand a driver, which exist for Go, JavaScript, Rust and Python only. - Entries of the
stresstier are left out of the recipes: they are built to exhaust a reader without limits.