This repository was archived by the owner on Jan 16, 2026. It is now read-only.
Merged
Conversation
Contributor
Author
📚
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements the new RPC method opp2p_disconnectPeer to allow disconnecting a specified peer via an RPC request.
- Introduces a new RPC method in the p2p module.
- Adds the corresponding RPC request variant and handling logic in both the rpc and p2p modules.
- Updates library configuration to include tracing support.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| crates/node/rpc/src/p2p.rs | Replaces the unused parameter with a parsed peer_id and sends a disconnect request. |
| crates/node/rpc/src/lib.rs | Adds tracing macros to support the new logging requirements. |
| crates/node/rpc/Cargo.toml | Enables workspace-wide tracing for improved log management. |
| crates/node/p2p/src/rpc/request.rs | Introduces a new DisconnectPeer RPC variant and implements its handling. |
| crates/node/p2p/src/net/driver.rs | Updates the RPC handler call to pass a mutable reference to GossipDriver. |
Comments suppressed due to low confidence (1)
crates/node/rpc/src/p2p.rs:153
- [nitpick] The variable 'peer_id' is shadowing the function parameter. Consider renaming the shadowed variable to 'parsed_peer_id' for improved clarity.
let peer_id = match peer_id.parse() {
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:
|
theochap
pushed a commit
to ethereum-optimism/optimism
that referenced
this pull request
Dec 10, 2025
### Description Implements the `opp2p_disconnectPeer` rpc request. Closes op-rs/kona#1576
theochap
pushed a commit
to ethereum-optimism/optimism
that referenced
this pull request
Jan 14, 2026
### Description Implements the `opp2p_disconnectPeer` rpc request. Closes #1576
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 the
opp2p_disconnectPeerrpc request.Closes #1576