feat(ensindexer): introduce label healing from reverse registry#362
feat(ensindexer): introduce label healing from reverse registry#362
Conversation
Uses reverse registry records to heal label from transaction sender address
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…stry-subnames-auto-healing
…stry-subnames-auto-healing
Only the eth plugin uses the env-based feature flag, while other plugins have reverse addresses healing turned off
…stry-subnames-auto-healing
Simplify indexing handlers code and move extra complexity to config file for each plugin.
…stry-subnames-auto-healing
lightwalker-eth
left a comment
There was a problem hiding this comment.
@tk-o Thanks for updates. Reviewed and shared feedback!
| @@ -17,6 +21,63 @@ export const ROOT_NODE = namehash(""); | |||
|
|
|||
| export const makeSubnodeNamehash = (node: Hex, label: Hex) => keccak256(concat([node, label])); | |||
There was a problem hiding this comment.
Why are we using the word label here? This is NOT a label! It is a labelhash! I've flagged this issue and the importance of fixing it multiple times over several months.
There was a problem hiding this comment.
@shrugs is that change going to be covered in your PR?
| # | ||
| # WARNING: Setting this to `true` results in indexed data no longer being backwards compatible with the ENS Subgraph. For full | ||
| # data-level backwards compatibility with the ENS Subgraph, set this to `false`. | ||
| HEAL_REVERSE_ADDRESSES=true |
There was a problem hiding this comment.
Whenever we add configs that influence indexing behaviour, visibility of how these configs are set needs to be added to the indexing status dashboard in ENSAdmin.
|
|
||
| // if healing label from reverse addresses is possible, give it a go | ||
| if (canHealReverseAddressFromParentNode(node)) { | ||
| // TODO: if healing failed, log the event args for analysis and debugging |
There was a problem hiding this comment.
Seems nice for us to do this and then investigate these logs and see if we can identify patterns to better heal more of these cases?
There was a problem hiding this comment.
lightwalker-eth
left a comment
There was a problem hiding this comment.
Small language refinement suggested
Co-authored-by: lightwalker.eth <126201998+lightwalker-eth@users.noreply.github.com>
Co-authored-by: lightwalker.eth <126201998+lightwalker-eth@users.noreply.github.com>
| if (!rawValue) return DEFAULT_HEAL_REVERSE_ADDRESSES; | ||
| if (rawValue === "true") return true; | ||
| if (rawValue === "false") return false; |
| * Useful for identifying if a domain is used for reverse resolution. | ||
| * See apps/ensindexer/src/handlers/Registry.ts for context. | ||
| */ | ||
| export const REVERSE_ROOT_NODES: Set<Node> = new Set([namehash("addr.reverse")]); |
There was a problem hiding this comment.
This will enable healing reverse addresses for both, eth plugin, and linea plugin. This is due to Linea ENS implementation currently not following ENSIP-19 specs.
I believe the goal of this PR was to enable healing process for eth plugin only.
For context:
There was a problem hiding this comment.
closes #204
Suggested review order
package/ensnode-utilsupdates.apps/ensindexer/src/libupdates.apps/ensindexer/src/pluginsupdates.apps/ensindexer/src/handlersupdatesponder.config.tsupdates.Scope
This PR introduces a feature of healing labels based on reverse addresses. This feature can be toggled on and off, by setting to
HEAL_REVERSE_ADDRESSEStotrueorfalse, respectively. Please note, that only theethplugin is going to support the new feature, whilebaseandlineaplugins will not.To complete the feature, I had to:
HEAL_REVERSE_ADDRESSESenv var;canHealReverseAddressesandisReverseRootNode;handleNameRegistered&handleNewOwnerto attempt reverse address label healing before attempting ENSRainbow label healing;HEAL_REVERSE_ADDRESSESenv var valuePre-merge checklist
ethplugin on hasHEAL_REVERSE_ADDRESSESset tofalsePost-merge checklist
labelByReverseAddresscallResolves #204