besu icon indicating copy to clipboard operation
besu copied to clipboard

Retrieve ENR via API

Open daniellehrner opened this issue 2 years ago • 1 comments

Description

Currently there is no easy way to recover the ENR (Ethereum Node Record) of a Besu node. It can only be recovered in the log output, right after the start.

It would be convenient to retrieve it via API. One potential use case would be to retrieve the ENR of a node and check if it is included in discv4-dns-lists of the EF automatically for regular checks.

Option 1: Extending the admin_nodeInfo RPC call: Even though there does not exist any specification, it is at least implemented by geth and Nethermind as well. Some libraries like web3j and web3.py support it as well. Extending it should be coordinated with the other clients. A proposal has been posted on the json-rpc-api channel on the Eth R&D Discord channel.

Option 2: Creating a new RPC endpoint: This would not be needed to be coordinated with other clients and would avoid potential bugs with existing tools when they receive an unexpected field in the response of an admin_nodeInfo call. The downside would be of course that it would only supported by Besu. We were thinking to call it admin_enrInfo, to use a similar naming pattern as admin_nodeInfo.

Acceptance Criteria

  • Retrieve ENR via API

daniellehrner avatar Nov 12 '21 14:11 daniellehrner

Hey @daniellehrner - where did this end up with regard to #3051?

non-fungible-nelson avatar Jul 19 '22 18:07 non-fungible-nelson

Closing it, because there seems to be no need anymore for it.

daniellehrner avatar Nov 10 '22 09:11 daniellehrner