Replay the testnet chain head while the indexer is idle - #200
Merged
Merged
Conversation
Base Sepolia keeps Ponder's four-second timer but serves the last latest-block response for 30s unless a client read or POST /api/indexer-wake opens a one-minute live window.
AdamSpitz
commented
Sep 28, 2026
AdamSpitz
left a comment
Owner
Author
There was a problem hiding this comment.
Review receipt.
Reviewed the idle-head cache against Ponder's HTTP client (it posts a Request, and the wrapper clones that body). Latest-block replays are keyed by params and only stored for successful results. Wake is limited to GraphQL, SQL, GET /api, and POST /api/indexer-wake; health and project-read-demand stay quiet. No findings.
Reviewed-with: grok
Reviewed-files: 7
Reviewed-commit: cf694a9
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
eth_getBlockByNumber("latest")for 30s while nobody is reading, so an idle indexer stops paying Alchemy for empty log polls./apiread, orPOST /api/indexer-wake, opens a 60-second window of live polls. Health checks and/api/project-read-demanddo not.INDEXER_IDLE_HEAD_CACHE=1.=0disables it on testnet.This is the indexer change only. It was committed on
feature/delegation-copy-notesand cherry-picked here so that branch's notes do not ride along.Test plan
npm run test --workspace=commonality-indexer(idle-head cache tests included; also re-ran in pre-commit)