Skip to content

Add admin_peers rpc endpoint #2671

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mpaulucci opened this issue May 6, 2025 · 0 comments · Fixed by #2732
Closed

Add admin_peers rpc endpoint #2671

mpaulucci opened this issue May 6, 2025 · 0 comments · Fixed by #2732
Assignees
Labels
L1 Ethereum client p2p Issues related to p2p network rpc-api Public rpc-json api for users

Comments

@mpaulucci
Copy link
Collaborator

See https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-admin#admin-peers as reference

This the first issue where a rpc endpoint needs to reference something from p2p crate. We need to find an elegant way to do this.

@mpaulucci mpaulucci added rpc-api Public rpc-json api for users p2p Issues related to p2p network L1 Ethereum client labels May 6, 2025
@fmoletta fmoletta self-assigned this May 9, 2025
@mpaulucci mpaulucci moved this to In Progress in ethrex_l1 May 15, 2025
@mpaulucci mpaulucci moved this from In Progress to In Review in ethrex_l1 May 19, 2025
github-merge-queue bot pushed a commit that referenced this issue May 20, 2025
**Motivation**
Support rpc endpoint `admin_peers`
<!-- Why does this pull request exist? What are its goals? -->

**Description**
* Add rpc endpoint `admin_peers`
* Track inbound connections 
* Store peer node version when starting a connection
* Add `peer_handler: PeerHandler` field to `RpcContext` so we can access
peers from the rpc
* (Misc) `Syncer` & `SyncManager` now receive a `PeerHandler` upon
creation instead of a `KademliaTable`
* (Misc) Fix common typo across the project
<!-- A clear and concise general description of the changes this PR
introduces -->

Data missing compared to geth implementation:
* The local address of each connection
* Whether a connection is trusted, static (we have no notion of this
yet)
<!-- Link to issues: Resolves #111, Resolves #222 -->

Closes #2671
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L1 Ethereum client p2p Issues related to p2p network rpc-api Public rpc-json api for users
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants