A Go-based indexer for EVAA.finance. This service creates and maintains database tables with indexed blockchain data.
The indexer performs the following tasks:
- Connects to a specified PostgreSQL database
- Creates required tables for storing indexed data:
- Main pool/lp pool/alts pool users
- Operation logs
- Indexes blockchain data using DTON GraphQL API
- Continuously updates indexed data to stay in sync with blockchain
- Automatic table creation and schema migration
- Parallel data indexing with configurable workers
- Force resync option for full data reindexation
- Continuous sync with blockchain state
- Robust error handling and automatic recovery
docker build -t go-indexer .
docker run -d \
--name go-indexer \
--restart unless-stopped \
go-indexer
Configure database connection and indexing parameters in config.yaml
:
mode: "indexer"
dbType: "postgres"
dbHost: "ip"
dbPort: 5432
dbUser: "your_user"
dbPass: "your_password"
dbName: "your_database"
graphqlEndpoint: "https://dton.io/{your_api_key}/graphql"
userSyncWorkers: 32 depends on your dton plan
forceResyncOnEveryStart: false