-
Notifications
You must be signed in to change notification settings - Fork 220
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
feat: new grpc method #6742
feat: new grpc method #6742
Conversation
Test Results (CI) 3 files 129 suites 37m 15s ⏱️ Results for commit 9b5f3eb. ♻️ This comment has been updated with latest results. |
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.
utACK
Any system-level test comparisons?
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.
LGTM
One comment, but no required changes.
if res.1 == *current_tip { | ||
Some(res.0.clone()) |
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.
This is just a nit and not a change request.
I always prefer a struct and names values over indexing from a tuple res.1
or res.0
as they lose context and meaning in these functions.
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.
valid point, let me update
9b5f3eb
Description
Creates a new grpc method to get the reward of the nextblock, the sha + rx estimate hash rates and metadata tip info
Adds caching to grpc calls
Motivation and Context
Currently, universe calls get_template to just read the reward which is an expensive operation.
It also streams up to 100 headers to calculate the estimated hash rate.
Both of these operations can be made much simpler and faster. This PR provides a call to do just that.
This Pr also adds cahcing to the calls to only update if an update is required.