The TM2 Indexer is a robust and efficient indexing solution designed for Tendermint 2 based blockchain. It provides developers and operators with fast, reliable access to blockchain data for analytics, monitoring, and integration with external systems.
- Go 1.22+
- A Tendermint 2.0 node endpoint
- PostgreSQL (or compatible database)
$ git clone https://github.com/gnoverse/tm2-indexer.git
$ cd tm2-indexer
$ go build ./cmd/tm2-indexer
# or
$ make build
$ go test -v ./...
TM2 Indexer uses a configuration file to specify database connections, Tendermint node settings, and indexing options. Example configuration:
[rpc]
endpoint = "http://localhost:26657"
[database]
endpoint = "postgresql://postgres:[email protected]:5432/tm2-indexer?sslmode=disable"
[chain]
[chain.validators]
core-val-01 = "g1xxxxxx"
core-val-02 = "g1yyyyyy"
core-val-03 = "g1zzzzzz"
[scrapper]
batch_write = 300
goro_block_parser = 32
buffer_chan_blocks = 1000
buffer_chan_heights = 10000
Start the indexer with your configuration file:
$ ./tm2-indexer -config config.yaml