Refactor: ENS data gathering#295
Merged
brunomenezes merged 6 commits intomainfrom May 8, 2026
Merged
Conversation
…ty checks per address.
…l to avoid node-rpc rate-limiting. Also, improve time log registering. * The query now use an address as query alias and check only the latest valid resolved name. * No post processing is necessary. It is sorted in the third-party service graphQL backend. * Before it was using the where clause with the filter resolvedAddress_in. Which forces a post processing on application level and the performance in the third-party service to be slow. * This change also eliminate the risk of addresses being out of the response due to some addresses having multiple changes through time.
* Add information for next explorer release v3.12.4
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Coverage Report for CI Build 25558778278Coverage increased (+0.06%) to 66.401%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
tuler
approved these changes
May 8, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Code changes to improve how the application gathers information about the ENS. This change is targeted for the batch updates when the cron job runs.
Due to the available ENS GraphQL queries, the previous implementation used the
resolvedAddress_inoperator of thedomainsquery and limited the number of addresses passed as parameters to thestatic querygenerated by thegqlfunction. The ratio betweencartesi users(i.e., those that are part of the staking ecosystem pool / staker / private-node) with a human-readable name was low, and the ratio of name changes through time to the resolved address was lower too (the assumption is that due to the cost of changing that would not increase significantly), which would make the post-processing reasonable and without loss of data as the query was returning every change but it has a limit.Lately, a few addresses have joined the staking ecosystem with many changes through time (e.g. changing just a letter or two 🤔). That causes addresses to be omitted from the response because a few fill in all available spots, completely breaking the ratio assumption.
The solution was to replace the
static querywith a single definitiondomains(....params...) { fields }to dynamically generate an aliased-by-address query. Each aliased query is only asking about the latest valid name for each address added individually. Also, it made the response perceivable faster as the in operator is replaced with equality checksAlso, I changed how the L1 resolver runs by adding a Promise Pool with controlled concurrency (default: 8) that can be increased or decreased by an environment variable. I added JS docs with reasoning behind, but TLDR; it is to avoid rate-limiting, timeouts, etc., from third-party services.
I also already added a changelog entry.
PS: I got a dump yesterday from the production DB with around 2181 rows to use locally; today it has already increased to 2219 in prod. So new addresses are joining the system.