-
Notifications
You must be signed in to change notification settings - Fork 795
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
telemetry_ack response: implemenation of fields "uptime, peercount, protocol_version" does not match documentation #3490
Comments
@dsiganos So you are seeing the same value for |
@zhyatt Hmmm, what is a telemetry cache window? Does telemetry get sampled only at specific times and not whenever I issue telemetry request? |
Yeah, there is a cache window to reduce impact of repeat requests. I believe it may be 15s or 30s. Here is an update with regards to that, not sure where in the code all of that sits exactly though: #2650. |
This is what I get for uptime for one of the beta servers with v23.0.0.2, which was restarted within the last hour:
The uptime cannot possibly be representing seconds of uptime as the protocol says. |
Minutes later, iuptime is still showing the same value 81906368512:
|
So the telemetry RPC documentation mentions the Locally I assume this means the telemetry number subtracted from the current time since epoch will be arrive at number of seconds the node has been up. Does this better line up with what you are seeing (ignoring the issue of returning old values in telemetry)? Currently that node you reference above is reporting ~7000s of uptime (it is NF Beta 1) |
I cannot even understand what the "number of seconds since the UTC epoch at the point where the response is sent from the peer" means exactly. In any case, what I see is not an increasing number so it cannot be anything that is tracking time. I have logged this here so I can move on with other more important things. These are not recent regressions, I have been aware of these issues for a at least 2-3 months but I just hadn't logged them yet because i wasnt sure they were real problems or misunderstanding on my part. |
I don't think I explained this clearly and the docs need updating, so I will make some additional notes here for future reference if they are useful:
|
I found the problem: nano-node/nano/node/common.cpp Line 1207 in 1e8c041
The 3 telemetry_ack fields: uptime, peercount, protocol_version are written in the wrong order in the telemetry_ack packet data.
That means that all 3 fields hold the wrong values (according to the protocol documentation). The questions is, do we change the documentation (https://github.com/nanocurrency/protocol/blob/b94bb467bf5264603b8a1870524791279988783e/reference/protocol.ksy#L382) to reflect the implementation or do we change the implementation to reflect the documentation? The source code fix is trivial. |
The plan is to change the documentation to match the implementation, to preserve backwards compatibility. |
Since the spec is currently derived from the implementation, it's very helpful if https://github.com/nanocurrency/protocol/issues gets a ticket whenever code is merged with wire format changes. Same with database changes in the nanodb-specification repo. Once v23 is released, I plan to generate a new parser for nanocap to verify the protocol documentation. |
There are some lagging items to resolve on the protocol side, I will make an attempt at resolving them, including this issue, which appears to have been around since the telemetry was introduced a couple years ago. |
We fixed the documentation to reflect the implementation so this ticket can be closed now. |
telemetry_ack response: "uptime" field contains non-changing data, which doesn't make sense
The text was updated successfully, but these errors were encountered: