-
Notifications
You must be signed in to change notification settings - Fork 17
Add "Startup sequence" sub-page to ENSIndexer docs #2012
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
5afa0b3
b2b9da5
c8e162f
c6d8654
21788d8
b38b179
df03282
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@docs/ensnode": minor | ||
| --- | ||
|
|
||
| Added "Startup sequence" page to ENSIndexer docs. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| --- | ||
| title: ENSIndexer Startup Sequence | ||
| description: Learn about the startup sequence of ENSIndexer. | ||
| sidebar: | ||
| label: Startup Sequence | ||
| order: 1 | ||
| --- | ||
|
|
||
| Below is an architecture diagram describing ENSIndexer start sequence in detail. | ||
|
|
||
| ## Ponder app lifecycle | ||
|
|
||
| Here is the top-level view on the ENSIndexer start sequence. It's really the overview of the Ponder app lifecycle running inside the ENSIndexer instance. The example assumes that the ENSIndexer was started with the `ENSINDEXER_SCHEMA_NAME` environment variable set to `prod_0`, but the same sequence applies to any ENSIndexer Schema. | ||
|
tk-o marked this conversation as resolved.
Outdated
|
||
|
|
||
| <figure> | ||
| [](/ensindexer/startup-sequence/0-overview.png) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it also possible to commit the file(s) that were used to generate these diagrams? That would be awesome!
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, will add it at |
||
| </figure> | ||
|
tk-o marked this conversation as resolved.
tk-o marked this conversation as resolved.
|
||
|
|
||
| ## ENSIndexer Schema migrations | ||
|
tk-o marked this conversation as resolved.
Outdated
|
||
|
|
||
| When Ponder app lifecycle reaches the "Execute migrations for the `prod_0` ENSIndexer Schema" step, Ponder will execute all pending migrations for the `prod_0` ENSIndexer Schema. | ||
|
tk-o marked this conversation as resolved.
Outdated
|
||
| This ensures that the database schema is up to date before indexing onchain events start. | ||
|
tk-o marked this conversation as resolved.
Outdated
|
||
|
|
||
| <figure> | ||
| [](/ensindexer/startup-sequence/1-ensindexer-schema-migrations.png) | ||
| </figure> | ||
|
tk-o marked this conversation as resolved.
tk-o marked this conversation as resolved.
|
||
|
|
||
| ## Omnichain indexing strategy | ||
|
|
||
| When Ponder app lifecycle reaches the "Run omnichain indexing strategy" step, Ponder will start writing data concurrently to Ponder Schema (caching RPC calls) and ENSIndexer Schema (storing indexed data). ENSIndexer app lifecycle "injects" a special "Execute onchain event handlers preconditions" step. | ||
|
tk-o marked this conversation as resolved.
Outdated
|
||
|
|
||
|
tk-o marked this conversation as resolved.
|
||
| <figure> | ||
| [](/ensindexer/startup-sequence/2-omnichain-strategy-execution.png) | ||
| </figure> | ||
|
tk-o marked this conversation as resolved.
tk-o marked this conversation as resolved.
|
||
|
|
||
| ### Init onchain event handlers | ||
|
|
||
| The special "Execute onchain event handlers preconditions" step occurs before any onchain event is indexed. This allows ENSIndexer to execute ENSNode Schema migrations and populate ENSNode Metadata table with relevant data before any onchain event handlers are executed. | ||
|
tk-o marked this conversation as resolved.
Outdated
|
||
|
|
||
| <figure> | ||
| [](/ensindexer/startup-sequence/3-init-onchain-event-handlers.png) | ||
| </figure> | ||
|
tk-o marked this conversation as resolved.
|
||
Uh oh!
There was an error while loading. Please reload this page.