Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: c133aa4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
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 |
📝 WalkthroughWalkthroughA patch changelog entry is added to document a fix for non-deterministic ordering of registrar actions. The registrar actions query is updated to sort by Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR aims to make the ENSApi “registrar actions” list ordering deterministic when multiple actions share the same block timestamp, improving pagination stability and repeatability of results.
Changes:
- Update “latest registrar actions” ordering to sort by
registrar_actions.id(Ponder checkpoint) instead oftimestamp. - Add a Changesets entry to release the fix as an
ensapipatch.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| apps/ensapi/src/lib/registrar-actions/find-registrar-actions.ts | Changes the ORDER BY used for “latest” registrar actions to use id for deterministic ordering. |
| .changeset/tall-icons-return.md | Declares a patch release for ensapi describing the ordering fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| case RegistrarActionsOrders.LatestRegistrarActions: | ||
| return desc(schema.registrarActions.timestamp); | ||
| // id is a Ponder checkpoint (blockTimestamp → chainId → blockNumber → transactionIndex → | ||
| // eventType → eventIndex); fixed-length decimal strings compare lexicographically = | ||
| // numerically, so DESC gives "latest first" with full determinism across same-block actions. | ||
| return desc(schema.registrarActions.id); |
There was a problem hiding this comment.
RegistrarActionsOrders.LatestRegistrarActions is defined in the SDK as orderBy[timestamp]=desc, but this handler now orders solely by registrarActions.id. Even if the Ponder checkpoint ID currently prefixes blockTimestamp, this couples ordering correctness to an internal ID encoding and makes the order param/name misleading. Consider ordering by timestamp DESC with id DESC as a deterministic tie-breaker (or update the order enum/name to reflect id).
Inconsistent Order of Registrar Actions
closes: #1704
Summary
Why
idjust like we did withrev-share-limitleaderboard building (not thateventTypeis not processed contrary to leaderboard building)Testing
Notes for Reviewer (Optional)
idis sufficient for the deterministic orderingPre-Review Checklist (Blocking)