Nuthatch: a blockchain indexer in one static Rust binary (redb, content-addressed Parquet, DataFusion, DBSP)
Nuthatch turns an EVM contract's events into SQL tables on your own machine, from one binary. Point it at an address, it fetches the ABI, backfills over JSON-RPC and follows the chain.
The parts that might interest people here:
- redb holds blocks a reorg can still take back. A reorg is a rollback on redb and nothing else.
- Parquet past finality, cut at a block boundary chosen by the data and named by its own sha256, so the same binary on the same chain writes byte-identical files on two machines.
- SQL runs on Burrmill, our engine on Apache DataFusion, over the hot rows unioned with sealed Parquet. It replaced DuckDB in 4.1. Not for speed: it takes about 2.5x DuckDB's time per statement. It bought one language in the binary and exact arithmetic that refuses instead of wrapping.
- DBSP maintains incremental views, so a reorg is a retraction rather than hand-written undo logic.
- Under 2 GB of RAM per chain, enforced in CI. No Postgres, no telemetry, MIT/Apache-2.0.
Repo: GitHub - nightswatchhq/nuthatch: Be your own indexer. One Rust binary, one command, live indexed API in under two minutes. No mandatory third-party data dependency. · GitHub
Why I built it: Why I built Nuthatch - Nuthatch
Solo project. Questions and criticism both welcome.
1 post - 1 participant