Skip to Content
shapekit

Quick start

Check the corpus

shapekit registry check
shapekit manifest validate      # every entry decodes and re-encodes to the same bytes
shapekit coverage --check       # per-CAP coverage is current and every gap has a reason
shapekit goldens agree          # structural agreement with stellar-core's goldens

Any pipeline can read the corpus without shapekit: corpus/manifest.json lists every entry with its XDR type, files, CAPs, protocol and expected values; the schema is schema/manifest.schema.json.

Run an SDK over the corpus

Needs the toolchain of that SDK (cargo, go or node).

shapekit conformance run --sdk js                  # current version, @stellar/stellar-sdk 17.4.0
shapekit conformance run --sdk go --all-versions   # every version in conformance/versions.toml
shapekit conformance reproduce                     # the upstream sightings fail before and pass after their fixes

The divergence matrix is written to target/conformance/MATRIX.md. To run the corpus in an SDK repository's own CI, see docs/sdk-ci.md.

Replay chains into an indexer

Needs Docker. The first run of a wallet-backend commit clones it and builds its image; after that it runs offline.

docker pull "$(scripts/pin.sh image timescaledb)"
shapekit harness run --adapter "adapters/bin/wb-adapter --commit $(scripts/pin.sh git wallet-backend)" \
  --chain cap40.signed-payload-signer.p30 --network testnet
shapekit harness reproduce --table adapters/walletbackend/reproductions.toml

Results are in harness-out/HARNESS.md. To put another indexer behind the harness, write an adapter as described in docs/adapter-interface.md.

Lint Go indexer code

cd <your indexer> && indexerlint ./...

Rules, suppressions and the baseline file are described in docs/linter.md. The same checks are a checklist in the guide for indexers in other languages.

The guide as a stellar-docs change

docs/guide/stellar-docs.patch adds the guide to stellar/stellar-docs as docs/data/indexers/build-your-own/indexer-hardening.mdx, with a link from the Build Your Own index and an entry in docs.json. It is made from the guide in this commit with the review-gate comments removed and corpus entries written as plain ids (shapekit guide table --plain-entries), on top of stellar-docs main at 734347c0. To apply it:

cd stellar-docs && git switch -c indexer-hardening-guide origin/main
git am /path/to/shapekit/docs/guide/stellar-docs.patch
pnpm install && pnpm check

Regenerate the corpus

Needs Docker and the pinned stellar-core image.

docker pull "$(scripts/pin.sh image stellar-core)"
shapekit gen verify-repro --family cap40.signed-payload-signer   # regenerate under both passphrases and compare byte for byte
shapekit gen chains --family cap40.signed-payload-signer --network both

This page is generated from README.md in the repository.

On this page