Skip to content

fix(ens): read ENSv2 owners on mainnet - #1263

Merged
bonustrack merged 3 commits into
masterfrom
fix/ens-v2-mainnet
Nov 18, 2026
Merged

bonustrack merged 3 commits into
masterfrom
fix/ens-v2-mainnet

Conversation

@bonustrack

@bonustrack bonustrack commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

ENSv2 went live on mainnet on 2026-10-27 and getEnsOwner still reads only the ENSv1 registry there, so two kinds of names resolve to the wrong owner:

  • A name registered in ENSv2 has no v1 entry and resolves to the empty address. A user could not create a space on pots1000.eth: the sequencer answered not allowed.
  • A name migrated to ENSv2 has its v1 entry handed to the ENS Graveyard (0xDa021A2C…), so the Graveyard reads as the owner. ethenagovernance.eth is 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.json so mainnet takes it too. No source file changes.

Key Value Checked onchain
ensUniversalHelper 0x46AE127D14683Ac74eF151e46ae2117A1A25C676 same ROOT_REGISTRY as the Universal Resolver
ensV1Resolver 0x394D8EB4a4fDF599384DeAb25F31d111d755c398 resolver of every unmigrated .eth space name, bound to the v1 registry
ensDnsTldResolver 0xaB48304A2520CE420E636AaCD48A8bb3e7e485Ee resolver of every DNS TLD I sampled, bound to the v1 registry

The 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.eth with 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. getSpaceController already reads the snapshot text record through the Universal Resolver, so the new holder of such a name can make itself controller today by setting that record. aavegotchi-dao.eth is 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

  • e2e: the ENSv2 owner case moves from Sepolia fox.eth, which expired and fails on master, to mainnet ethenagovernance.eth, a migrated name registered until 2029. The subdomain case moves from 2.snapspace.eth, whose parent expired, to snapshot.dcl.eth.
  • Unit: the two cases for a network without ENSv2 addresses run on a made-up network, since mainnet no longer is one.

Test plan

  • yarn lint, yarn typecheck, yarn build
  • yarn test:once: 551 passed
  • Ran 0.18.0 and this branch side by side on 3,264 mainnet spaces covering every category above. Each result matched what the onchain state predicts, and no space got a different non-empty controller
  • Ran the sequencer's own getSpaceController against the built bundle through rpc.brovider.xyz: pots1000.eth returns its ENSv2 owner 0xeD0F5128…, and a wrapped, a text-record, a DNS, an expired and a stale-subdomain name return what this description implies
  • After release: bump in sx-monorepo (sequencer, hub, UI) and create a space on an ENSv2 name

🤖 Generated with Claude Code

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>
bonustrack and others added 2 commits November 19, 2026 00:12
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>
@bonustrack
bonustrack merged commit 2c1198f into master Nov 18, 2026
7 of 8 checks passed
@bonustrack
bonustrack deleted the fix/ens-v2-mainnet branch November 18, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant