Skip to content

internal/ethapi: add net_nodeInfo#2307

Merged
zzzckck merged 1 commit intobnb-chain:developfrom
weiihann:develop/net_nodeInfo
Mar 21, 2024
Merged

internal/ethapi: add net_nodeInfo#2307
zzzckck merged 1 commit intobnb-chain:developfrom
weiihann:develop/net_nodeInfo

Conversation

@weiihann
Copy link
Copy Markdown
Contributor

Description

This PR adds a new net_nodeInfo RPC method. It is the same as admin_nodeInfo.

Rationale

The reason why net_nodeInfo is introduced even though admin_nodeInfo already exists is because some admin methods can control the behavior of the node. If a node were to be compromised with the admin namespace enabled, then the node could potentially stop functioning.

On the other hand, having access to retrieving the node information is extremely useful, especially when running an infrastructure. The content of the node info doesn't reveal sensitive information as well, so it could be added to the net namespace safely.

Another consideration is to remove admin_nodeInfo and replace with net_nodeInfo. This is possible, but this will contradict with the documentation of geth upstream. So in my opinion, there's no harm keeping both.

Example

curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"net_nodeInfo","params":[],"id":83}' 127.0.0.1:8575

@zzzckck zzzckck merged commit e313d5b into bnb-chain:develop Mar 21, 2024
@Pjrich1313 Pjrich1313 mentioned this pull request Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants