Conversation
📚
|
There was a problem hiding this comment.
Pull Request Overview
Adds progress on exposing peer connection gate data in the P2P RPC endpoint, including banned subnets and peers.
- Changed the
banned_subnetsfield type in the RPC types toVec<String>. - Populates and returns
banned_peers,banned_ips, andbanned_subnetsin thePeerDumpresponse.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/node/p2p/src/rpc/types.rs | Changed banned_subnets from Vec<IpAddr> to Vec<String> |
| crates/node/p2p/src/rpc/request.rs | Gathered and set banned_peers, banned_ips, and banned_subnets before sending PeerDump |
Comments suppressed due to low confidence (4)
crates/node/p2p/src/rpc/types.rs:140
- Consider using a structured subnet type (e.g., an
IpNetor a dedicatedSubnetwrapper) instead of rawStringto preserve type safety and allow subnet-specific operations.
pub banned_subnets: Vec<String>,
crates/node/p2p/src/rpc/types.rs:139
- [nitpick] The earlier
// TODO: should be IPNetcomment was removed without migrating to a structured type; reintroduce a TODO or issue reference to track this intended improvement.
/// The banned subnets
crates/node/p2p/src/rpc/types.rs:140
- Add a
#[serde(rename = "bannedSubnets")]attribute to ensure the JSON key matches the naming convention used forbannedIPSand other RPC fields.
pub banned_subnets: Vec<String>,
crates/node/p2p/src/rpc/request.rs:360
- The new
banned_peersandbanned_subnetsfields in the RPC response aren't covered by existing tests; consider adding unit or integration tests to validate their presence and correct serialization.
banned_peers: banned_peers.into_iter().map(|p| p.to_string()).collect(),
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:
|
### Description Makes progress on op-rs/kona#1562.
### Description Makes progress on #1562.
Description
Makes progress on #1562.