This repository was archived by the owner on Jan 16, 2026. It is now read-only.
Conversation
Contributor
Author
📚
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements the handling for the opp2p_connectPeer RPC method, enabling connection via a Multiaddr string.
- Implements opp2p_connectPeer by parsing the Multiaddr string and routing the connection request.
- Adds unit tests for Multiaddr parsing and updates the RPC request enums and Cargo.toml to support the new functionality.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/node/rpc/src/p2p.rs | Implements the RPC method opp2p_connectPeer using Multiaddr parsing. |
| crates/node/rpc/Cargo.toml | Adds a workspace marker for libp2p. |
| crates/node/p2p/src/rpc/request.rs | Adds the ConnectPeer variant and implements connect_peer handling. |
Comments suppressed due to low confidence (1)
crates/node/rpc/src/p2p.rs:145
- The parameter name '_peer' suggests that it is unused, but it is actually used. Consider renaming it to 'peer' to avoid confusion.
async fn opp2p_connect_peer(&self, _peer: String) -> RpcResult<()> {
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
clabby
approved these changes
Jun 9, 2025
theochap
pushed a commit
to ethereum-optimism/optimism
that referenced
this pull request
Dec 10, 2025
### Description Implements handling for the `opp2p_connectPeer` method using the Multiaddr string. This follows how [the monorepo parses the addr string](https://github.com/ethereum-optimism/optimism/blob/51cb1a7523ac45e3c3703a1a2c6794b378f27cba/op-node/p2p/rpc_server.go#L353). Closes op-rs/kona#1575
theochap
pushed a commit
to ethereum-optimism/optimism
that referenced
this pull request
Jan 14, 2026
### Description Implements handling for the `opp2p_connectPeer` method using the Multiaddr string. This follows how [the monorepo parses the addr string](https://github.com/ethereum-optimism/optimism/blob/51cb1a7523ac45e3c3703a1a2c6794b378f27cba/op-node/p2p/rpc_server.go#L353). Closes #1575
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Implements handling for the
opp2p_connectPeermethod using the Multiaddr string.This follows how the monorepo parses the addr string.
Closes #1575