-
Notifications
You must be signed in to change notification settings - Fork 15
feat: new sepolia-v2 namespace for temp ensv2 deployment #1516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 765a332 The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
lightwalker-eth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shrugs Thanks for updates. Seeking your advice, thanks 👍
42a3165 to
dd271d1
Compare
📝 WalkthroughWalkthroughAdds an experimental "sepolia-v2" ENS namespace/datasource, updates SDK/UI/admin mappings to include SepoliaV2, removes ENSv2 entries from existing Sepolia/Mainnet datasources, and refactors API/indexer/plugins to use dynamic contract lookups and additional guards for ENSv2 bridging and cache handling. Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client
participant API as GraphQL API
participant DS as DatasourceLayer
participant Registry as ENSRoot ETHRegistry
participant Namechain as Namechain ETHRegistry
Client->>API: getDomainByFqdn(fqdn)
API->>DS: maybeGetDatasourceContract(ENSRoot)
DS-->>API: ENSRoot ETHRegistry or null
API->>DS: maybeGetDatasourceContract(Namechain)
DS-->>API: Namechain ETHRegistry or null
alt both registries missing
API-->>Client: return null (early exit)
else registries available
API->>Registry: validate leaf.registryId == ENS_ROOT_V2_ETH_REGISTRY_ID
alt leaf belongs to ENSRoot
API->>API: v2_getDomainIdByFqdn (validate depth/path/leaf)
API-->>Client: domainId or defer
else leaf not on ENSRoot
API->>Namechain: compute 2LD node & check active ENSv1 registration
alt active ENSv1 registration exists
API->>API: call v1_getDomainIdByFqdn
API-->>Client: v1 result
else
API->>Namechain: v2_getDomainIdByFqdn (shortened name)
Namechain-->>API: domainId or null
API-->>Client: result or null
end
end
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
…ended for testing of ephemeral ENSv2 deployments to the Sepolia chain. This feature is intended for developers of the ENS protocol, and should be considered highly experimental and unstable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new temporary sepolia-v2 namespace to support ENSv2 test deployments on the Sepolia testnet. This creates a separate namespace from the original Sepolia ENS deployment, allowing both ENSv1 and ENSv2 contracts to coexist for testing purposes.
Changes:
- Created a new
sepolia-v2namespace that extends the base Sepolia namespace with ENSv2 contracts - Removed ENSv2 contract stubs from the original Sepolia and Mainnet namespaces
- Updated all namespace-specific utility functions to handle SepoliaV2 consistently with Sepolia
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/datasources/src/sepolia-v2.ts | New file defining the SepoliaV2 namespace with ENSv2 contracts on ENSRoot and a new Namechain datasource |
| packages/datasources/src/namespaces.ts | Registers the sepolia-v2 namespace in the namespace map |
| packages/datasources/src/lib/types.ts | Adds SepoliaV2 to ENSNamespaceIds enum and removes unused MergeNamespaces type |
| packages/datasources/src/sepolia.ts | Removes ENSv2 contract stubs and commented-out Namechain configuration |
| packages/datasources/src/mainnet.ts | Removes ENSv2 contract stubs and commented-out Namechain configuration |
| packages/namehash-ui/src/utils/ensMetadata.ts | Adds SepoliaV2 case to use Sepolia metadata service URL |
| packages/namehash-ui/src/utils/ensManager.ts | Adds SepoliaV2 case to use Sepolia ENS manager URL |
| packages/ensnode-sdk/src/shared/thegraph.ts | Adds SepoliaV2 case to use Sepolia subgraph URL |
| packages/ensnode-sdk/src/registrars/*.ts | Adds SepoliaV2 cases to return appropriate managed names for subregistries |
| apps/ensindexer/src/plugins/protocol-acceleration/plugin.ts | Adds conditional check for Registry contract existence for backwards compatibility |
| apps/ensindexer/src/plugins/ensv2/plugin.ts | Adds conditional checks for ENSv2 contract existence and refactors reduce logic |
| apps/ensindexer/src/lib/ponder-helpers.ts | Refactors disableCache logic into a variable for better readability |
| apps/ensapi/src/graphql-api/lib/get-domain-by-fqdn.ts | Refactors ENSv2 contract lookups to use maybeGetDatasourceContract for backwards compatibility |
| apps/ensadmin/src/lib/default-records-selection.ts | Adds default records selection for SepoliaV2 namespace |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@apps/ensapi/src/graphql-api/lib/get-domain-by-fqdn.ts`:
- Around line 201-209: The fallback call to v2_getDomainIdByFqdn is not
receiving the caller's custom now value, causing inconsistent expiry checks;
update the call in get-domain-by-fqdn so it forwards the now parameter (e.g.,
v2_getDomainIdByFqdn(NAMECHAIN_V2_ETH_REGISTRY_ID, nameWithoutTld, now)) and
ensure any intermediary helpers (interpretedLabelsToInterpretedName /
interpretedNameToInterpretedLabels usage) remain unchanged; if
v2_getDomainIdByFqdn signature lacks a now param, add it and thread the now
argument through the recursive ENSv2 lookup path.
- Around line 133-199: The early Namechain lookup (maybeGetDatasourceContract ->
NAMECHAIN_V2_ETH_REGISTRY) and its null-return guard should be deferred so ENSv1
fallback can run; remove the early `if (!NAMECHAIN_V2_ETH_REGISTRY) return
null;` and move the Namechain datasource lookup and construction of
NAMECHAIN_V2_ETH_REGISTRY_ID to just before the code that actually uses it
(after the ENSv1 check that calls makeENSv1DomainId, getLatestRegistration,
isRegistrationFullyExpired and v1_getDomainIdByFqdn); ensure the
ENS_ROOT_V2_ETH_REGISTRY lookup and its null guard remain as-is and keep the
label/path invariants unchanged.
In `@package.json`:
- Around line 43-45: Replace the unbounded greater-than ranges in the overrides
for tar and lodash with caret ranges to prevent accidental major upgrades:
update the override entries "tar@<=7.5.3" from ">=7.5.4" to use "^7.5.4" and
update "lodash@<=4.17.22" and "lodash-es@<=4.17.22" from ">=4.17.23" to use
"^4.17.23" so the intent is expressed as compatible-semver rather than an
open-ended >= constraint.
|
Note Unit test generation is an Early Access feature. Expect some limitations and changes as we gather feedback and continue to improve it. Generating unit tests... This may take up to 20 minutes. |
Docstrings generation was requested by @shrugs. * #1516 (comment) The following files were modified: * `apps/ensapi/src/graphql-api/lib/get-domain-by-fqdn.ts` * `apps/ensindexer/src/lib/ponder-helpers.ts` * `packages/ensnode-sdk/src/registrars/basenames-subregistry.ts` * `packages/ensnode-sdk/src/registrars/ethnames-subregistry.ts` * `packages/ensnode-sdk/src/registrars/lineanames-subregistry.ts` * `packages/namehash-ui/src/utils/ensManager.ts` * `packages/namehash-ui/src/utils/ensMetadata.ts`
|
Caution The CodeRabbit agent's plans did not produce any file changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 18 out of 19 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
apps/ensindexer/src/plugins/protocol-acceleration/plugin.ts:159
- The code should check if "Registry" exists in namechain.contracts before accessing it, similar to how it's checked for ensroot.contracts on line 148. This would make the code more defensive and consistent with the approach in the ensv2 plugin. Consider adding the check:
...(namechain && "Registry" in namechain.contracts &&
...(namechain &&
chainConfigForContract(
config.globalBlockrange,
namechain.chain.id,
namechain.contracts.Registry,
)),
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lightwalker-eth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shrugs Looks great. Thanks! Shared a few small feedback items. Please take the lead to merge when ready 👍
makes a new temporary namespace for the test deployments of ensv2 contracts on sepolia.
this pr represents the temporary ad hoc deployment of ensv2 to the sepolia chain as an independent sepolia namespace to avoid interrupting mainstream usage of the existing sepolia namespace
confirmed indexed to latest