Skip to content

Conversation

@tk-o
Copy link
Contributor

@tk-o tk-o commented Dec 19, 2025

Suggested review order: commit-by-commit.

This PR is a substantial change to ENSNode with the following updates:

  • @ensnode/ponder-metadata package role has been renamed to @ensnode/ponder-sdk with the goal of consolidating Ponder-related functionalities. This is a step towards achieving clean boundary between Ponder framework and the codebase of ENSNode components.

Resolves #908

@changeset-bot
Copy link

changeset-bot bot commented Dec 19, 2025

🦋 Changeset detected

Latest commit: 3cc7ea4

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

This PR includes changesets to release 14 packages
Name Type
@ensnode/ponder-sdk Major
ensindexer Major
ensadmin Major
ensrainbow Major
ensapi Major
@ensnode/datasources Major
@ensnode/ensrainbow-sdk Major
@ensnode/ensnode-schema Major
@ensnode/ensnode-react Major
@ensnode/ponder-subgraph Major
@ensnode/ensnode-sdk Major
@ensnode/shared-configs Major
@docs/ensnode Major
@docs/ensrainbow 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

vercel bot commented Dec 19, 2025

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

Project Deployment Review Updated (UTC)
admin.ensnode.io Ready Ready Preview, Comment Dec 22, 2025 7:32am
ensnode.io Ready Ready Preview, Comment Dec 22, 2025 7:32am
ensrainbow.io Ready Ready Preview, Comment Dec 22, 2025 7:32am

tk-o added 2 commits December 19, 2025 17:47
Awaits for Ponder application to be healthy before building the Indexing Status object
@tk-o tk-o changed the title refactor(ponder-sdk): define a package to consolidate Ponder-related ideas and functionality WIP refactor(ponder-sdk): define a package to consolidate Ponder-related ideas and functionality Dec 19, 2025
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 Hey thanks for the updates here. Appreciate that this PR is still a draft. Reviewed and shared some early feedback 👍

@@ -0,0 +1,3 @@
# Ponder SDK

This package is a set of libraries enabling smooth interaction with Ponder application and data, including shared types, data processing (such as validating data and enforcing invariants), and Ponder-oriented helper functions.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
This package is a set of libraries enabling smooth interaction with Ponder application and data, including shared types, data processing (such as validating data and enforcing invariants), and Ponder-oriented helper functions.
This package is a set of utilities for interacting with a Ponder app.

"@ensnode/ponder-sdk": minor
---

Renames `@ensnode/ponder-metadata` package to `@ensnode/ponder-sdk`.
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to make any changes to any of our devops scripts related to publishing packages to NPM or generating release notes?

Additionally, I imagine that we should include a reference to ponder-sdk in the root readme file of the monorepo the way we reference other packages there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's no need to change any of our devops scripts.

On the second question, yes, that's a good point 👍

(typeof PonderHealthCheckResults)[keyof typeof PonderHealthCheckResults];

export class PonderClient {
#healthCheckResult: PonderHealthCheckResult | undefined;
Copy link
Member

Choose a reason for hiding this comment

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

Please note feedback I shared in another open PR for how all our clients should be stateless.

@@ -1,5 +1,5 @@
/**
* Ponder Metadata: RPC
* Ponder SDK: RPC
Copy link
Member

Choose a reason for hiding this comment

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

I don't feel good about the abstractions we're building here. It appears that we aren't building clean layers of abstractions and instead are breaking one layer into others in a way that breaks clear lines of responsibility and clean abstractions.

For example:

  1. Why should this package know anything about ENSIndexer?
  2. Where is the public client here coming from? I thought that we were just building a client library that wraps Ponder's APIs?
  3. Why is there any reference to ponder:api here?

For next steps, suggest creating a diagram showing each conceptual layer involved here. How are the layers of responsibility currently defined? How do you suggest we modify the layers of responsibility through this PR?

Suggest to create these diagrams and share with me before advancing other next steps to confirm alignment. Thanks 👍

): Promise<OmnichainIndexingStatusSnapshot> {
let metrics: PrometheusMetrics;
let status: PonderStatus;
await waitForPonderApplicationToBecomeHealthy;
Copy link
Member

Choose a reason for hiding this comment

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

Can you please document why this action is suggested to be taken here? Why is it important? What would happen if we didn't do this here?

"description": "A utility library for interacting with Ponder application and data",
"license": "MIT",
"repository": {
"type": "git",
Copy link
Member

Choose a reason for hiding this comment

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

We should update the directory and homepage below.

"viem": "catalog:"
},
"devDependencies": {
"@ensnode/ensnode-sdk": "workspace:*",
Copy link
Member

Choose a reason for hiding this comment

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

Part of what's confusing me is how the ponder-sdk package would have a dependency on the ensnode-sdk package. Potentially ok with it but just struggling to get a clear mental model of the proposed strategy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to take define:

  • types like BlockRef, ChainId, UnixTimestamp, etc.
  • deserialization functionality, such that deserializeBlockRef, to parse data coming from Ponder.
  • zod schema definitions, such that makeChainIdStringSchema to build deserialization logic for Ponder response data model.

We can either import them from @ensnode/ensnode-sdk, or re-define them locally in the @ensnode/ponder-sdk package.

The @ensnode/ponder-sdk is only integrated in the ensindexer application. For that reason, it make sense to import listed dependencies from @ensnode/ensnode-sdk. We can make the @ensnode/ensnode-sdk to be a peer dependency for @ensnode/ponder-sdk. This way we'll ensure that @ensnode/ponder-sdk package remains minimal, but it requires @ensnode/ensnode-sdk package to be provided as well at the integration point (which in our case is ensindexer application).

},
"dependencies": {
"@ensnode/ensrainbow-sdk": "workspace:*",
"drizzle-orm": "catalog:",
Copy link
Member

Choose a reason for hiding this comment

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

Surprised to see drizzle as a dependency of the ponder-sdk package?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great catch! This must be a legacy config, I don't think it's needed now.

"@ensnode/ensrainbow-sdk": "workspace:*",
"drizzle-orm": "catalog:",
"parse-prometheus-text-format": "^1.1.1",
"viem": "catalog:"
Copy link
Member

Choose a reason for hiding this comment

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

Should we make viem a peer dependency too?

* ENSNode makes no use of that endpoint.
*/
public ready(): never {
throw new Error("Ponder `/ready` endpoint is not supported by this client.");
Copy link
Member

Choose a reason for hiding this comment

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

I'm struggling to understand.

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