Skip to content
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

Add an RPC method to get the local node record #850

Closed
Tracked by #851
onbjerg opened this issue Jan 13, 2023 · 4 comments · Fixed by #880
Closed
Tracked by #851

Add an RPC method to get the local node record #850

onbjerg opened this issue Jan 13, 2023 · 4 comments · Fixed by #880
Assignees
Labels
A-rpc Related to the RPC implementation C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started

Comments

@onbjerg
Copy link
Collaborator

onbjerg commented Jan 13, 2023

Describe the feature

We should add an RPC method named admin_nodeInfo that returns the ENR of the node. This depends on #849.

Additionally, AdminApi in the reth-rpc crate should be exported and constructable: currently it is private and impossible to construct.

Additional context

To add the new RPC method, first extend the AdminApiServer trait here: https://github.com/paradigmxyz/reth/blob/main/crates/net/rpc-api/src/admin.rs

Then add the implementation for the new method here: https://github.com/paradigmxyz/reth/blob/main/crates/net/rpc/src/admin/mod.rs

The ENR should be fetched using the NetworkHandle in the AdminApi implementation.

@onbjerg onbjerg added C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started S-blocked This cannot more forward until something else changes A-rpc Related to the RPC implementation labels Jan 13, 2023
@Evalir
Copy link
Collaborator

Evalir commented Jan 13, 2023

Happy to take on this as well!

@onbjerg onbjerg moved this from Todo to In Progress in Reth Tracker Jan 13, 2023
@onbjerg
Copy link
Collaborator Author

onbjerg commented Jan 13, 2023

@Evalir Note that this issue is blocked on #849. If you still want this task, pls comment on that issue so I can assign you 😄

@Evalir
Copy link
Collaborator

Evalir commented Jan 13, 2023

sounds good—commenting!

@Evalir
Copy link
Collaborator

Evalir commented Jan 13, 2023

Should now be unblocked with #875

@onbjerg onbjerg removed the S-blocked This cannot more forward until something else changes label Jan 13, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Reth Tracker Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants