fix(ensindexer): update registrars plugin indexing logic and ENSDb schema#1527
Merged
lightwalker-eth merged 8 commits intomainfrom Jan 14, 2026
Merged
fix(ensindexer): update registrars plugin indexing logic and ENSDb schema#1527lightwalker-eth merged 8 commits intomainfrom
lightwalker-eth merged 8 commits intomainfrom
Conversation
Add `UniversalRegistrarRenewalWithReferrer` config
Constrain `_ensindexer_registrar_action_metadata` to at most 1 row. Related to #1287
Use upsert instead of insert when initializing temp record for storing metadata about the current "logical registrar action". This guarantees at most 1 record being stored in ENSDb at any given time.
Use a constant metadata type value for fetching metadata for the current "logical registarar action" from ENSDb. Also, add new invaraint to enforce that only events related to the current "logical registrar action" can be indexed.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 41d8bad The changes in this PR will be included in the next version bump. This PR includes changesets to release 17 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 |
This comment was marked as resolved.
This comment was marked as resolved.
… one metadata record.
…t most one metadata record in ENSDb for current "logical registrar action".
lightwalker-eth
approved these changes
Jan 14, 2026
Member
lightwalker-eth
left a comment
There was a problem hiding this comment.
@tk-o Looks great 😄 Thank you! 🚀
Contributor
Author
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.


Substantial PR
Reviewer Focus (Read This First)
What reviewers should focus on
Where should reviewers spend most of their time?
Call out:
If your answer is "everything," explain why targeted review isn't possible.
Limit this to 1-3 areas.
Problem & Motivation
Why this exists
Explain:
Keep this tight. Bullets are fine.
This PR solves two issues:
Indexing logic bug that was introduced in
v1.4.0that caused the logical key value to be differ when handling events from different contracts within the same “logical registrar action”.v1.4.0).ENSDb storage requirements. Multiple temporary records were stored (one for each indexed "logical registrar action") in ENSDb.
What Changed (Concrete)
What actually changed
List the concrete behavioral or structural changes in this PR.
This should be a factual inventory, not a narrative.
Prefer numbered bullets.
If this list starts getting long, that's a signal the PR may need splitting.
registrarsplugin was updated to only allow storing up to one record for the current "logical registrar action" metadata.node(domain ID) andtransactionHash.Design & Planning
How this approach was chosen
Self-Review
What you caught yourself
Describe what changed after you reviewed your own diff end-to-end.
This is not optional.
handleUniversalRegistrarRenewalEventfunction didn't have its params updated. I then removed thesubregistryIdand it fixed the issue.insertRegistrarActiontoupsertRegistrarAction, but then, during self-review, I noticed the logic is still about just the insert when it comes to registrar action records. The implementation detail ofinsertRegistrarActionchanged from insert to upsert the metadata record. After that, I renamedupsertRegistrarActionback toinsertRegistrarActionCross-Codebase Alignment
Related code you checked
Show that you looked beyond just the files in this PR.
Focus on directly related domains. Don't boil the ocean.
insertRegistrarActionhandleRegistrarControllerEventinternal_registrarActionMetadatalogicalEventIdmakeLogicalEventKeygetThisAccountIdnode: NodewithdomainId: DomainId. TheDomainIdtype is a branded type extending theNodetype, but update is not straight-forward. Is there a method we should apply to createDomainIdvalue fromNodevalue?internal_registrarActionMetadataschema with the generalensNodeMetadataschema that is introduced in PR feat(ensindexer): ENSDb Writer Worker #1406.Downstream & Consumer Impact
Who this affects and how
Explain how this change impacts:
Call out:
Point to actual diffs where possible.
Testing Evidence
How this was validated
Explain:
PLUGINS=subgraph NAMESPACE=sepolia pnpm -F ensindexer dev_ensindexer_registrar_action_metadatatable at any given moment.Scope Reductions
What you intentionally didn't do
List follow-ups you identified but explicitly deferred to keep this PR reviewable.
Link issues where applicable and explain the tradeoffs.
internal_registrarActionMetadataschema with the generalensNodeMetadataschema that is introduced in PR feat(ensindexer): ENSDb Writer Worker #1406.Risk Analysis
How this could go wrong
Call out:
v1.3.1registrar_actionstable in ENSDb so we can make sure no regressions were introduced to the last working codebase (v1.3.1).Pre-Review Checklist (Blocking)
Resolves #1287