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 inbound field for admin_peers json-rpc call. #7436

Closed
barnabasbusa opened this issue Aug 8, 2024 · 2 comments · Fixed by #7461
Closed

Add inbound field for admin_peers json-rpc call. #7436

barnabasbusa opened this issue Aug 8, 2024 · 2 comments · Fixed by #7461
Assignees
Labels
good first issue Good for newcomers

Comments

@barnabasbusa
Copy link

admin_peers json-rpc call seems to not show whether a peer is inbound/outbound on besu, while on geth/erigon/ethjs/reth it does. Could we add this extra field for besu?

expected output:

"jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "enode": "enode://2342d72cace0dca858a7a0739d66665c9b26bd3215f5fd8b683306a28d2eaa9ecc76f215e7625ce97e3e7d8139974c5c0441a7032890ba62aeeb9a7182a412a9@165.227.128.224:39694",
      "id": "091a685e1319bf54dc4f55ec98649a83499acbd462fb4b0a874595ea81541d6a",
      "name": "erigon/v3.00.0-alpha1-da0d58c2/linux-amd64/go1.22.5",
      "caps": [
        "eth/68"
      ],
      "network": {
        "localAddress": "172.18.0.3:30303",
        "remoteAddress": "165.227.128.224:39694",
        "inbound": true,
        "trusted": false,
        "static": false
      },
      "protocols": {
        "eth": {
          "version": 68
        }
      }
    },

Current output:

    {
      "version": "0x5",
      "name": "Nethermind/v1.28.0-unstable+4c1f3ee1/linux-x64/dotnet8.0.7",
      "caps": [
        "eth/66",
        "eth/67",
        "eth/68",
        "nodedata/1",
        "snap/1"
      ],
      "network": {
        "localAddress": "172.18.0.3:39418",
        "remoteAddress": "167.99.250.53:30303"
      },
      "port": "0x765f",
      "id": "0x4a0410e481e97cff53a983947228162c4a314f8ff732884b78965407c7dcfa3ee77d2c25ad4247f5dffcbe1b93b11f544c36dde00c51165a3df48e358ff51b43",
      "protocols": {
        "eth": {
          "difficulty": "0x1",
          "head": "0x582b4f50e6e3ff97079c5729756d2b662229fe4eec7bffbd715918ae0a466e4e",
          "version": 68
        }
      },
      "enode": "enode://4a0410e481e97cff53a983947228162c4a314f8ff732884b78965407c7dcfa3ee77d2c25ad4247f5dffcbe1b93b11f544c36dde00c51165a3df48e358ff51b43@167.99.250.53:30303?discport=57290"
    }
  ]

Would be great to add result.network.inbound: <bool>

@7suyash7
Copy link
Contributor

Sorry, I closed my previous PR by mistake

@cloudspores
Copy link
Contributor

Are the 'trusted' and 'static' fields also required for admin_peers json-rpc call?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
4 participants