✨ feat(server): add IPC JSON-RPC transport - #2080
Conversation
🦋 Changeset detectedLatest commit: 25bb2c5 The changes in this PR will be included in the next version bump. 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 💥 An error occurred when fetching the changed packages and changesets in this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
Warning Review limit reached
Next review available in: 36 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
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 |
8270707 to
8acbd8f
Compare
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
<prompt>Add a Unix domain socket JSON-RPC server to packages/server with newline-delimited framing, viem ipc() compatibility, and subscription notifications.</prompt>
c69ce78 to
25bb2c5
Compare
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Blocking transport findings:
|
Bug
@tevm/serveronly exposed an HTTP JSON-RPC server, so Node clients using viem'sipc()transport had no Unix domain socket endpoint to connect to. A test importingcreateIpcServerwas written first and reproduced the missing public API.This closes the viem migration blocker described as:
Root cause
The server package had no
node:netserver, stream framing, or persistent connection layer. Although Tevm's JSON-RPC actions can create subscriptions, there was also no transport adapter to forward node events aseth_subscriptionnotifications or clean them up when a connection closes.Fix
createIpcServerAPI backed by a Unix domain socket.newHeads,newPendingTransactions, and filteredlogssubscription notifications.eth_unsubscribeor socket close.Tests
pnpm vitest run packages/server/src/createIpcServer.spec.ts— 9 passed.pnpm --dir packages/server typecheck— passed.pnpm --dir packages/server lint:check— passed.pnpm --dir packages/server build:distandpnpm --dir packages/server build:types— passed.The IPC integration tests use real Unix sockets, a real Tevm memory client, and viem's real
ipc()transport. They cover request/response framing, invalid requests, batches, notifications, size limits, all supported subscription types, filtering, unsubscribe behavior, and connection cleanup without mocks.The full neighboring server run completed with 67 passing and 2 failing tests. Both failures are newly landed
parseRequest.spec.tsexact-message assertions already present onorigin/main; this branch has no diff in eitherparseRequest.jsorparseRequest.spec.ts. On the original requested clone base, the neighboring server suite passed all 65 tests and the coverage run passed every configured threshold (87.52% statements, 81.02% branches, 91.25% functions, 89.3% lines).Add a Unix domain socket JSON-RPC server to packages/server with newline-delimited framing and subscription support so viem's ipc() transport can use Tevm instead of Anvil.
🤖 Generated with Smithers multi-agent orchestration