Repository navigation
fix(ens): read ENSv2 owners on mainnet - #1263
Merged
Merged
Conversation
ENSv2 went live on mainnet on 2026-10-27. Names registered there have no ENSv1 registry entry, and a migrated name's v1 entry belongs to the ENS Graveyard, so getEnsOwner and getSpaceController returned the empty address or the Graveyard for them. Pin the mainnet UniversalHelper, ENSV1Resolver and DNSTLDResolver so mainnet takes the ENSv2 path Sepolia already uses. The DNSTLDResolver is the one DNS TLDs are reserved with, not the newer one in the ENS address table. Co-Authored-By: Claude <noreply@anthropic.com>
10 of 11 tasks
The existing mainnet e2e cases already cover the three pins: a stale DNSTLDResolver pin makes the DNS fixtures read as unowned. Keep only the fixture swaps the change needs, and run the cases for a network without ENSv2 addresses on a made-up network, since mainnet no longer is one. Co-Authored-By: Claude <noreply@anthropic.com>
aavegotchi.eth was not migrated: it expired and another address registered it in ENSv2. ethenagovernance.eth kept its owner through the migration and its ENSv2 registration runs until 2029. Co-Authored-By: Claude <noreply@anthropic.com>
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.
ENSv2 went live on mainnet on 2026-10-27 and
getEnsOwnerstill reads only the ENSv1 registry there, so two kinds of names resolve to the wrong owner:pots1000.eth: the sequencer answerednot allowed.0xDa021A2C…), so the Graveyard reads as the owner.ethenagovernance.ethis one of 1,913 spaces whose owner migrated and is locked out this way.The ENSv2 path already exists (#1250) and runs on Sepolia. This adds the three mainnet addresses to
networks.jsonso mainnet takes it too. No source file changes.ensUniversalHelper0x46AE127D14683Ac74eF151e46ae2117A1A25C676ROOT_REGISTRYas the Universal ResolverensV1Resolver0x394D8EB4a4fDF599384DeAb25F31d111d755c398.ethspace name, bound to the v1 registryensDnsTldResolver0xaB48304A2520CE420E636AaCD48A8bb3e7e485EeThe deployed bytecode of all three matches the build artifacts in ensdomains/contracts-v2
v1.0.1, immutables masked.The ENS address table lists a newer
DNSTLDResolver(0x6695327E…), but no TLD is reserved with it. Pinning that one makes imported DNS names read as unowned: with that pin, four existing DNS e2e cases fail, so they guard it.Behaviour changes on mainnet
Measured on the 90,584 spaces the hub returns. Spaces on a live, unmigrated name keep the same owner.
Expired names lose their stale owner. A name whose ENSv2 reservation has lapsed (62 days after its v1 expiry) now reads as unowned. Before, the v1 registry kept naming the former owner for as long as nobody registered the name again. 16,866 spaces sit on such a name (124 verified) and have no controller until the name is registered again.
I chose to follow ENSv2 here:
Graveyard.clear()is permissionless and ENS has already swept 1.46M expired v1 names into it, so a stale v1 owner can be wiped by anyone at any time.Expired names registered by someone else change hands. 63 spaces (6 verified,
aavegotchi.ethwith 86k followers the largest) sit on a name that expired and was then registered in ENSv2 by another address. That address becomes the controller, where the Graveyard reads as owner today.This is not a new exposure.
getSpaceControlleralready reads thesnapshottext record through the Universal Resolver, so the new holder of such a name can make itself controller today by setting that record.aavegotchi-dao.ethis controlled that way right now.A further 116 spaces have an ENSv2 owner that differs from their v1 owner although the name never expired (migrated to another address, transferred or sold).
Tests
fox.eth, which expired and fails on master, to mainnetethenagovernance.eth, a migrated name registered until 2029. The subdomain case moves from2.snapspace.eth, whose parent expired, tosnapshot.dcl.eth.Test plan
yarn lint,yarn typecheck,yarn buildyarn test:once: 551 passedgetSpaceControlleragainst the built bundle throughrpc.brovider.xyz:pots1000.ethreturns its ENSv2 owner0xeD0F5128…, and a wrapped, a text-record, a DNS, an expired and a stale-subdomain name return what this description implies🤖 Generated with Claude Code