Skip to content

Use IPC instead of HTTP for performance#120

Merged
RogerPodacter merged 1 commit into
evm-backend-demofrom
use_ipc
Oct 16, 2025
Merged

Use IPC instead of HTTP for performance#120
RogerPodacter merged 1 commit into
evm-backend-demofrom
use_ipc

Conversation

@RogerPodacter

@RogerPodacter RogerPodacter commented Oct 16, 2025

Copy link
Copy Markdown
Member

Note

Switches RPC to a new EthRpcClient with IPC/JWT engine support, adds memoized GethDriver.get_l1_attributes, updates call sites, and removes GethClient.

  • Backend / RPC Layer:
    • EthRpcClient enhancements: Adds IPC transport with UNIX sockets, JWT auth support, incremental request IDs, configurable retries, and response parsing helpers; introduces EthRpcClient.l2_engine for authenticated engine calls.
    • GethDriver updates: Switch client to EthRpcClient.l2_engine, non_auth_client to EthRpcClient.l2; add memoized get_l1_attributes(l2_block_number) (moved from old client).
    • Callsite changes: Replace GethDriver.client.get_l1_attributes(...) with GethDriver.get_l1_attributes(...) in app/jobs/gap_detection_job.rb and app/services/eth_block_importer.rb.
    • Removal: Delete deprecated lib/geth_client.rb.

Written by Cursor Bugbot for commit 29dc822. This will update automatically on new commits. Configure here.

@RogerPodacter RogerPodacter requested a review from Copilot October 16, 2025 15:37
Comment thread lib/eth_rpc_client.rb
:ipc
else
:http
end

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: IPC Detection Fails on HTTP URLs

The detect_mode method might incorrectly classify HTTP URLs as IPC. This happens because its IPC detection logic, specifically checking for '.ipc' in the URL string and using File.socket? on potentially unstripped HTTP URLs, can lead to misidentification. This can cause the client to attempt IPC connections to HTTP endpoints, resulting in connection failures.

Fix in Cursor Fix in Web

@RogerPodacter RogerPodacter merged commit 47034f0 into evm-backend-demo Oct 16, 2025
2 checks passed
@RogerPodacter RogerPodacter deleted the use_ipc branch October 16, 2025 15:53
@RogerPodacter RogerPodacter removed the request for review from Copilot March 23, 2026 22:21
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.

1 participant