-
Notifications
You must be signed in to change notification settings - Fork 224
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
light-client: add missing RPC endpoint and extend handler/supervisor #449
Conversation
TODOs:
|
- from `synced to block {} 1234` to `synced to block: 1234`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 🚢 💡 💁 💼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dope! Very straighforward extension.
The issue I see is that we make the entire LatestStatus
optional. Which for my understanding of an operational endpoint is confusing and actually reducing the signal, as for the caller it's unclear what the reason might be, as the system only returns one when there is a primary with a trusted block. Instead we should always return a proper response and make fields in there optional. This part should be addressed in this PR IMHO.
Beyond that the real value of this new endpoint comes from the peer list, the other info can be obtained from the state endpoint. We would benefit by reworking the status one into giving operational insight, like what's the state known for a given peer, latest block, status of latest block and if they are our current primary. In a very far future this could expose the different lists in PeerList. We can look into that in follow-ups.
I think the reason is exactly the same as why the endpoint you created is optional too but yeah, you are right in this context it is important to return any information if it is available. Do you think that all these fields should basically be optional then? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👂 ⛰ 🆘 🏃
Looks great! 👍 Just a quick note on the new |
#219 (comment)
and contains a preliminary fix for #450 (thanks @OStevan)
closes #450
closes #219