Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
12cb6eb
fix(apps): hardcode ens-normalize package version
tk-o Oct 6, 2025
b2b0ea0
feat(ensindexer): extend dependecy info
tk-o Oct 6, 2025
13b298c
fix: pnpm lockfile
tk-o Oct 6, 2025
f7b528e
fix mocked data
tk-o Oct 6, 2025
e6b8c9f
Merge remote-tracking branch 'origin/main' into feat/ensindexer-exten…
tk-o Oct 6, 2025
9484725
Merge remote-tracking branch 'origin/main' into feat/ensindexer-exten…
tk-o Oct 7, 2025
cb3be0c
feat(ensadmin): present the actual version refernces
tk-o Oct 7, 2025
d560e15
docs(terminology): include terms defining `ENS Normalize`
tk-o Oct 7, 2025
6cb5d9f
docs(terminology): include terms defining `ENS Normalize`
tk-o Oct 7, 2025
0b84163
Merge branch 'feat/ensindexer-extend-dependency-info' of github.com:n…
tk-o Oct 7, 2025
54c29d2
docs(changeset): Ensure only the selected version of `@adraffy/ens-no…
tk-o Oct 7, 2025
ab1a677
docs(changeset): Extend `DependencyInfo` with `ensDb`, `ensIndexer`, …
tk-o Oct 7, 2025
e14bda9
docs(changeset): Present all entries from `DependencyInfo` in the UI.
tk-o Oct 7, 2025
f7ca6b3
docs(changeset): Update `Terminology` page to include information abo…
tk-o Oct 7, 2025
a95abc7
apply pr feedback
tk-o Oct 7, 2025
1055007
Merge remote-tracking branch 'origin/main' into feat/ensindexer-exten…
tk-o Oct 7, 2025
b7b8d54
refactor: rename dependency info file
tk-o Oct 7, 2025
5b6f690
refactor: rename dependency info file
tk-o Oct 7, 2025
b643fce
Merge remote-tracking branch 'origin/main' into feat/ensindexer-exten…
tk-o Oct 8, 2025
5c81da7
apply pr feedback
tk-o Oct 9, 2025
e31fa88
apply pr feedback
tk-o Oct 9, 2025
77833a5
apply uat feedback
tk-o Oct 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apps/ensadmin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"test": "vitest"
},
"dependencies": {
"@adraffy/ens-normalize": "catalog:",
"@anthropic-ai/sdk": "^0.60.0",
"@ensnode/datasources": "workspace:*",
"@ensnode/ensnode-react": "workspace:*",
Expand Down
12 changes: 6 additions & 6 deletions apps/ensadmin/src/app/mock/config-info/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"referrals",
"tokenscope"
],
"dependencyInfo": {
"versionInfo": {
"nodejs": "22.18.0",
"ponder": "0.11.43",
"ensDb": "0.35.0",
Expand All @@ -36,7 +36,7 @@
"labelSetId": "subgraph",
"labelSetVersion": 0
},
"dependencyInfo": {
"versionInfo": {
"nodejs": "22.18.0",
"ponder": "0.11.43",
"ensDb": "0.35.0",
Expand Down Expand Up @@ -65,7 +65,7 @@
"labelSetId": "subgraph",
"labelSetVersion": 0
},
"dependencyInfo": {
"versionInfo": {
"nodejs": "22.18.0",
"ponder": "0.11.43",
"ensDb": "0.35.0",
Expand All @@ -87,7 +87,7 @@
"labelSetId": "subgraph",
"labelSetVersion": 0
},
"dependencyInfo": {
"versionInfo": {
"nodejs": "22.18.0",
"ponder": "0.11.43",
"ensDb": "0.35.0",
Expand All @@ -109,7 +109,7 @@
"labelSetId": "subgraph",
"labelSetVersion": 0
},
"dependencyInfo": {
"versionInfo": {
"nodejs": "22.18.0",
"ponder": "0.11.43",
"ensDb": "0.35.0",
Expand All @@ -131,7 +131,7 @@
"labelSetId": "subgraph",
"labelSetVersion": 0
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This "Serialization Error" case is no longer triggering a serialization error as expected.

CleanShot 2025-10-09 at 14 24 39

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

"dependencyInfo": {
"versionInfo": {
"nodejs": "22.18.0",
"ponder": "0.11.43",
"ensDb": "0.35.0",
Expand Down
8 changes: 4 additions & 4 deletions apps/ensadmin/src/app/mock/recent-registrations/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"referrals",
"tokenscope"
],
"dependencyInfo": {
"versionInfo": {
"nodejs": "22.18.0",
"ponder": "0.11.43",
"ensDb": "0.35.0",
Expand Down Expand Up @@ -121,7 +121,7 @@
"referrals",
"tokenscope"
],
"dependencyInfo": {
"versionInfo": {
"nodejs": "22.18.0",
"ponder": "0.11.43",
"ensDb": "0.35.0",
Expand Down Expand Up @@ -156,7 +156,7 @@
"referrals",
"tokenscope"
],
"dependencyInfo": {
"versionInfo": {
"nodejs": "22.18.0",
"ponder": "0.11.43",
"ensDb": "0.35.0",
Expand Down Expand Up @@ -271,7 +271,7 @@
"referrals",
"tokenscope"
],
"dependencyInfo": {
"versionInfo": {
"nodejs": "22.18.0",
"ponder": "0.11.43",
"ensDb": "0.35.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export function ENSNodeConfigInfo({
value: <p className={cardItemValueStyles}>Postgres</p>,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you swap the order that these fields appear with in the UI?

CleanShot 2025-10-09 at 14 21 20

},
]}
version={ensIndexerConfig.dependencyInfo.ensDb}
version={ensIndexerConfig.versionInfo.ensDb}
docsLink={new URL("https://ensnode.io/ensdb/")}
/>
{/*It's safe to assume that the version number of ENSDb is always equal to the version number of ENSIndexer.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment should now be removed.

Expand All @@ -137,27 +137,27 @@ export function ENSNodeConfigInfo({
{
label: "Ponder",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an info tooltip to Ponder similar to the one you created for ens-normalize.js? It would be cool to include a similar link in this tooltip.

value: (
<p className={cardItemValueStyles}>{ensIndexerConfig.dependencyInfo.ponder}</p>
<p className={cardItemValueStyles}>{ensIndexerConfig.versionInfo.ponder}</p>
),
},
{
label: "Node.js",
value: (
<p className={cardItemValueStyles}>{ensIndexerConfig.dependencyInfo.nodejs}</p>
<p className={cardItemValueStyles}>{ensIndexerConfig.versionInfo.nodejs}</p>
),
},
{
label: "ENS Normalize",
Comment thread
lightwalker-eth marked this conversation as resolved.
Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
label: "ENS Normalize",
label: "ens-normalize.js",

value: (
<p className={cardItemValueStyles}>
{ensIndexerConfig.dependencyInfo.ensNormalize}
{ensIndexerConfig.versionInfo.ensNormalize}
</p>
),
additionalInfo: (
<p>
Version of{" "}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Version of{" "}
Version of the{" "}

<ExternalLinkWithIcon
href={`https://www.npmjs.com/package/@adraffy/ens-normalize/v/${ensIndexerConfig.dependencyInfo.ensNormalize}`}
href={`https://www.npmjs.com/package/@adraffy/ens-normalize/v/${ensIndexerConfig.versionInfo.ensNormalize}`}
>
<code className="text-xs">@adraffy/ens-normalize</code> package
</ExternalLinkWithIcon>{" "}
Expand Down Expand Up @@ -251,7 +251,7 @@ export function ENSNodeConfigInfo({
icon: <IconENS width={18} height={18} className="text-[#3F3F46] flex-shrink-0" />,
},
]}
version={ensIndexerConfig.dependencyInfo.ensIndexer}
version={ensIndexerConfig.versionInfo.ensIndexer}
docsLink={new URL("https://ensnode.io/ensindexer/")}
/>
{/*TODO: The current approach to displaying the version of ENSIndexer is a stretch.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment should be removed.

Expand All @@ -265,7 +265,7 @@ export function ENSNodeConfigInfo({
label: "Schema Version",
value: (
<p className={cardItemValueStyles}>
{ensIndexerConfig.dependencyInfo.ensRainbowSchema}
{ensIndexerConfig.versionInfo.ensRainbowSchema}
</p>
),
},
Expand Down Expand Up @@ -300,7 +300,7 @@ export function ENSNodeConfigInfo({
),
},
]}
version={ensIndexerConfig.dependencyInfo.ensRainbow}
version={ensIndexerConfig.versionInfo.ensRainbow}
docsLink={new URL("https://ensnode.io/ensrainbow/")}
/>
</div>
Expand Down
1 change: 0 additions & 1 deletion apps/ensindexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@adraffy/ens-normalize": "catalog:",
"@ensdomains/ensjs": "^4.0.2",
"@ensnode/datasources": "workspace:*",
"@ensnode/ensnode-schema": "workspace:*",
Expand Down
6 changes: 3 additions & 3 deletions apps/ensindexer/src/config/public.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getDependencyInfo } from "@/lib/dependency-info";
import { getVersionInfo } from "@/lib/version-info";
import type { ENSIndexerPublicConfig } from "@ensnode/ensnode-sdk";
import type { ENSIndexerConfig } from "./types";

Expand All @@ -11,7 +11,7 @@ import type { ENSIndexerConfig } from "./types";
export async function buildENSIndexerPublicConfig(
config: ENSIndexerConfig,
): Promise<ENSIndexerPublicConfig> {
const dependencyInfo = await getDependencyInfo();
const versionInfo = await getVersionInfo();

return {
databaseSchemaName: config.databaseSchemaName,
Expand All @@ -22,6 +22,6 @@ export async function buildENSIndexerPublicConfig(
isSubgraphCompatible: config.isSubgraphCompatible,
namespace: config.namespace,
plugins: config.plugins,
dependencyInfo,
versionInfo,
};
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { existsSync, readFileSync } from "node:fs";
import { existsSync, readFileSync, readdirSync } from "node:fs";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import packageJson from "@/../package.json";
import { getENSRainbowApiClient } from "@/lib/ensraibow-api-client";
import { DependencyInfo } from "@ensnode/ensnode-sdk";
import { makeDependencyInfoSchema } from "@ensnode/ensnode-sdk/internal";
import { VersionInfo } from "@ensnode/ensnode-sdk";
import { makeVersionInfoSchema } from "@ensnode/ensnode-sdk/internal";
import { prettifyError } from "zod/v4";

/**
Expand All @@ -23,18 +23,23 @@ export function getPackageVersion(packageName: string) {
let searchDir = dirname(currentFile);

while (true) {
// Check if we've reached the workspace root
const workspaceFile = join(searchDir, "pnpm-workspace.yaml");
const isWorkspaceRoot = existsSync(workspaceFile);

// Check for node_modules in current directory
const nodeModulesPath = join(searchDir, "node_modules", packageName, "package.json");

if (existsSync(nodeModulesPath)) {
const packageJson = JSON.parse(readFileSync(nodeModulesPath, "utf8"));
return packageJson.version;
}

// Check PNPM's .pnpm virtual store
const pnpmDir = join(searchDir, "node_modules", ".pnpm");
if (existsSync(pnpmDir)) {
const version = searchPnpmStore(pnpmDir, packageName);
if (version) return version;
}

// If we're at workspace root and still haven't found it, stop searching
if (isWorkspaceRoot) {
throw new Error(
Expand Down Expand Up @@ -62,18 +67,43 @@ export function getPackageVersion(packageName: string) {
}

/**
* Get complete {@link DependencyInfo} for ENSIndexer app.
* Search PNPM's .pnpm directory for a package
* PNPM stores packages like: .pnpm/@adraffy+ens-normalize@1.10.1/node_modules/@adraffy/ens-normalize
*/
function searchPnpmStore(pnpmDir: string, packageName: string): string | null {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear what this function returns.

try {
const entries = readdirSync(pnpmDir);

// Convert package name to PNPM's format: @scope/name -> @scope+name
const normalizedName = packageName.replace("/", "+");

// Find entries that match the package name
// They will be in format: packagename@version or @scope+packagename@version
for (const entry of entries) {
if (entry.startsWith(normalizedName + "@")) {
const pkgPath = join(pnpmDir, entry, "node_modules", packageName, "package.json");
if (existsSync(pkgPath)) {
const packageJson = JSON.parse(readFileSync(pkgPath, "utf8"));
return packageJson.version;
}
}
}
} catch (error) {
// Ignore errors in this helper
}

return null;
}

/**
* Get complete {@link VersionInfo} for ENSIndexer app.
*/
export async function getDependencyInfo(): Promise<DependencyInfo> {
export async function getVersionInfo(): Promise<VersionInfo> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export async function getVersionInfo(): Promise<VersionInfo> {
export async function getEnsIndexerVersionInfo(): Promise<EnsIndexerVersionInfo> {

Goal: We should note how we're going to have nested "VersionInfo" objects for different apps in our overall architecture. Each app's "VersionInfo" should have a name that makes it explicit exactly which app's "VersionInfo" it is related to.

const ensRainbowApiClient = getENSRainbowApiClient();
const { versionInfo: ensRainbowDependencyInfo } = await ensRainbowApiClient.version();
const { versionInfo: ensRainbowVersionInfo } = await ensRainbowApiClient.version();

// ENSRainbow version (fetched from the actual ENSRainbow service instance)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// ENSRainbow version (fetched from the actual ENSRainbow service instance)
// ENSRainbow version (fetched dynamically from the connected ENSRainbow service instance)

// use a fallback for backwards compatibility
const ensRainbowSchema =
ensRainbowDependencyInfo.dbSchemaVersion ||
// @ts-ignore
ensRainbowDependencyInfo.schema_version;
const ensRainbowSchema = ensRainbowVersionInfo.dbSchemaVersion;

// ENSIndexer version
const ensIndexerVersion = packageJson.version;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest moving the logic to get the ENSIndexer version into a separate helper function.

Expand All @@ -84,21 +114,21 @@ export async function getDependencyInfo(): Promise<DependencyInfo> {
// the version number of ENSIndexer
const ensDbVersion = ensIndexerVersion;

const schema = makeDependencyInfoSchema();
const schema = makeVersionInfoSchema();
const data = {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. I'm not so clear on what's going on here.

Are we creating what is supposed to be a SerializedVersionInfo here and then attempting to deserialize it through makeVersionInfoSchema and then returning the deserialized VersionInfo?

Or are we just attempting to verify that the VersionInfo we return passes our validation checks?

If so, then suggest to rename data to something meaningful. Ex: unvalidatedVersionInfo and then rename parsed to something like validatedVersionInfo.

ensRainbow: ensRainbowDependencyInfo.version,
ensRainbow: ensRainbowVersionInfo.version,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we should be building nested schemas.

In other words:

  1. The type of ensRainbow here should be the type of an EnsRainbowVersionInfo and contain nested fields inside of itself.
  2. The ensRainbowSchema field should be removed at this level. It already lives inside EnsRainbowVersionInfo, right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This update is a bit more nuanced due to a dual nature of *LabelSet type:

  • EnsRainbowClientLabelSet
  • EnsRainbowServerLabelSet

I'll create a ticket for the requested change so we could address it in a separate PR.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nodejs: process.versions.node,
ponder: getPackageVersion("ponder"),
ensDb: ensDbVersion,
ensIndexer: ensIndexerVersion,
ensNormalize: getPackageVersion("@adraffy/ens-normalize"),
ensRainbowSchema,
} satisfies DependencyInfo;
} satisfies VersionInfo;

const parsed = schema.safeParse(data);

if (parsed.error) {
throw new Error(`Cannot deserialize DependencyInfo:\n${prettifyError(parsed.error)}\n`);
throw new Error(`Cannot deserialize VersionInfo:\n${prettifyError(parsed.error)}\n`);
}

return parsed.data;
Expand Down
1 change: 0 additions & 1 deletion apps/ensrainbow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"get-test-data": "DATA_VERSION=test ./download-rainbow-tables.sh"
},
"dependencies": {
"@adraffy/ens-normalize": "catalog:",
"@ensnode/ensrainbow-sdk": "workspace:*",
"@ensnode/ensnode-sdk": "workspace:*",
"@hono/node-server": "^1.4.1",
Expand Down
19 changes: 13 additions & 6 deletions docs/ensnode.io/src/content/docs/docs/usage/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ The response includes several important configuration categories:
- **Feature Flags**: Boolean settings for experimental features and optional
functionality
- **Plugins**: Activated plugins
- **Dependency Information**: Node.js version, Ponder framework version, and
ENSRainbow schema details
- **Version Information**: Node.js version, Ponder framework version,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Version Information**: Node.js version, Ponder framework version,
- **ENSIndexer Version Information**: Node.js version, Ponder framework version,

ENSRainbow version and schema details, ENSDb version, ENSIndexer version, [ENS Normalize version](https://www.npmjs.com/package/@adraffy/ens-normalize)

### Example response

Expand All @@ -102,8 +102,12 @@ The response includes several important configuration categories:
42161,
534352
],
"databaseSchemaName": "alphaSchema0.31.0",
"databaseSchemaName": "alphaSchema0.35.0",
"isSubgraphCompatible": false,
"labelSet": {
"labelSetId": "subgraph",
"labelSetVersion": 0
},
"namespace": "mainnet",
"plugins": [
"subgraph",
Expand All @@ -114,11 +118,14 @@ The response includes several important configuration categories:
"referrals",
"tokenscope"
],
"dependencyInfo": {
"versionInfo": {
"nodejs": "22.18.0",
"ponder": "0.11.43",
"ensRainbow": "0.31.0",
"ensRainbowSchema": 2
"ensDb": "0.35.0",
"ensIndexer": "0.35.0",
"ensNormalize": "1.11.1",
"ensRainbow": "0.34.0",
"ensRainbowSchema": 3
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion packages/ensnode-sdk/src/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const EXAMPLE_CONFIG_RESPONSE = {
PluginName.ProtocolAcceleration,
PluginName.Referrals,
],
dependencyInfo: {
versionInfo: {
nodejs: "22.18.0",
ponder: "0.11.43",
ensDb: "0.32.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("ENSIndexer: Config", () => {
isSubgraphCompatible: true,
namespace: "mainnet",
plugins: [PluginName.Subgraph],
dependencyInfo: {
versionInfo: {
nodejs: "v22.10.12",
ponder: "0.11.25",
ensDb: "0.32.0",
Expand Down Expand Up @@ -64,7 +64,7 @@ describe("ENSIndexer: Config", () => {
isSubgraphCompatible: true,
namespace: "mainnet",
plugins: [PluginName.Subgraph],
dependencyInfo: {
versionInfo: {
nodejs: "v22.10.12",
ponder: "0.11.25",
ensDb: "0.32.0",
Expand Down
Loading