-
Notifications
You must be signed in to change notification settings - Fork 22
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
Support for epoch winning bakers and first block queries. #999
Conversation
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.
Looking good!
A few comments and questions.
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.
Please update changelog.
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.
As discussed in the office, it's a bit annoying that these two queries take a BlockHashInput (potentially) as argument but do not respond with the block hash that was used for the query.
But since they can also take an epoch number it is not always possible to return a block like it is for other queries that take just the BlockHashInput.
So it's probably the best if it stays like this.
And in the SDKs, we probably want to take only specific block hash, block height, or epoch number as arguments for the winning bakers to avoid mistakes.
Purpose
Support GRPCv2 endpoints
GetWinningBakersEpoch
(for getting the list of bakers that won in a given epoch) andGetFirstBlockEpoch
(for getting the first block in a given epoch).Changes
GetWinningBakersEpoch
endpoint (supports consensus v1 only).GetFirstBlockEpoch
endpoint (supports both consensus versions).Checklist
hard-to-understand areas.