-
Notifications
You must be signed in to change notification settings - Fork 15
New Indexing Status UI + config and indexing-status endpoint support to ensnode-sdk and ensnode-react #919
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
Conversation
Introduce `config()` method for the Confing API, and the `indexingStatus()` method for the Indexing Status API.
🦋 Changeset detectedLatest commit: 95356d9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Use unassigned server error codes to interpret server errors on the client side
Intergrate the Indexing Status API from ENSNode.
lightwalker-eth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tk-o Thanks for the updates here 👍 Reviewed and shared feedback.
| const ensRainbowApiClient = getENSRainbowApiClient(); | ||
| const { versionInfo: ensRainbowDependencyInfo } = await ensRainbowApiClient.version(); | ||
|
|
||
| // use a fallback for backwards compatibility |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FOR POST-MERGE FOLLOW UP:
I believe this fallback is only for the purpose of ENSRainbow before we merged the big PR #612
But now that is merged and therefore this fallback should no longer be needed. We should always have ensRainbowDependencyInfo.dbSchemaVersion now I believe.
Additional goal: Remove the @ts-ignore.
apps/ensadmin/src/components/recent-registrations/components.tsx
Outdated
Show resolved
Hide resolved
| ); | ||
| } | ||
| // Get the current indexing date from the indexing status | ||
| const currentIndexingDate = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FOR POST-MERGE FOLLOW UP:
I recorded a future follow up opportunity here: #946
| * Sort a list of [{@link ChainId}, {@link ChainIndexingStatus}] tuples | ||
| * by start block timestamp in ascending order. | ||
| */ | ||
| export function sortAscChainStatusesByStartBlock<ChainStatusType extends ChainIndexingStatus>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FOR POST-MERGE FOLLOW UP:
| export function sortAscChainStatusesByStartBlock<ChainStatusType extends ChainIndexingStatus>( | |
| export function sortEarliestOmnichainStartBlock<ChainIndexingStatusType extends ChainIndexingStatus>( |
lightwalker-eth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're good to merge this now 🚀
This PR aims to replace ENSAdmin dependency on the
/metadataendpoint with new ENSNode APIs: Config API and Indexing Status API.This PR does not aim to create a perfect data model for ENSAdmin. The PR builds on top of the current data model, and replaces its parts where needed.
Suggested review order:
packages/ensnode-sdkapps/ensindexerapps/ensadminENSNode SDK
This PR extends the
ENSNodeClientclass by:config()method to access Config API, andindexingStatus()method to access Indexing Status API.Both methods return fully validated data models.
Moreover, the
ChainIndexingBackfillStatusnow includeslatestSyncedBlockfield to highlight the progress of building RPC cache. Relevant invariants have been updated.There are three new helper methods added in the
indexing-statusmodule:getTimestampForLowestOmnichainStartBlockgetTimestampForHighestOmnichainKnownBlocksortAscChainStatusesByStartBlockAll of them come handy while working with a client data model, such as indexing timeline, which needs to know when the indexing started, and where the latest known block is. Also, Sorting chains by
config.startBlockallows nice UX.ENSIndexer
latestSyncedBlockfield for the backfill chain statuses.ENSAdmin
useENSIndexerConfig,useIndexingStatus) for using the newENSNodeClientmethods:config()andindexingStatus().components.tsxfile of Indexing Status module into more files which focus on specific ideas.useENSIndexerConfig,useIndexingStatus) to interact with ENSNode APIs.