plugeth-statediff/docs/indexer.md
Roy Crihfield ebc2eb37e7 Initial plugin implementation
* refactor packages, flags, subscriptions
* DRY refactor builder tests
* use mockgen to generate mocks
* update README
* MODE=statediff no longer needed for unit tests
* simplify func names, clean up metrics
* move write params to service field
* sql indexer: confirm quit after ipld cache reset
  prevents negative waitgroup panic
* don't let TotalDifficulty become nil
* use forked plugeth, plugeth-utils for now
2023-07-14 12:56:36 +08:00

14 lines
658 B
Markdown

# Statediff database indexing
To process data in real time as Geth syncs updates to the Ethereum execution layer, the statediff
service is able to directly transform and load data into a Postgres database. The `indexer` package
contains abstractions for handling this ingestion.
## Interface
A `StateDiffIndexer` object is responsible for inserting statediff data into a database, as well as managing watched address lists for a given database.
Three implementations are currently maintained:
* `sql` for direct insertion to Postgres
* `file` which writes to CSV for SQL files for insertion in a separate step
* `dump` which simply dumps to stdout