fix: extract file path from IPC URI before passing to transport#6443
Open
aayushbaluni wants to merge 1 commit intographprotocol:masterfrom
Open
fix: extract file path from IPC URI before passing to transport#6443aayushbaluni wants to merge 1 commit intographprotocol:masterfrom
aayushbaluni wants to merge 1 commit intographprotocol:masterfrom
Conversation
When configuring IPC provider in config.toml with URLs like ipc:///path/to/socket.ipc or file:///path/to/socket.ipc, the URL was passed directly to Transport::new_ipc() which expects a file path. This caused connection failures. Extract the path component from the URI when parseable, otherwise use the raw string for bare paths. Fixes graphprotocol#6204
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
Fixes #6204
When configuring an IPC provider in
config.tomlwith URLs likeipc:///path/to/socket.ipcorfile:///path/to/socket.ipc, the URL was passed directly toTransport::new_ipc()which expects a file path. This caused connection failures and panics.Root cause
The config parser validates URLs using proper URI format, but the web3 crate's IPC transport expects just a file path. The URL string (e.g.
ipc:///socket.ipc) was passed through without extracting the path component.Fix
Extract the path component from the URI when parseable via
Url::parse(), otherwise use the raw string for bare paths. This allows bothipc:///path,file:///path, and bare/pathformats to work correctly.Testing
Made with Cursor