Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
acebde7
Mechanical updates only
tk-o Mar 25, 2026
dfbf9df
Update ENSAdmin: connection view tooltips
tk-o Mar 25, 2026
4ad357f
Update `.env.local.example` files for ENSApi and ENSIndexer
tk-o Mar 25, 2026
70d5f30
Update code docs for `EnsIndexerConfig` and `EnsIndexerPublicConfig` …
tk-o Mar 25, 2026
4daa388
Update docs: releases page
tk-o Mar 25, 2026
e906448
Make a single `DatabaseEnvironments` type for ENSApi and ENSIndexer t…
tk-o Mar 25, 2026
dda9325
Update `dev` and `start` commands for `ensindexer` app
tk-o Mar 25, 2026
76fb764
Code cleanup
tk-o Mar 25, 2026
84f3958
Fix redacted `EnsApiConfig` object
tk-o Mar 25, 2026
ee9facd
docs(changeset): Renamed the `databaseSchemaName` field on `EnsIndexe…
tk-o Mar 25, 2026
2463451
docs(changeset): Renamed environment variables: `DATABASE_URL` to `EN…
tk-o Mar 25, 2026
39fb413
docs(changeset): Renamed environment variable: `DATABASE_URL` to `ENS…
tk-o Mar 25, 2026
83b8e1a
docs(changeset): Updated the Connection view to reference "ENSIndexer…
tk-o Mar 25, 2026
408c182
Update terraform scripts to reference updated env vars
tk-o Mar 25, 2026
fca6b50
Update integration tests to reference updated env vars
tk-o Mar 25, 2026
b04c90c
Update CI tests to reference updated env vars
tk-o Mar 25, 2026
82ac70b
Update the Railway deployment script
tk-o Mar 25, 2026
e60e4c1
Apply AI PR feedback
tk-o Mar 25, 2026
e8e4bf5
Update OpenAPI spec file
tk-o Mar 25, 2026
41e6f23
Update Ponder config to include ENSDb config
tk-o Mar 25, 2026
8013642
Apply suggestions from code review
tk-o Apr 1, 2026
1143c1a
Merge remote-tracking branch 'origin/main' into refactor/1762-1763-re…
tk-o Apr 1, 2026
d64217e
Apply renames as per PR feedback
tk-o Apr 1, 2026
0873874
Replace remaining symbols in docs
tk-o Apr 1, 2026
c282b46
Set shared railway variables
tk-o Apr 1, 2026
8978d7f
Update the Connection view in ENSAmin
tk-o Apr 1, 2026
c9c1281
Merge remote-tracking branch 'origin/main' into refactor/1762-1763-re…
tk-o Apr 1, 2026
bbbec13
Apply PR feedback to code docs
tk-o Apr 1, 2026
fc8e7d3
Merge branch 'main' into refactor/1762-1763-rename-ensdb-related-symbols
shrugs Apr 2, 2026
b3f0d1a
docs: clean up integration test readme with schema name changing
shrugs Apr 2, 2026
42a86a1
fix: allow keytar build
shrugs Apr 2, 2026
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
5 changes: 5 additions & 0 deletions .changeset/metal-views-start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ensnode/ensnode-sdk": minor
---

Renamed the `databaseSchemaName` field on `EnsIndexerPublicConfig` type to `ensIndexerSchemaName`.
5 changes: 5 additions & 0 deletions .changeset/slick-kings-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ensapi": minor
---

Renamed environment variable: `DATABASE_URL` to `ENSDB_URL`.
5 changes: 5 additions & 0 deletions .changeset/slow-readers-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ensadmin": minor
---

Updated the Connection view to reference "ENSIndexer Schema Name".
5 changes: 5 additions & 0 deletions .changeset/wide-trams-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ensindexer": minor
---

Renamed environment variables: `DATABASE_URL` to `ENSDB_URL`, and `DATABASE_SCHEMA` to `ENSINDEXER_SCHEMA_NAME`.
8 changes: 7 additions & 1 deletion .github/workflows/deploy_ensnode_blue_green.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jobs:
#ENSADMIN
update_service_image ${RAILWAY_ENVIRONMENT_ID} ${ENSADMIN_SVC_ID} ${{ env.ENSADMIN_DOCKER_IMAGE }}

# Update DATABASE_SCHEMA for each indexer based on input tag
# Update ENSINDEXER_SCHEMA_NAME for each indexer based on input tag
- name: Update shared environment variable
run: |
set_shared_variable() {
Expand All @@ -182,6 +182,12 @@ jobs:
set_shared_variable ${RAILWAY_ENVIRONMENT_ID} "V2-SEPOLIA_DATABASE_SCHEMA" "v2SepoliaSchema${TAG}"
set_shared_variable ${RAILWAY_ENVIRONMENT_ID} "SEPOLIA_DATABASE_SCHEMA" "sepoliaSchema${TAG}"

set_shared_variable ${RAILWAY_ENVIRONMENT_ID} "ALPHA_ENSINDEXER_SCHEMA_NAME" "alphaSchema${TAG}"
set_shared_variable ${RAILWAY_ENVIRONMENT_ID} "MAINNET_ENSINDEXER_SCHEMA_NAME" "mainnetSchema${TAG}"
set_shared_variable ${RAILWAY_ENVIRONMENT_ID} "ALPHA-SEPOLIA_ENSINDEXER_SCHEMA_NAME" "alphaSepoliaSchema${TAG}"
set_shared_variable ${RAILWAY_ENVIRONMENT_ID} "V2-SEPOLIA_ENSINDEXER_SCHEMA_NAME" "v2SepoliaSchema${TAG}"
set_shared_variable ${RAILWAY_ENVIRONMENT_ID} "SEPOLIA_ENSINDEXER_SCHEMA_NAME" "sepoliaSchema${TAG}"

- name: Redeploy ENSNode instances
run: |
redeploy_service() {
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
fi
echo "OpenAPI spec is in sync with codebase"
- name: Validate OpenAPI spec with Mintlify
run: pnpm dlx mint@^4.1.0 openapi-check docs/docs.ensnode.io/ensapi-openapi.json
run: pnpm dlx --allow-build=keytar mint@^4.1.0 openapi-check docs/docs.ensnode.io/ensapi-openapi.json

graphql-schema-check:
name: "GraphQL Schema Check"
Expand Down Expand Up @@ -154,8 +154,8 @@ jobs:
# Public RPC URLs are used as fallbacks for repository forks
# that don't have the relevant secrets configured.
NAMESPACE: mainnet
DATABASE_URL: postgresql://postgres:password@localhost:5432/postgres
DATABASE_SCHEMA: public
ENSDB_URL: postgresql://postgres:password@localhost:5432/postgres
ENSINDEXER_SCHEMA_NAME: ensindexer_test_ci
PLUGINS: subgraph,basenames,lineanames,threedns,protocol-acceleration,registrars,tokenscope
ENSRAINBOW_URL: https://api.ensrainbow.io
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion apps/ensadmin/src/app/mock/config-api.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const ensIndexerPublicConfig = deserializeENSIndexerPublicConfig({
labelSetVersion: 0,
},
indexedChainIds: [1, 8453, 59144, 10, 42161, 534352, 567],
databaseSchemaName: "alphaSchema0.34.0",
ensIndexerSchemaName: "alphaSchema0.34.0",
ensRainbowPublicConfig: {
version: "0.34.0",
labelSet: {
Expand Down
10 changes: 5 additions & 5 deletions apps/ensadmin/src/app/mock/config-info/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"labelSetVersion": 0
},
"indexedChainIds": [1, 8453, 59144, 10, 42161, 534352, 567],
"databaseSchemaName": "alphaSchema0.34.0",
"ensIndexerSchemaName": "alphaSchema0.34.0",
"ensRainbowPublicConfig": {
"version": "0.34.0",
"labelSet": {
Expand Down Expand Up @@ -68,7 +68,7 @@
"protocol-acceleration",
"registrars"
],
"databaseSchemaName": "alphaSepoliaSchema0.34.0",
"ensIndexerSchemaName": "alphaSepoliaSchema0.34.0",
"ensRainbowPublicConfig": {
"version": "0.34.0",
"labelSet": {
Expand Down Expand Up @@ -101,7 +101,7 @@
"indexedChainIds": [1],
"namespace": "mainnet",
"plugins": ["subgraph"],
"databaseSchemaName": "mainnetSchema0.34.0",
"ensIndexerSchemaName": "mainnetSchema0.34.0",
"ensRainbowPublicConfig": {
"version": "0.34.0",
"labelSet": {
Expand Down Expand Up @@ -134,7 +134,7 @@
"indexedChainIds": [11155111],
"namespace": "sepolia",
"plugins": ["subgraph"],
"databaseSchemaName": "sepoliaSchema0.34.0",
"ensIndexerSchemaName": "sepoliaSchema0.34.0",
"ensRainbowPublicConfig": {
"version": "0.34.0",
"labelSet": {
Expand Down Expand Up @@ -167,7 +167,7 @@
"indexedChainIds": [11155111],
"namespace": "sepolia",
"plugins": ["subgraph"],
"databaseSchemaName": "DeserializationSchema0.34.0",
"ensIndexerSchemaName": "DeserializationSchema0.34.0",
"ensRainbowPublicConfig": {
"version": "",
"labelSet": {
Expand Down
48 changes: 37 additions & 11 deletions apps/ensadmin/src/components/connection/cards/ensnode-info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,13 @@ function ENSNodeConfigCardContent({
docsLink={new URL("https://ensnode.io/ensapi")}
>
<InfoCardItems>
<InfoCardItem label="Database" value={<p className={cardItemValueStyles}>Postgres</p>} />
<InfoCardItem
label="Database Schema"
label="ENSIndexer Schema"
value={
<p className={cardItemValueStyles}>{ensIndexerPublicConfig.databaseSchemaName}</p>
<p className={cardItemValueStyles}>{ensIndexerPublicConfig.ensIndexerSchemaName}</p>
}
additionalInfo={
<p>ENSApi reads indexed data from tables within this Postgres database schema.</p>
<p>ENSApi reads indexed data from tables within this ENSIndexer Schema in ENSDb.</p>
}
/>
<InfoCardItem
Expand Down Expand Up @@ -402,12 +401,37 @@ function ENSNodeConfigCardContent({
<InfoCardItems>
<InfoCardItem label="Database" value={<p className={cardItemValueStyles}>Postgres</p>} />
<InfoCardItem
label="Database Schema"
label="ENSIndexer Schema"
value={
<p className={cardItemValueStyles}>{ensIndexerPublicConfig.databaseSchemaName}</p>
<p className={cardItemValueStyles}>{ensIndexerPublicConfig.ensIndexerSchemaName}</p>
}
additionalInfo={
<p>
ENSDb enables devs to build custom services and APIs on top of indexed ENS data in
this schema using{" "}
<ExternalLinkWithIcon href="https://www.npmjs.com/package/@ensnode/ensdb-sdk">
ensdb-sdk
</ExternalLinkWithIcon>
.
</p>
}
/>
<InfoCardItem
label="ENSNode Schema"
value={<p className={cardItemValueStyles}>ensnode</p>}
additionalInfo={
<p>This database schema stores Metadata about each ENSIndexer schema in ENSDb.</p>
}
/>

<InfoCardItem
label="Ponder Schema"
value={<p className={cardItemValueStyles}>ponder_sync</p>}
additionalInfo={
<p>ENSIndexer writes indexed data to tables within this Postgres database schema.</p>
<p>
Ponder manages this database schema to store cached RPC results and is shared across
all ENSIndexer instances using this ENSDb.
</p>
}
/>
</InfoCardItems>
Expand All @@ -427,14 +451,16 @@ function ENSNodeConfigCardContent({
docsLink={new URL("https://ensnode.io/ensindexer")}
>
<InfoCardItems>
<InfoCardItem label="Database" value={<p className={cardItemValueStyles}>Postgres</p>} />
<InfoCardItem
label="Database Schema"
label="ENSIndexer Schema"
value={
<p className={cardItemValueStyles}>{ensIndexerPublicConfig.databaseSchemaName}</p>
<p className={cardItemValueStyles}>{ensIndexerPublicConfig.ensIndexerSchemaName}</p>
}
additionalInfo={
<p>ENSIndexer writes indexed data to tables within this Postgres database schema.</p>
<p>
ENSIndexer is the exclusive writer of indexed data to tables within this ENSIndexer
Schema in ENSDb.
</p>
}
/>
<InfoCardItem
Expand Down
10 changes: 5 additions & 5 deletions apps/ensapi/.env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
# PORT=4334

# ENSDb: Database URL
# Required. This is the connection string for the ENSDb database in which ENSIndexer is storing data.
# It should match the DATABASE_URL used by your ENSIndexer.
# Required. This is the connection string for the ENSDb database where your ENSIndexer is writing data.
# It should match the ENSDB_URL used by your ENSIndexer.
# It should be in the format of `postgresql://<username>:<password>@<host>:<port>/<database>`
#
# See https://ensnode.io/ensindexer/usage/configuration for additional information.
DATABASE_URL=postgresql://dbuser:abcd1234@localhost:5432/my_database
ENSDB_URL=postgresql://dbuser:abcd1234@localhost:5432/my_database

# ENSDb: ENSIndexer Schema Name
# Required. This is a name of the database schema in DATABASE_URL where ENSApi should read indexed data stored by your ENSIndexer.
# It should match the DATABASE_SCHEMA used by your ENSIndexer.
# Required. This is the name of the ENSIndexer Schema in ENSDb where ENSApi should read indexed data stored by your ENSIndexer.
# It should match the ENSINDEXER_SCHEMA_NAME used by your ENSIndexer.
ENSINDEXER_SCHEMA_NAME=ensindexer_0

# ENSApi: RPC Configuration
Expand Down
26 changes: 13 additions & 13 deletions apps/ensapi/src/config/config.schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ vi.mock("@/lib/logger", () => ({
const VALID_RPC_URL = "https://eth-sepolia.g.alchemy.com/v2/1234";

const BASE_ENV = {
DATABASE_URL: "postgresql://user:password@localhost:5432/mydb",
ENSDB_URL: "postgresql://user:password@localhost:5432/mydb",
RPC_URL_1: VALID_RPC_URL,
} satisfies EnsApiEnvironment;

const ENSINDEXER_PUBLIC_CONFIG = {
namespace: "mainnet",
databaseSchemaName: "ensapi",
ensIndexerSchemaName: "ensindexer_0",
ensRainbowPublicConfig: {
version: packageJson.version,
labelSet: { labelSetId: "subgraph", highestLabelSetVersion: 0 },
Expand All @@ -55,12 +55,12 @@ describe("buildConfigFromEnvironment", () => {
it("returns a valid config object using environment variables", async () => {
await expect(buildConfigFromEnvironment(BASE_ENV)).resolves.toStrictEqual({
port: ENSApi_DEFAULT_PORT,
databaseUrl: BASE_ENV.DATABASE_URL,
ensDbUrl: BASE_ENV.ENSDB_URL,
theGraphApiKey: undefined,

ensIndexerPublicConfig: ENSINDEXER_PUBLIC_CONFIG,
namespace: ENSINDEXER_PUBLIC_CONFIG.namespace,
ensIndexerSchemaName: ENSINDEXER_PUBLIC_CONFIG.databaseSchemaName,
ensIndexerSchemaName: ENSINDEXER_PUBLIC_CONFIG.ensIndexerSchemaName,
rpcConfigs: new Map([
[
1,
Expand Down Expand Up @@ -98,7 +98,7 @@ describe("buildConfigFromEnvironment", () => {
});

const TEST_ENV: EnsApiEnvironment = {
DATABASE_URL: BASE_ENV.DATABASE_URL,
ENSDB_URL: BASE_ENV.ENSDB_URL,
};

it("logs error and exits when CUSTOM_REFERRAL_PROGRAM_EDITIONS is not a valid URL", async () => {
Expand Down Expand Up @@ -149,10 +149,10 @@ describe("buildEnsApiPublicConfig", () => {
it("returns a valid ENSApi public config with correct structure", () => {
const mockConfig = {
port: ENSApi_DEFAULT_PORT,
databaseUrl: BASE_ENV.DATABASE_URL,
ensDbUrl: BASE_ENV.ENSDB_URL,
ensIndexerPublicConfig: ENSINDEXER_PUBLIC_CONFIG,
namespace: ENSINDEXER_PUBLIC_CONFIG.namespace,
ensIndexerSchemaName: ENSINDEXER_PUBLIC_CONFIG.databaseSchemaName,
ensIndexerSchemaName: ENSINDEXER_PUBLIC_CONFIG.ensIndexerSchemaName,
rpcConfigs: new Map([
[
1,
Expand Down Expand Up @@ -180,10 +180,10 @@ describe("buildEnsApiPublicConfig", () => {
it("preserves the complete ENSIndexer public config structure", () => {
const mockConfig = {
port: ENSApi_DEFAULT_PORT,
databaseUrl: BASE_ENV.DATABASE_URL,
ensDbUrl: BASE_ENV.ENSDB_URL,
ensIndexerPublicConfig: ENSINDEXER_PUBLIC_CONFIG,
namespace: ENSINDEXER_PUBLIC_CONFIG.namespace,
ensIndexerSchemaName: ENSINDEXER_PUBLIC_CONFIG.databaseSchemaName,
ensIndexerSchemaName: ENSINDEXER_PUBLIC_CONFIG.ensIndexerSchemaName,
rpcConfigs: new Map(),
customReferralProgramEditionConfigSetUrl: undefined,
};
Expand All @@ -201,22 +201,22 @@ describe("buildEnsApiPublicConfig", () => {
ENSINDEXER_PUBLIC_CONFIG.isSubgraphCompatible,
);
expect(result.ensIndexerPublicConfig.labelSet).toEqual(ENSINDEXER_PUBLIC_CONFIG.labelSet);
expect(result.ensIndexerPublicConfig.databaseSchemaName).toBe(
ENSINDEXER_PUBLIC_CONFIG.databaseSchemaName,
expect(result.ensIndexerPublicConfig.ensIndexerSchemaName).toBe(
ENSINDEXER_PUBLIC_CONFIG.ensIndexerSchemaName,
);
});

it("includes the theGraphFallback and redacts api key", () => {
const mockConfig = {
port: ENSApi_DEFAULT_PORT,
databaseUrl: BASE_ENV.DATABASE_URL,
ensDbUrl: BASE_ENV.ENSDB_URL,
ensIndexerPublicConfig: {
...ENSINDEXER_PUBLIC_CONFIG,
plugins: ["subgraph"],
isSubgraphCompatible: true,
},
namespace: ENSINDEXER_PUBLIC_CONFIG.namespace,
ensIndexerSchemaName: ENSINDEXER_PUBLIC_CONFIG.databaseSchemaName,
ensIndexerSchemaName: ENSINDEXER_PUBLIC_CONFIG.ensIndexerSchemaName,
rpcConfigs: new Map(),
customReferralProgramEditionConfigSetUrl: undefined,
theGraphApiKey: "secret-api-key",
Expand Down
4 changes: 2 additions & 2 deletions apps/ensapi/src/config/config.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ export async function buildConfigFromEnvironment(env: EnsApiEnvironment): Promis

return EnsApiConfigSchema.parse({
port: env.PORT,
databaseUrl: env.DATABASE_URL,
ensDbUrl: env.ENSDB_URL,
theGraphApiKey: env.THEGRAPH_API_KEY,
ensIndexerPublicConfig,
namespace: ensIndexerPublicConfig.namespace,
ensIndexerSchemaName: ensIndexerPublicConfig.databaseSchemaName,
ensIndexerSchemaName: ensIndexerPublicConfig.ensIndexerSchemaName,
rpcConfigs,
customReferralProgramEditionConfigSetUrl: env.CUSTOM_REFERRAL_PROGRAM_EDITIONS,
});
Expand Down
14 changes: 7 additions & 7 deletions apps/ensapi/src/config/config.singleton.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ vi.mock("@/lib/logger", () => ({
},
}));

const VALID_DB_URL = "postgresql://user:password@localhost:5432/mydb";
const VALID_SCHEMA_NAME = "ensapi";
const VALID_ENSDB_URL = "postgresql://user:password@localhost:5432/mydb";
const VALID_ENSINDEXER_SCHEMA_NAME = "ensindexer_test";

describe("ensdb singleton bootstrap", () => {
beforeEach(() => {
vi.resetModules();
vi.stubEnv("DATABASE_URL", VALID_DB_URL);
vi.stubEnv("ENSINDEXER_SCHEMA_NAME", VALID_SCHEMA_NAME);
vi.stubEnv("ENSDB_URL", VALID_ENSDB_URL);
vi.stubEnv("ENSINDEXER_SCHEMA_NAME", VALID_ENSINDEXER_SCHEMA_NAME);
});

afterEach(() => {
Expand All @@ -26,18 +26,18 @@ describe("ensdb singleton bootstrap", () => {

// ensDbClient is a lazyProxy — construction is deferred until first property access.
// Accessing a property triggers EnsDbReader construction; verify it succeeds.
expect(ensDbClient.ensIndexerSchemaName).toBe(VALID_SCHEMA_NAME);
expect(ensDbClient.ensIndexerSchemaName).toBe(VALID_ENSINDEXER_SCHEMA_NAME);
expect(ensDb).toBeDefined();
expect(ensIndexerSchema).toBeDefined();
}, 10_000);

it("exits when DATABASE_URL is missing", async () => {
it("exits when ENSDB_URL is missing", async () => {
const mockExit = vi.spyOn(process, "exit").mockImplementation((() => {
throw new Error("process.exit");
}) as never);
const { default: logger } = await import("@/lib/logger");

vi.stubEnv("DATABASE_URL", "");
vi.stubEnv("ENSDB_URL", "");
// ensDbClient is a lazyProxy — import succeeds but first property access triggers construction,
// which calls buildEnsDbConfigFromEnvironment and exits on invalid config.
const { ensDbClient } = await import("@/lib/ensdb/singleton");
Expand Down
Loading
Loading