An indexer can be perfectly live and completely wrong. karat67 is the check for that.
An open-source Rust crate and CLI that tests indexed Solana data against the chain itself. Three checks ship, each returning one uniform result and a non-zero exit code on anything short of a pass, so it drops into a pipeline step or a CI job with no wrapper around it.
- Shape. Validates account data length and the 8-byte Anchor discriminator against the program IDL. This is the failure class that emptied my own Obligation rows while every dashboard stayed green.
- Reconciliation. Samples indexed accounts, refetches them over getMultipleAccounts, and byte-diffs stored against on-chain. Slot-lag tolerance is explicit: a row inside the window is reported Skipped with its reason, never quietly passed.
- Completeness. Compares indexed slots against getBlocks rather than a contiguous range, so slots the leader skipped are not miscounted as data loss.
Design choices that matter to whoever inherits this: ureq and rustls instead of the full solana-client stack, so a build needs a Rust toolchain and nothing else, no system OpenSSL. An AccountFetcher trait with a mock implementation, so reconciliation tests run offline and deterministically. A KaratIntegrityProcessor that sits after account decode in a Carbon pipeline, adding checks to an existing indexer without depending on the Carbon crate or rewriting the pipeline.
$ karat shape --account-type UserMetadata --len 1032
{
"check": "shape(UserMetadata)",
"status": "Pass",
"detail": null
}
exit 0
$ karat shape --account-type UserMetadata --len 0
{
"check": "shape",
"status": "Fail",
"detail": "empty payload: 0 bytes, every allocated
account starts with an 8-byte discriminator"
}
exit 1 the 158.9-hour incident, in one call
Rust 2024clapserdeureq + rustlsSolana JSON-RPCAnchor IDLCarbon adapterCI exit codes