Open mcdee opened 1 year ago
i wouldn't be against a v2 without the count - its pretty trivial to get the count from an array...
I guess that translates to 3 suboption 2 being my preference.
We will be fixing the count in nimbus - ie whether or not a v2 happens is orthogonal to whether v1 is correctly implemented in clients as far as I'm concerned.
The meta
element might have been a good idea if used consistently across all APIs but as it is right now, any top-level property should be considered metadata (execution_optimistic
, finalized
, etc.) and everything else (the actual data) must be part of data
element.
As this API is an outlier and does not follow this pattern, I would also prefer option 3 suboption 2.
+1 to burn the meta
No one likes the meta element, but there's no appetite either for the effort to remove it
According to @mcdee review of clients seems that support of the meta element is poor. If no-one has complained should mean that no consumer is dependent on it.
To address this one-off oddity we could do a breaking change on route v1 and mark the meta property as optional. Then only Nimbus needs to fix the route to be compliant, which @arnetheduck is already keen on doing.
Thoughts?
The
/eth/v1/node/peers
returns ameta
element that contains acount
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:
meta
elementOptions that I can think of:
v1
endpoint returns a quoted valuev1
endpoint and create av2
endpoint with a quoted valuemeta
elementmeta
element (nowhere else do we return a value like this that can easily be calculated from the other returned information)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 thecount
value within it.