EkuboProtocol / indexer

Service for indexing Ekubo Protocol events to a postgres database
MIT License
22 stars 9 forks source link

@ekubo/indexer

Service for indexing Ekubo events into a Postgres database.

Overview

The indexer focuses on producing an always-consistent realtime view of Ekubo events, using the Apibara service to get a stream of relevant data.

Events are not transformed by the indexer, simply cataloged for later use such as in materialized views or complex analytical queries.

Syncing a new node

It can take weeks to sync a new mainnet node, so it's recommended to start by using the pg_restore utility with the latest backup of our production database.

The backup is in the directory format, and can be imported more quickly in parallel using the --jobs parameter of pg_restore. To utilize the backup:

After restoring from the backup, you can start the indexer and it should begin at the last block that was synced before the backup started.