Skip to content

Consider updates to Ponder Indexing Engine #2027

@tk-o

Description

@tk-o

@shrugs shared this feedback on this indexing-engines/ponder.ts file:

Maybe this is the wrong time to do this, but i do think that we should just remove the distinction between a setup event and an onchain event and just have two different integrations, one that runs once (upon any event) like this init function, and then another that runs for every event like my performance tracking helper, and that's it. I don't think we need to disambiguate between setup and onchain events.

It seems useful to create a dedicated files to host logic that is guaranteed to run

  1. Exactly once, for the entire lifecycle of an ENSIndexer instance, before the first event handler.
  2. Multiple times, before each event handler.

Feels like we already have achieved the 1st goal with how we integrated apps/ensindexer/src/lib/indexing-engines/init-indexing-onchain-events.ts file. We could simply stop checking the type of the event, as it does not matter if we run the logic once before the first setup handler or before the first onchain event handler. Semantic difference is minimal, feel free to check the sequence diagram for yourself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions