- Category
- Crypto
- Rank
- No. 1416Tools index
Previous survey · No. 1402 ·
- Pricing
- Open Source
- Type
- TOOL
- Builder
- @gakonst
- GitHub
- 103 stars
- Latest release
- tidx@0.7.0
- Date
About
A blazing fast indexer for Tempo blockchain data that uses a hybrid PostgreSQL + ClickHouse architecture. It provides fast point lookups (OLTP) and lightning-fast analytics (OLAP) with lazy event decoding, allowing developers to query blockchain data using human-readable SQL.
What it does
Tidx continuously collects blocks, transactions, receipts, and logs from a Tempo node. It follows the chain head while filling older gaps, stores structured records, decodes requested contract activity, and serves the resulting data through command-line and HTTP query interfaces.
Why it's ranked here
A strong pick for teams committed to Tempo and willing to operate databases. It combines live ingestion, historical backfill, gap tracking, retention controls, query routing, metrics, and status reporting in one service. That breadth removes substantial indexing work without pretending to be a general blockchain platform.
What's good
The retention design keeps recent records close while preserving older history in the archive. Expanding the hot window restores data before moving its boundary, while shrinking it moves the boundary before dropping expired partitions. ClickHouse queries support connection failover, enforced limits, timeouts, and bounded response sizes. Prometheus metrics expose ingestion, lag, gaps, pruning, query timing, and sink health.
Tradeoffs
The tool targets Tempo rather than arbitrary chains. PostgreSQL remains required, while analytical storage adds ClickHouse and extra operational complexity. Cross-database queries depend on a pinned build containing an unreleased fix because the documented stable release can crash PostgreSQL for correlated foreign-table queries. Pushed aggregates may also differ slightly between database numeric types.
How to use it well
Use tidx behind explorers, wallet services, token dashboards, and DEX analytics that need maintained Tempo history. Start with PostgreSQL, add ClickHouse when scans or archive retention justify another datastore, and monitor sync gaps and sink progress. It does not replace the Tempo node, build an application interface, or provide a chain-agnostic indexing framework.
Technical notes+
Cargo.toml defines Rust 2024 binary and library targets, uses Tokio, Axum, Clap, tokio-postgres, ClickHouse, Alloy, SQLParser, and Prometheus tooling, and warns on unsafe code. src/main.rs dispatches init, up, status, query, views, receipt backfill, and upgrade commands. src/api/mod.rs builds GET query, health, status, and view-management routes, caps concurrent API queries at eight, and supports server-sent live updates. src/clickhouse.rs validates public queries, clamps row limits, applies timeouts, caps responses at 10 MiB, and fails over only for connection errors. src/config.rs supports multiple chains, separate API replicas, environment-sourced credentials, ClickHouse failover URLs, replicated tables, and reversible PostgreSQL retention. src/virtual_address.rs conservatively identifies TIP-1022 forwarding hops within individual transactions. The Makefile defines formatting, compilation, lint, unit, integration, and benchmark workflows.
Observed
- License
- MIT
- Primary language
- Rust, using the 2024 edition
- Packaging and installation
- Published Docker image and source builds through Cargo
- Interfaces
- CLI, Rust library target, HTTP API, SQL query surface, and server-sent live updates
- Storage
- PostgreSQL is required per configured chain; ClickHouse and tiered retention are optional
- Project checks
- Make targets cover formatting, compilation, Clippy, unit tests, integration tests, and benchmarks
Read from README.md, Makefile, Cargo.toml, src/lib.rs, src/main.rs, src/tempo.rs, src/types.rs, src/config.rs, src/metrics.rs, src/broadcast.rs, src/clickhouse.rs, src/virtual_address.rs, src/db/mod.rs, src/api/mod.rs.
What it can do
Index Tempo blockchain data
Tempo blockchain data → Indexed data in PostgreSQL + ClickHouse databases
Execute OLTP queries on blockchain data
SQL queries for point lookups → Fast query results from PostgreSQL
Execute OLAP queries for blockchain analytics
SQL analytical queries → Lightning-fast analytical results from ClickHouse
Decode blockchain events on demand
Raw blockchain event data → Human-readable decoded event data
Query blockchain data with SQL
Human-readable SQL queries → Structured blockchain data results
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.
