Skip to content

feat: use forked ponder version#2345

Open
sevenzing wants to merge 2 commits into
mainfrom
ll/use-forked-ponder-version
Open

feat: use forked ponder version#2345
sevenzing wants to merge 2 commits into
mainfrom
ll/use-forked-ponder-version

Conversation

@sevenzing

Copy link
Copy Markdown
Member

Lite PR

Tip: Review docs on the ENSNode PR process

Summary


Why

  • To improve behaviour of ponder during crash recovery

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)

Copilot AI review requested due to automatic review settings July 3, 2026 13:04
@sevenzing sevenzing requested a review from a team as a code owner July 3, 2026 13:04
@changeset-bot

changeset-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: afde99d

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

This PR includes changesets to release 23 packages
Name Type
ensindexer Patch
ensadmin Patch
ensrainbow Patch
ensapi Patch
fallback-ensapi Patch
enssdk Patch
enscli Patch
enskit Patch
ensskills Patch
@ensnode/datasources Patch
@ensnode/ensrainbow-sdk Patch
@ensnode/ensdb-sdk Patch
@ensnode/ensnode-sdk Patch
@ensnode/integration-test-env Patch
@ensnode/ponder-sdk Patch
@ensnode/ponder-subgraph Patch
@ensnode/shared-configs Patch
@docs/ensnode Patch
@docs/ensrainbow Patch
@namehash/ens-referrals Patch
@namehash/namehash-ui Patch
@ensnode/ensindexer-perf-testing Patch
@ensnode/ensdb-cli Patch

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

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
admin.ensnode.io Ready Ready Preview, Comment Jul 3, 2026 1:16pm
enskit-react-example.ensnode.io Ready Ready Preview, Comment Jul 3, 2026 1:16pm
ensnode.io Ready Ready Preview, Comment Jul 3, 2026 1:16pm
ensrainbow.io Ready Ready Preview, Comment Jul 3, 2026 1:16pm

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@sevenzing, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 49 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 56268084-f855-47a2-a21d-7b2c70f2fbfd

📥 Commits

Reviewing files that changed from the base of the PR and between 230ebc8 and afde99d.

📒 Files selected for processing (1)
  • packages/integration-test-env/src/lifecycle.ts
📝 Walkthrough

Walkthrough

This PR switches ENSIndexer's ponder dependency to NameHash's published fork (@ensnode/ponder), updating package.json overrides/patches and the pnpm-workspace catalog, and removes the now-unneeded statement_timeout patch. Separately, it adds Docker container health-check/restart logic and a keep-alive timer to integration-test-env lifecycle/startup.

Changes

Ponder Fork Migration

Layer / File(s) Summary
Dependency and catalog updates
.changeset/ensindexer-ponder-fork.md, pnpm-workspace.yaml, package.json, patches/ponder@0.16.6.patch
Documents the switch to @ensnode/ponder, bumps the catalog entry to 0.16.7, retargets the vite override selector, removes the ponder@0.16.6 patched dependency mapping, and deletes the obsolete statement_timeout patch.

Integration Test Environment Reliability

Layer / File(s) Summary
Docker health inspection and restart helpers
packages/integration-test-env/src/lifecycle.ts
Adds an EFP devnet container constant, containerHealth(), and waitForContainerHealthyWithRestart() to poll and restart containers until healthy.
bringUp() wait-strategy wiring
packages/integration-test-env/src/lifecycle.ts
Changes compose startup to wait for a specific log line, then explicitly waits for container health using the new restart-and-retry helper.
Keep-alive timer
packages/integration-test-env/src/start.ts
Adds a long-interval setInterval in main() to keep the process alive when no other long-lived handles exist.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
    participant Start as start.ts (main)
    participant Lifecycle as bringUp()
    participant Compose as DockerComposeEnvironment
    participant Docker as Docker CLI

    Start->>Lifecycle: bringUp()
    Lifecycle->>Compose: up() with wait-for-log-line strategy
    Compose-->>Lifecycle: efp-devnet started
    Lifecycle->>Docker: containerHealth(efp-devnet-orchestrator)
    loop until healthy or attempts exhausted
        Docker-->>Lifecycle: health status
        alt not healthy
            Lifecycle->>Docker: docker restart
        end
    end
    Docker-->>Lifecycle: healthy
    Lifecycle-->>Start: bringUp complete
    Start->>Start: setInterval keep-alive
Loading

Possibly related PRs

  • namehash/ensnode#1726: Both PRs adjust the ponder dependency version in pnpm-workspace.yaml, overlapping in the same pnpm workspace dependency wiring.
  • namehash/ensnode#1880: Both PRs modify package.json pnpm.overrides entries targeting vite resolution.
  • namehash/ensnode#2219: The removed patch's PONDER_STATEMENT_TIMEOUT logic directly matches the retrieved PR's introduction of that same env-var-controlled timeout.

Poem

A fork in the burrow, a hop to a new nest,
@ensnode/ponder now serves us best.
No more patch needed, the timeout's built in,
Docker containers restart 'til healthy they've been.
With a keep-alive timer, the process won't flee —
This rabbit thumps twice for stability! 🐇⏱️

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description matches the template mostly, but it is missing the required Testing section. Add a Testing section describing what was tested, or state why testing was not performed.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: switching to a forked Ponder version.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ll/use-forked-ponder-version

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.

@greptile-apps

greptile-apps Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Switches ponder from the upstream 0.16.6 release to the NameHash-maintained fork @ensnode/ponder@0.16.7 (via a pnpm catalog alias), removing the now-redundant patch that added PONDER_STATEMENT_TIMEOUT support. It also hardens the integration test environment's handling of the efp-devnet container, which intermittently deadlocks on arm64/Apple Silicon under QEMU emulation.

  • Ponder fork: The catalog, workspace, package.json overrides, and lockfile are all updated to resolve ponder to @ensnode/ponder@0.16.7; the ponder@0.16.6.patch file is deleted.
  • efp-devnet resilience: The testcontainers wait strategy is changed from forHealthCheck() (which throws on the first unhealthy transition) to forLogMessage(/Starting EFP devnet/), then a new waitForContainerHealthyWithRestart loop polls for healthy with up to 10 restart-and-retry attempts over 200 s total; containerHealth() now throws loudly on non-zero docker inspect exit codes instead of silently returning \"\".
  • Event-loop keep-alive: start.ts adds setInterval(() => {}, 1 << 30) so the process does not exit immediately when --only devnet is passed and no long-lived child processes are running.

Confidence Score: 5/5

Safe to merge — the changes are a well-scoped dependency swap and targeted integration test hardening with no impact on production code paths.

The ponder fork switch is mechanically straightforward (catalog alias + lockfile update + patch removal) and the transitive dependency tree is identical. The waitForContainerHealthyWithRestart logic is correct: each attempt gets a fresh 20 s budget after restart, the last attempt does not spuriously restart, and containerHealth() now fails loudly instead of silently returning an empty string. The only non-blocking observation is that execaSync is used for docker restart, blocking the event loop for the container stop cycle, which is an acceptable trade-off in test infrastructure.

No files require special attention; lifecycle.ts is the most complex change but the logic has been verified to be correct.

Important Files Changed

Filename Overview
packages/integration-test-env/src/lifecycle.ts Adds containerHealth() + waitForContainerHealthyWithRestart() to handle efp-devnet QEMU deadlocks; changes wait strategy from forHealthCheck() to forLogMessage(); uses synchronous execaSync for docker restart which blocks the event loop during each restart attempt
packages/integration-test-env/src/start.ts Adds setInterval keep-alive so the process doesn't exit prematurely when --only devnet is used and no long-lived child processes are spawned
patches/ponder@0.16.6.patch Deleted — PONDER_STATEMENT_TIMEOUT patch removed on the assumption that @ensnode/ponder@0.16.7 ships this feature natively; if it doesn't, the env var silently has no effect
pnpm-workspace.yaml Catalog entry for ponder aliased from 0.16.6 to npm:@ensnode/ponder@0.16.7
package.json Override dependency paths and patchedDependencies updated to reflect the renamed @ensnode/ponder package; ponder@0.16.6 patch entry removed
pnpm-lock.yaml Lockfile updated to resolve ponder catalog alias to @ensnode/ponder@0.16.7 with the same transitive dependency tree as the old 0.16.6 entry
.changeset/ensindexer-ponder-fork.md Patch-level changeset documenting the switch from upstream ponder to @ensnode/ponder

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[DockerComposeEnvironment.up] --> B[Wait.forLogMessage\n/Starting EFP devnet/]
    B --> C{180s startup\ntimeout exceeded?}
    C -- Yes --> FAIL1[Throw startup timeout]
    C -- No --> D[waitForContainerHealthyWithRestart\n10 attempts x 20s each]
    D --> E{docker inspect\nhealthy?}
    E -- Yes --> OK[Return — EFP Devnet ready]
    E -- No, exit!=0 --> FAIL2[Throw: container missing\nor docker error]
    E -- No, still starting/unhealthy --> F{perAttemptMs\n20s elapsed?}
    F -- No --> E
    F -- Yes, attempt < 10 --> G[execaSync docker restart\nblocks ~10-30s]
    G --> H{restart exit\ncode != 0?}
    H -- Yes --> FAIL3[Throw: restart failed]
    H -- No --> D
    F -- Yes, attempt = 10 --> FAIL4[Throw: not healthy\nafter 10 attempts]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[DockerComposeEnvironment.up] --> B[Wait.forLogMessage\n/Starting EFP devnet/]
    B --> C{180s startup\ntimeout exceeded?}
    C -- Yes --> FAIL1[Throw startup timeout]
    C -- No --> D[waitForContainerHealthyWithRestart\n10 attempts x 20s each]
    D --> E{docker inspect\nhealthy?}
    E -- Yes --> OK[Return — EFP Devnet ready]
    E -- No, exit!=0 --> FAIL2[Throw: container missing\nor docker error]
    E -- No, still starting/unhealthy --> F{perAttemptMs\n20s elapsed?}
    F -- No --> E
    F -- Yes, attempt < 10 --> G[execaSync docker restart\nblocks ~10-30s]
    G --> H{restart exit\ncode != 0?}
    H -- Yes --> FAIL3[Throw: restart failed]
    H -- No --> D
    F -- Yes, attempt = 10 --> FAIL4[Throw: not healthy\nafter 10 attempts]
Loading

Reviews (2): Last reviewed commit: "add error checks" | Re-trigger Greptile

Comment thread packages/integration-test-env/src/lifecycle.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 switches the monorepo’s ponder catalog dependency to NameHash’s published fork (@ensnode/ponder via npm aliasing) to improve crash-recovery behavior, and hardens the integration test environment’s devnet startup so it doesn’t exit early and can recover from a known efp-devnet healthcheck stall.

Changes:

  • Replace upstream ponder@0.16.6 with the aliased fork ponder: npm:@ensnode/ponder@0.16.7 and update lockfile/overrides accordingly.
  • Remove the local pnpm patch previously applied to upstream ponder@0.16.6.
  • Improve integration-test-env reliability: keep the process alive in start.ts, and add “restart-and-retry” health handling for efp-devnet in lifecycle.ts.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pnpm-workspace.yaml Updates the pnpm catalog entry to alias ponder to npm:@ensnode/ponder@0.16.7.
pnpm-lock.yaml Refreshes lockfile state for the forked Ponder package and updated override selectors.
patches/ponder@0.16.6.patch Removes the no-longer-used patch for the old upstream Ponder version.
package.json Updates pnpm overrides and removes the patchedDependencies entry for ponder@0.16.6.
packages/integration-test-env/src/start.ts Ensures the manual start command stays alive even when no long-lived child process is spawned.
packages/integration-test-env/src/lifecycle.ts Adds container health polling with restart-and-retry for efp-devnet and adjusts testcontainers wait strategy accordingly.
.changeset/ensindexer-ponder-fork.md Adds a changeset noting the move to the NameHash Ponder fork for ensindexer.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

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

Comment thread packages/integration-test-env/src/lifecycle.ts
Comment thread packages/integration-test-env/src/lifecycle.ts

@tk-o tk-o left a comment

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.

Nice updates, LGTM

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.

3 participants