Skip to content

Ponder metadata: codebase cleanup#1701

Merged
tk-o merged 7 commits intomainfrom
908-ponder-metadata-code-cleanup
Mar 2, 2026
Merged

Ponder metadata: codebase cleanup#1701
tk-o merged 7 commits intomainfrom
908-ponder-metadata-code-cleanup

Conversation

@tk-o
Copy link
Contributor

@tk-o tk-o commented Mar 1, 2026

Lite PR

Tip: Review docs on the ENSNode PR process

Summary

  • Updates Indexing Status API for ENSIndexer to only rely on ENSNode SDK for providing a complete cross-chain indexing status snapshot data model.
  • Cleans up "Local Ponder Client" v1.0 data model (the current v2.0 data model has been introduced with PR Local Ponder Client & Indexing Status Builder to power ENSIndexer #1675).
  • Drops all dependencies on legacy @ensnode/ponder-metadata package across runtime logic, CI scripts, and docs.
  • Removes the legacy @ensnode/ponder-metadata package.

Why

  • The @ensnode/ponder-metadata package has been present in ENSNode codebase for a long time, but it has now been fully replaced with more mature APIs.

Testing

  • Ran static code checks (lint, typecheck), executed testing suite.
  • Tested local ENSIndexer instance: Indexing Status API
  • Tested local ENSApi instance, connected to local ENSIndexer instance: Indexing Status API, ENSAnalytics APIs
  • Tested local ENSAdmin interface connected to local ENSApi instance: Connection, Status.

Notes for Reviewer (Optional)

  • Commit-by-commit is highly encouraged for reviewing this PR.
  • This PR aims to introduce zero API changes. The main goal is codebase cleanup.

Pre-Review Checklist (Blocking)

  • This PR does not introduce significant changes and is low-risk to review quickly.
  • Relevant changesets are included (or are not required)

Resolves #908

@tk-o tk-o requested a review from a team as a code owner March 1, 2026 14:23
Copilot AI review requested due to automatic review settings March 1, 2026 14:23
@changeset-bot
Copy link

changeset-bot bot commented Mar 1, 2026

🦋 Changeset detected

Latest commit: 1c14d8e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 18 packages
Name Type
ensindexer Major
ensadmin Major
ensrainbow Major
ensapi Major
fallback-ensapi Major
@ensnode/datasources Major
@ensnode/ensrainbow-sdk Major
@ensnode/ensnode-schema Major
@ensnode/ensnode-react Major
@ensnode/ensnode-sdk Major
@ensnode/ponder-sdk Major
@ensnode/ponder-subgraph Major
@ensnode/shared-configs Major
@docs/ensnode Major
@docs/ensrainbow Major
@docs/mintlify Major
@namehash/ens-referrals Major
@namehash/namehash-ui Major

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

@vercel
Copy link
Contributor

vercel bot commented Mar 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
admin.ensnode.io Ready Ready Preview, Comment Mar 1, 2026 4:19pm
ensnode.io Ready Ready Preview, Comment Mar 1, 2026 4:19pm
ensrainbow.io Ready Ready Preview, Comment Mar 1, 2026 4:19pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 1, 2026

📝 Walkthrough

Walkthrough

Removed the @ensnode/ponder-metadata package and its references; deleted local indexing-status and Ponder integration modules/tests in ENSIndexer; switched the ENSNode API handler to use buildCrossChainIndexingStatusSnapshotOmnichain from the SDK and adjusted re-exports accordingly.

Changes

Cohort / File(s) Summary
Monorepo config & docs
\.changeset/config.json, \.changeset/purple-rings-swim.md, .github/workflows/release.yml, .github/workflows/release_preview.yml, AGENTS.md
Removed references and install/filter lines for @ensnode/ponder-metadata and updated changelog/PR install hints and docs.
App dependency edits
apps/ensadmin/package.json, apps/ensindexer/package.json
Removed workspace dependency on @ensnode/ponder-metadata.
Ponder package removed
packages/ponder-metadata/*
Deleted entire package: source, types, tests, README, LICENSE, package.json, build/test configs, and changelog.
Indexing-status builders removed
apps/ensindexer/src/lib/indexing-status-builder/*
Removed multiple builder modules, types, mocks, and tests that computed chain/omnichain/cross-chain snapshots.
Ponder integration layer removed
apps/ensindexer/src/lib/indexing-status/ponder-metadata/*, apps/ensindexer/src/lib/indexing-status/build-index-status.ts
Deleted Ponder-specific config/metrics/rpc/status modules, Zod schemas, validation, serialization helpers, and the build-index-status integration logic.
Helper cleanup
apps/ensindexer/src/lib/ponder-helpers.ts, apps/ensindexer/src/lib/ponder-helpers.test.ts
Removed Ponder/Prometheus fetchers, related helper utilities and tests; retained unrelated helpers.
API handler update
apps/ensindexer/ponder/src/api/handlers/ensnode-api.ts
Switched to import buildCrossChainIndexingStatusSnapshotOmnichain from @ensnode/ensnode-sdk, simplified snapshot flow and adjusted IndexingStatusBuilder import path.
SDK additions / re-exports
packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.ts, packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.test.ts, apps/ensindexer/src/lib/indexing-status-builder/index.ts
Added/exported buildCrossChainIndexingStatusSnapshotOmnichain in SDK, updated tests and added package-local re-export of indexing-status-builder.

Sequence Diagram(s)

sequenceDiagram
    participant Handler as ENSNode API Handler
    participant Builder as IndexingStatusBuilder
    participant SDK as ensnode-sdk (buildCrossChain...)
    participant Projection as RealtimeProjectionCreator
    rect rgba(200,200,255,0.5)
    Handler->>Builder: getOmnichainIndexingStatusSnapshot()
    end
    rect rgba(200,255,200,0.5)
    Builder-->>Handler: omnichainSnapshot
    end
    rect rgba(255,200,200,0.5)
    Handler->>SDK: buildCrossChainIndexingStatusSnapshotOmnichain(omnichainSnapshot, snapshotTime)
    SDK-->>Handler: crossChainSnapshot
    end
    rect rgba(200,255,200,0.5)
    Handler->>Projection: createRealtimeIndexingStatusProjection(crossChainSnapshot, projectedAt)
    Projection-->>Handler: realtimeIndexingStatusProjection
    end
    Handler-->>Client: return Ok(serializedResponse)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

"🐰
I hopped through code with nimble feet,
Took ponder-metadata off the suite,
Moved snapshots to the SDK tree,
Now the build hops on, nimble and free."

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Ponder metadata: codebase cleanup' directly and clearly summarizes the main change—removing and consolidating the ponder-metadata package and related legacy code.
Description check ✅ Passed The PR description follows the template with all required sections (Summary, Why, Testing, Notes, Checklist) completed. Content is detailed and addresses objectives.
Linked Issues check ✅ Passed The PR fully implements the objectives from issue #908: consolidates Ponder Client logic into ENSIndexer, removes ponder-metadata package dependencies, updates code/CI/docs, and replaces with ENSNode SDK.
Out of Scope Changes check ✅ Passed All changes align with the stated objectives: removing ponder-metadata, consolidating indexing-status logic, and updating ENSIndexer APIs. No unrelated modifications found.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 908-ponder-metadata-code-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Cleans up legacy Ponder metadata code by removing the deprecated @ensnode/ponder-metadata package and consolidating ENSIndexer’s Indexing Status modeling around the ENSNode SDK/Local Ponder Client data model.

Changes:

  • Removed the legacy @ensnode/ponder-metadata workspace package and all remaining monorepo references to it (runtime, release workflows, changeset config).
  • Moved/standardized cross-chain snapshot construction into @ensnode/ensnode-sdk via buildCrossChainIndexingStatusSnapshotOmnichain() and updated ENSIndexer to use it.
  • Deleted the older ENSIndexer “ponder-metadata” indexing-status implementation paths and tests, keeping the newer indexing-status-builder path.

Reviewed changes

Copilot reviewed 47 out of 48 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pnpm-lock.yaml Drops lockfile entries for the removed packages/ponder-metadata workspace package.
packages/ponder-metadata/vitest.config.ts Removes legacy package test config.
packages/ponder-metadata/tsup.config.ts Removes legacy package build config.
packages/ponder-metadata/tsconfig.json Removes legacy package TS config.
packages/ponder-metadata/src/types/parse-prometheus-text-format.ts Removes legacy module type declarations.
packages/ponder-metadata/src/types/common.ts Removes legacy shared types (BlockInfo, ChainIndexingStatus, etc.).
packages/ponder-metadata/src/types/api.ts Removes legacy middleware option/response types.
packages/ponder-metadata/src/prometheus-metrics.ts Removes legacy Prometheus parsing/utilities.
packages/ponder-metadata/src/prometheus-metrics.test.ts Removes legacy Prometheus parsing tests.
packages/ponder-metadata/src/middleware.ts Removes legacy Hono middleware for metadata/status composition.
packages/ponder-metadata/src/index.ts Removes legacy package exports.
packages/ponder-metadata/src/db-helpers.ts Removes legacy DB helper for _ponder_meta.
packages/ponder-metadata/package.json Removes the legacy package manifest (package removal).
packages/ponder-metadata/README.md Removes legacy package documentation.
packages/ponder-metadata/LICENSE Removes legacy package license file (package removal).
packages/ponder-metadata/CHANGELOG.md Removes legacy package changelog.
packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.ts Adds SDK-level buildCrossChainIndexingStatusSnapshotOmnichain() helper (validated build).
packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.test.ts Updates tests to use local module imports and exercise the SDK builder.
apps/ensindexer/src/lib/ponder-helpers.ts Removes legacy Ponder-metadata-related helper utilities and simplifies imports.
apps/ensindexer/src/lib/ponder-helpers.test.ts Removes tests for deleted helpers (keeps constrainBlockrange tests).
apps/ensindexer/src/lib/indexing-status/ponder-metadata/zod-schemas.ts Deletes legacy zod schema layer for Ponder metadata ingestion.
apps/ensindexer/src/lib/indexing-status/ponder-metadata/validations.ts Deletes legacy validation helpers tied to PrometheusMetrics.
apps/ensindexer/src/lib/indexing-status/ponder-metadata/status.ts Deletes legacy /status fetcher wrapper.
apps/ensindexer/src/lib/indexing-status/ponder-metadata/rpc.ts Deletes legacy RPC block ref fetching utility.
apps/ensindexer/src/lib/indexing-status/ponder-metadata/ponder-metadata.test.ts Deletes legacy indexing-status builder tests based on ponder-metadata modules.
apps/ensindexer/src/lib/indexing-status/ponder-metadata/metrics.ts Deletes legacy /metrics fetcher wrapper.
apps/ensindexer/src/lib/indexing-status/ponder-metadata/index.ts Deletes legacy barrel export for ponder-metadata indexing-status modules.
apps/ensindexer/src/lib/indexing-status/ponder-metadata/config.ts Deletes legacy ponder.config.ts parsing for per-chain ranges.
apps/ensindexer/src/lib/indexing-status/ponder-metadata/chains.ts Deletes legacy chain snapshot composition logic based on metrics/status/config.
apps/ensindexer/src/lib/indexing-status/ponder-metadata/block-refs.ts Deletes legacy block ref derivation logic.
apps/ensindexer/src/lib/indexing-status/build-index-status.ts Deletes legacy entrypoint for building indexing status via ponder-metadata pathway.
apps/ensindexer/src/lib/indexing-status-builder/omnichain-indexing-status-snapshot.ts Deletes superseded builder implementation (now sourced from SDK).
apps/ensindexer/src/lib/indexing-status-builder/omnichain-indexing-status-snapshot.test.ts Deletes tests for removed omnichain builder implementation.
apps/ensindexer/src/lib/indexing-status-builder/index.ts Adds barrel export to allow import { IndexingStatusBuilder } from "@/lib/indexing-status-builder".
apps/ensindexer/src/lib/indexing-status-builder/cross-chain-indexing-status-snapshot.ts Deletes app-local cross-chain builder (replaced by SDK helper).
apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-status-snapshot.ts Deletes app-local chain snapshot builder implementation.
apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-status-snapshot.test.ts Deletes tests for removed chain snapshot builder.
apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-metadata.ts Deletes removed metadata interface.
apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-metadata.mock.ts Deletes mocks for removed metadata interface.
apps/ensindexer/src/lib/indexing-status-builder/backfill-scope.ts Deletes removed backfill scope type.
apps/ensindexer/ponder/src/api/handlers/ensnode-api.ts Switches to SDK buildCrossChainIndexingStatusSnapshotOmnichain() and new index-status-builder barrel import.
apps/ensindexer/package.json Drops dependency on @ensnode/ponder-metadata.
apps/ensadmin/package.json Drops dependency on @ensnode/ponder-metadata.
AGENTS.md Removes the documentation reference to the deleted packages/ponder-metadata.
.github/workflows/release_preview.yml Removes installing/publishing @ensnode/ponder-metadata in preview release workflow.
.github/workflows/release.yml Removes @ensnode/ponder-metadata from the release package filter.
.changeset/config.json Removes @ensnode/ponder-metadata from changesets’ fixed package list.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.test.ts (1)

25-401: 🧹 Nitpick | 🔵 Trivial

Add one failure-path test for snapshot-time invariant.

The new builder validates invariants, but this suite only checks successful paths. Please add an assertion that invalid snapshotTime throws, so this contract is protected.

Suggested test case
 describe("buildCrossChainIndexingStatusSnapshotOmnichain", () => {
+  it("throws when snapshotTime is below the highest known block timestamp", () => {
+    const chains = new Map([
+      [
+        1,
+        {
+          chainStatus: ChainIndexingStatusIds.Completed,
+          config: {
+            rangeType: RangeTypeIds.Bounded,
+            startBlock: earliestBlockRef,
+            endBlock: latestBlockRef,
+          },
+          latestIndexedBlock: latestBlockRef,
+        } satisfies ChainIndexingStatusSnapshotCompleted,
+      ],
+    ]);
+
+    const omnichainSnapshot = {
+      omnichainStatus: OmnichainIndexingStatusIds.Completed,
+      chains,
+      omnichainIndexingCursor: latestBlockRef.timestamp,
+    } satisfies OmnichainIndexingStatusSnapshotCompleted;
+
+    expect(() =>
+      buildCrossChainIndexingStatusSnapshotOmnichain(
+        omnichainSnapshot,
+        earliestBlockRef.timestamp,
+      ),
+    ).toThrow("Invalid CrossChainIndexingStatusSnapshot");
+  });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.test.ts`
around lines 25 - 401, Add a new test in the
describe("buildCrossChainIndexingStatusSnapshotOmnichain") block that verifies
buildCrossChainIndexingStatusSnapshotOmnichain throws when snapshotTime violates
the builder's invariant (e.g., pass an omnichainSnapshot where a chain has
endBlock/latestKnownBlock with timestamp > snapshotTime and assert that calling
buildCrossChainIndexingStatusSnapshotOmnichain(omnichainSnapshot,
invalidSnapshotTime) throws). Use the existing pattern for arranging
chains/omnichainSnapshot (reuse
ChainIndexingStatusSnapshotBackfill/Completed/Following/Unstarted shapes) and
assert thrown error with expect(...).toThrow() to protect the snapshot-time
contract.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.changeset/purple-rings-swim.md:
- Line 6: The changeset message "Stopped having dependency on
`@ensnode/ponder-metadata` package." is awkwardly phrased—update that line to a
clearer, concise phrasing such as "Removed dependency on
`@ensnode/ponder-metadata` package." or "No longer depends on
`@ensnode/ponder-metadata` package." so the intent reads naturally in the
changelog; locate and replace the exact sentence in
.changeset/purple-rings-swim.md.

In `@apps/ensindexer/ponder/src/api/handlers/ensnode-api.ts`:
- Around line 57-60: The call to
buildCrossChainIndexingStatusSnapshotOmnichain(omnichainSnapshot, snapshotTime)
can throw due to validation (snapshotTime captured before async retrieval) and
currently escapes the handler; wrap that call in a try/catch inside the handler
in ensnode-api.ts, catch any thrown error, create/serialize an
IndexingStatusResponseError (preserving the API response shape used elsewhere)
with a clear message and error details, and return/respond with that error
object instead of allowing an unstructured 500. Ensure you reference
buildCrossChainIndexingStatusSnapshotOmnichain, omnichainSnapshot, snapshotTime,
and IndexingStatusResponseError when locating where to add the try/catch.

In
`@packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.ts`:
- Around line 121-127: Remove the redundant JSDoc `@returns` line from the JSDoc
block that documents buildCrossChainIndexingStatusSnapshot (the "Build a
Cross-Chain Indexing Status Snapshot..." comment) so the summary isn't restated;
leave the param tags intact and keep only a concise JSDoc summary without the
duplicate `@returns` entry.

---

Outside diff comments:
In
`@packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.test.ts`:
- Around line 25-401: Add a new test in the
describe("buildCrossChainIndexingStatusSnapshotOmnichain") block that verifies
buildCrossChainIndexingStatusSnapshotOmnichain throws when snapshotTime violates
the builder's invariant (e.g., pass an omnichainSnapshot where a chain has
endBlock/latestKnownBlock with timestamp > snapshotTime and assert that calling
buildCrossChainIndexingStatusSnapshotOmnichain(omnichainSnapshot,
invalidSnapshotTime) throws). Use the existing pattern for arranging
chains/omnichainSnapshot (reuse
ChainIndexingStatusSnapshotBackfill/Completed/Following/Unstarted shapes) and
assert thrown error with expect(...).toThrow() to protect the snapshot-time
contract.

ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a13e206 and b8c2629.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (47)
  • .changeset/config.json
  • .changeset/purple-rings-swim.md
  • .github/workflows/release.yml
  • .github/workflows/release_preview.yml
  • AGENTS.md
  • apps/ensadmin/package.json
  • apps/ensindexer/package.json
  • apps/ensindexer/ponder/src/api/handlers/ensnode-api.ts
  • apps/ensindexer/src/lib/indexing-status-builder/backfill-scope.ts
  • apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-metadata.mock.ts
  • apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-metadata.ts
  • apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-status-snapshot.test.ts
  • apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-status-snapshot.ts
  • apps/ensindexer/src/lib/indexing-status-builder/cross-chain-indexing-status-snapshot.ts
  • apps/ensindexer/src/lib/indexing-status-builder/index.ts
  • apps/ensindexer/src/lib/indexing-status-builder/omnichain-indexing-status-snapshot.test.ts
  • apps/ensindexer/src/lib/indexing-status-builder/omnichain-indexing-status-snapshot.ts
  • apps/ensindexer/src/lib/indexing-status/build-index-status.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/block-refs.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/chains.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/config.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/index.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/metrics.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/ponder-metadata.test.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/rpc.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/status.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/validations.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/zod-schemas.ts
  • apps/ensindexer/src/lib/ponder-helpers.test.ts
  • apps/ensindexer/src/lib/ponder-helpers.ts
  • packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.test.ts
  • packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.ts
  • packages/ponder-metadata/CHANGELOG.md
  • packages/ponder-metadata/LICENSE
  • packages/ponder-metadata/README.md
  • packages/ponder-metadata/package.json
  • packages/ponder-metadata/src/db-helpers.ts
  • packages/ponder-metadata/src/index.ts
  • packages/ponder-metadata/src/middleware.ts
  • packages/ponder-metadata/src/prometheus-metrics.test.ts
  • packages/ponder-metadata/src/prometheus-metrics.ts
  • packages/ponder-metadata/src/types/api.ts
  • packages/ponder-metadata/src/types/common.ts
  • packages/ponder-metadata/src/types/parse-prometheus-text-format.ts
  • packages/ponder-metadata/tsconfig.json
  • packages/ponder-metadata/tsup.config.ts
  • packages/ponder-metadata/vitest.config.ts
💤 Files with no reviewable changes (40)
  • AGENTS.md
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/rpc.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/validations.ts
  • apps/ensindexer/package.json
  • apps/ensindexer/src/lib/indexing-status-builder/omnichain-indexing-status-snapshot.ts
  • packages/ponder-metadata/src/types/common.ts
  • packages/ponder-metadata/README.md
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/index.ts
  • packages/ponder-metadata/LICENSE
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/chains.ts
  • apps/ensindexer/src/lib/indexing-status-builder/backfill-scope.ts
  • apps/ensindexer/src/lib/indexing-status/build-index-status.ts
  • apps/ensindexer/src/lib/indexing-status-builder/omnichain-indexing-status-snapshot.test.ts
  • .github/workflows/release.yml
  • apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-status-snapshot.ts
  • apps/ensindexer/src/lib/indexing-status-builder/cross-chain-indexing-status-snapshot.ts
  • apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-metadata.ts
  • packages/ponder-metadata/src/prometheus-metrics.test.ts
  • apps/ensadmin/package.json
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/status.ts
  • packages/ponder-metadata/CHANGELOG.md
  • packages/ponder-metadata/src/index.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/metrics.ts
  • .github/workflows/release_preview.yml
  • packages/ponder-metadata/src/types/parse-prometheus-text-format.ts
  • packages/ponder-metadata/src/middleware.ts
  • .changeset/config.json
  • packages/ponder-metadata/src/types/api.ts
  • packages/ponder-metadata/src/db-helpers.ts
  • packages/ponder-metadata/vitest.config.ts
  • packages/ponder-metadata/tsup.config.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/config.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/ponder-metadata.test.ts
  • packages/ponder-metadata/tsconfig.json
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/zod-schemas.ts
  • apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-status-snapshot.test.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/block-refs.ts
  • packages/ponder-metadata/package.json
  • apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-metadata.mock.ts
  • packages/ponder-metadata/src/prometheus-metrics.ts

Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

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

Additional Suggestion:

Double JSDoc comment opening (/** followed by another /**) creates malformed comment block

Fix on Vercel

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 1, 2026

Greptile Summary

This PR removes the legacy @ensnode/ponder-metadata package and completes the migration to the ENSNode SDK for indexing status management. The main change is moving buildCrossChainIndexingStatusSnapshotOmnichain from the application layer to the SDK package, consolidating the cross-chain indexing status API.

  • Deleted entire packages/ponder-metadata package (3,814 deletions)
  • Removed legacy Local Ponder Client v1.0 data model modules
  • Cleaned up unused helper functions in ponder-helpers.ts (Prometheus/Status fetchers, block fetchers)
  • Updated all package dependencies, CI workflows, and documentation
  • Added comprehensive test suite for the new SDK function
  • Improved error handling in ensnode-api.ts with simplified try-catch flow

The PR achieves its goal of zero API changes while cleaning up technical debt. All removed code is verified to be unused, and the functionality is properly migrated with tests.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk - it's a pure cleanup with no functional changes
  • Score reflects thorough cleanup with proper migration, comprehensive tests, verified unused code removal, and successful local testing by the author
  • No files require special attention - all changes are straightforward deletions and refactoring

Important Files Changed

Filename Overview
apps/ensindexer/ponder/src/api/handlers/ensnode-api.ts Refactored to use SDK's buildCrossChainIndexingStatusSnapshotOmnichain function; improved error handling with try-catch
packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.ts Added buildCrossChainIndexingStatusSnapshotOmnichain function to centralize cross-chain snapshot building logic
packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.test.ts Comprehensive test suite added for new buildCrossChainIndexingStatusSnapshotOmnichain function with edge cases
apps/ensindexer/src/lib/ponder-helpers.ts Removed unused legacy functions: Prometheus/Status fetchers, first block fetcher, start block mapper, and contract merger
apps/ensindexer/package.json Removed dependency on @ensnode/ponder-metadata package
apps/ensindexer/src/lib/indexing-status-builder/index.ts New index file added to export IndexingStatusBuilder for cleaner imports
apps/ensindexer/src/lib/indexing-status/build-index-status.ts Deleted legacy file that created cross-chain snapshots using ponder-metadata package
packages/ponder-metadata/package.json Deleted entire ponder-metadata package as it's been fully replaced by mature APIs

Last reviewed commit: 1c14d8e

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

48 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

tk-o added 7 commits March 1, 2026 17:17
…CrossChainIndexingStatusSnapshotOmnichain` from ENSNode SDK

This change makes room for code cleanup at `@/lib/indexing-status` path.
Remove all files matching `@/lib/indexing-status*` path. The removed module has been replaced with `@/lib/indexing-status-builder"` one.
These modules were used by the LocalPonderClient implementation 1.0, and all of these modules became obsolete when PR 1675 got merged.
Multiple functions and types in this file were obsolete.
Copy link
Contributor

Copilot AI left a 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 47 out of 48 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.ts (1)

121-129: 🧹 Nitpick | 🔵 Trivial

Remove redundant @returns JSDoc text.

The @returns line restates the summary and should be removed for consistency with coding guidelines.

Proposed cleanup
 /**
  * Build a Cross-Chain Indexing Status Snapshot based on the omnichain indexing status snapshot.
  *
  * `@param` omnichainSnapshot - The omnichain indexing status snapshot.
  * `@param` snapshotTime - The timestamp when the cross-chain indexing status snapshot was generated.
- * `@returns` The cross-chain indexing status snapshot.
  * `@throws` if the generated snapshot does not satisfy the invariants defined
  *         in {`@link` CrossChainIndexingStatusSnapshotOmnichain}
  */

As per coding guidelines: "Do not add JSDoc @returns tags that merely restate the method summary; remove redundancy during PR review."
,

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.ts`
around lines 121 - 129, The JSDoc for the function that builds a cross-chain
indexing status snapshot contains a redundant "@returns" line that merely
restates the summary; remove the "@returns" tag from the JSDoc above the
buildCrossChainIndexingStatusSnapshot (the function that generates a
CrossChainIndexingStatusSnapshot from an omnichain snapshot) so the
documentation only has the summary and the `@throws/`@param tags (keep references
to CrossChainIndexingStatusSnapshotOmnichain and snapshotTime as needed).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In
`@packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.ts`:
- Around line 121-129: The JSDoc for the function that builds a cross-chain
indexing status snapshot contains a redundant "@returns" line that merely
restates the summary; remove the "@returns" tag from the JSDoc above the
buildCrossChainIndexingStatusSnapshot (the function that generates a
CrossChainIndexingStatusSnapshot from an omnichain snapshot) so the
documentation only has the summary and the `@throws/`@param tags (keep references
to CrossChainIndexingStatusSnapshotOmnichain and snapshotTime as needed).

ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between db39c72 and 1c14d8e.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (47)
  • .changeset/config.json
  • .changeset/purple-rings-swim.md
  • .github/workflows/release.yml
  • .github/workflows/release_preview.yml
  • AGENTS.md
  • apps/ensadmin/package.json
  • apps/ensindexer/package.json
  • apps/ensindexer/ponder/src/api/handlers/ensnode-api.ts
  • apps/ensindexer/src/lib/indexing-status-builder/backfill-scope.ts
  • apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-metadata.mock.ts
  • apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-metadata.ts
  • apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-status-snapshot.test.ts
  • apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-status-snapshot.ts
  • apps/ensindexer/src/lib/indexing-status-builder/cross-chain-indexing-status-snapshot.ts
  • apps/ensindexer/src/lib/indexing-status-builder/index.ts
  • apps/ensindexer/src/lib/indexing-status-builder/omnichain-indexing-status-snapshot.test.ts
  • apps/ensindexer/src/lib/indexing-status-builder/omnichain-indexing-status-snapshot.ts
  • apps/ensindexer/src/lib/indexing-status/build-index-status.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/block-refs.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/chains.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/config.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/index.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/metrics.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/ponder-metadata.test.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/rpc.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/status.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/validations.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/zod-schemas.ts
  • apps/ensindexer/src/lib/ponder-helpers.test.ts
  • apps/ensindexer/src/lib/ponder-helpers.ts
  • packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.test.ts
  • packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.ts
  • packages/ponder-metadata/CHANGELOG.md
  • packages/ponder-metadata/LICENSE
  • packages/ponder-metadata/README.md
  • packages/ponder-metadata/package.json
  • packages/ponder-metadata/src/db-helpers.ts
  • packages/ponder-metadata/src/index.ts
  • packages/ponder-metadata/src/middleware.ts
  • packages/ponder-metadata/src/prometheus-metrics.test.ts
  • packages/ponder-metadata/src/prometheus-metrics.ts
  • packages/ponder-metadata/src/types/api.ts
  • packages/ponder-metadata/src/types/common.ts
  • packages/ponder-metadata/src/types/parse-prometheus-text-format.ts
  • packages/ponder-metadata/tsconfig.json
  • packages/ponder-metadata/tsup.config.ts
  • packages/ponder-metadata/vitest.config.ts
💤 Files with no reviewable changes (40)
  • packages/ponder-metadata/tsup.config.ts
  • apps/ensindexer/src/lib/indexing-status-builder/cross-chain-indexing-status-snapshot.ts
  • apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-status-snapshot.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/ponder-metadata.test.ts
  • packages/ponder-metadata/LICENSE
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/status.ts
  • .changeset/config.json
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/rpc.ts
  • packages/ponder-metadata/src/types/common.ts
  • apps/ensindexer/src/lib/indexing-status-builder/omnichain-indexing-status-snapshot.test.ts
  • apps/ensindexer/src/lib/indexing-status/build-index-status.ts
  • .github/workflows/release_preview.yml
  • packages/ponder-metadata/src/db-helpers.ts
  • apps/ensindexer/package.json
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/metrics.ts
  • packages/ponder-metadata/README.md
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/block-refs.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/config.ts
  • packages/ponder-metadata/package.json
  • AGENTS.md
  • apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-metadata.ts
  • packages/ponder-metadata/src/types/api.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/zod-schemas.ts
  • apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-metadata.mock.ts
  • packages/ponder-metadata/src/types/parse-prometheus-text-format.ts
  • .github/workflows/release.yml
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/chains.ts
  • packages/ponder-metadata/vitest.config.ts
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/index.ts
  • apps/ensadmin/package.json
  • apps/ensindexer/src/lib/indexing-status/ponder-metadata/validations.ts
  • packages/ponder-metadata/src/prometheus-metrics.test.ts
  • apps/ensindexer/src/lib/indexing-status-builder/chain-indexing-status-snapshot.test.ts
  • apps/ensindexer/src/lib/indexing-status-builder/omnichain-indexing-status-snapshot.ts
  • packages/ponder-metadata/src/prometheus-metrics.ts
  • apps/ensindexer/src/lib/indexing-status-builder/backfill-scope.ts
  • packages/ponder-metadata/tsconfig.json
  • packages/ponder-metadata/src/index.ts
  • packages/ponder-metadata/src/middleware.ts
  • packages/ponder-metadata/CHANGELOG.md

Copy link
Contributor Author

@tk-o tk-o left a comment

Choose a reason for hiding this comment

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

Self-review completed

Comment on lines +37 to +55
const omnichainSnapshot = await indexingStatusBuilder.getOmnichainIndexingStatusSnapshot();

const crossChainSnapshot = buildCrossChainIndexingStatusSnapshotOmnichain(
omnichainSnapshot,
snapshotTime,
);

const projectedAt = getUnixTime(new Date());
const realtimeProjection = createRealtimeIndexingStatusProjection(
crossChainSnapshot,
projectedAt,
);

return c.json(
serializeIndexingStatusResponse({
responseCode: IndexingStatusResponseCodes.Ok,
realtimeProjection,
} satisfies IndexingStatusResponseOk),
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a more concise form for the response handler, that keeps error response generation in tact.

* @throws if the generated snapshot does not satisfy the invariants defined
* in {@link CrossChainIndexingStatusSnapshotOmnichain}
*/
export function buildCrossChainIndexingStatusSnapshotOmnichain(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Replaces createCrossChainIndexingStatusSnapshotOmnichain function from ENSIndexer (see @/lib/indexing-status/build-index-status).

@tk-o
Copy link
Contributor Author

tk-o commented Mar 1, 2026

@greptile review

Copy link
Member

@lightwalker-eth lightwalker-eth left a comment

Choose a reason for hiding this comment

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

@tk-o Awesome to see almost 4k lines removed in this PR. Nice 👍

@tk-o tk-o merged commit b0de5e9 into main Mar 2, 2026
20 checks passed
@tk-o tk-o deleted the 908-ponder-metadata-code-cleanup branch March 2, 2026 05:28
@github-actions github-actions bot mentioned this pull request Mar 2, 2026
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.

Built Ponder Client and rename ponder-metadata to ponder-sdk

3 participants