ethereum / ethereum/beacon-APIs
Inconsistency in `/eth/v1/node/peers`
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 387
- Forks
- 224
- Avg merge
- 8h 29m
- Merged PRs (30d)
- 3
Description
The `/eth/v1/node/peers` returns a `meta` element that contains a `count` item. The schema for this item declares the value to be a number, which is inconsistent with the common format of providing numeric values as quoted strings.
A quick tour of the main beacon nodes shows the following for this value:
- lighthouse: returns the value unquoted
- nimbus: returns the value quoted
- prysm: does not return the `meta` element
- teku: returns the value unquoted
Options that I can think of:
1. patch the spec so that the `v1` endpoint returns a quoted value
2. raise bugs with the relevant beacon nodes to ensure this value is returned unquoted
3. deprecate the `v1` endpoint and create a `v2` endpoint with a quoted value
1. retaining the `meta` element
2. discarding the `meta` element (nowhere else do we return a value like this that can easily be calculated from the other returned information)
3. moving the count value to the top level returned object where all other metadata lives
My inclination is for option 3 suboption 2, but I would be interested in hearing if anyone has a reason for this `meta` element to exist, and the `count` value within it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the /eth/v1/node/peers response schema and its meta.count definition, then compare the listed Lighthouse, Nimbus, Prysm, and Teku responses. Done means the inconsistency has a settled compatibility decision and the relevant API specification or endpoint version is updated accordingly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100