-
Notifications
You must be signed in to change notification settings - Fork 16
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
Merged
+21,164
−0
Merged
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5afa0b3
Add "Startup sequence" sub-page to ENSIndexer docs
tk-o b2b9da5
docs(changeset): Added "Startup sequence" page to ENSIndexer docs.
tk-o c8e162f
Apply AI PR feedback
tk-o c6d8654
Apply suggestions from code review
tk-o 21788d8
Include excalidraw file used to generate diagrams for ENSIndexer star…
tk-o b38b179
Fix typo
tk-o df03282
Merge remote-tracking branch 'origin/main' into docs/1233-ensindexer-…
tk-o File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@docs/ensnode": minor | ||
| --- | ||
|
|
||
| Added "Startup sequence" page to ENSIndexer docs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.17 MB
...nsnode.io/public/ensindexer/startup-sequence/1-ensindexer-schema-migrations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+305 KB
...nsnode.io/public/ensindexer/startup-sequence/2-omnichain-strategy-execution.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.17 MB
...ensnode.io/public/ensindexer/startup-sequence/3-init-onchain-event-handlers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions
42
docs/ensnode.io/src/content/docs/ensindexer/concepts/startup-sequence.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> | ||
| [](/public/ensindexer/startup-sequence/0-overview.png) | ||
|
tk-o marked this conversation as resolved.
Outdated
|
||
| </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> | ||
| [](/public/ensindexer/startup-sequence/1-ensindexer-schema-migrations.png) | ||
|
tk-o marked this conversation as resolved.
Outdated
|
||
| </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> | ||
| [](/public/ensindexer/startup-sequence/2-omnichain-strategy-execution.png) | ||
|
tk-o marked this conversation as resolved.
Outdated
|
||
| </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> | ||
| [](/public/ensindexer/startup-sequence/3-init-onchain-event-handlers.png) | ||
|
tk-o marked this conversation as resolved.
Outdated
tk-o marked this conversation as resolved.
Outdated
|
||
| </figure> | ||
|
tk-o marked this conversation as resolved.
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.