Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
WIP: Queriers for staking to increase Gaia-lite performance #2139
WIP: Queriers for staking to increase Gaia-lite performance #2139
Changes from 2 commits
2ca7e61
5e285e1
ec13fbe
3eacdfa
682008f
ceae374
9ba98ab
8bf6b2c
cd0ca86
01304c9
7889374
d3b6c3e
5fb1547
8cfc507
044b851
685f05a
6d9c8b7
3f5ad5f
f6aed4e
b9b04a0
2852b4a
128deb5
e93a937
80cd207
c83172d
7f3a42c
87c1a0f
5ecedad
af757dd
80db853
99acd57
8abb44e
55ff4b7
450539b
61efdf6
0bd0417
8a2d144
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Remove this function - for many reasons outlined already in my PR comments
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.
@rigelrozanski I still need to iterate through the validators to change them to
BechValidators
. Do you prefer to do this iteration on theQuerier
or move this keeper to thequery_utils.go
file ?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.
Split up into two functions as per my other comments - Actually I don't think
GetAllDelegatorValidators
should even exist I don't see a valid use of it - we should enforcing that a max value should be providedThere 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.
Let's enforce that there is a max retrieve here - I don't see a valid case for not requiring a maximum amount in this situation
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.
imo it's better to leave it this way. Otherwise how would you query all the UnbondingDelegations for example ?
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.
Let's split this up into two functions
GetRedelegations
andGetAllRedelegations
for reasons I've mentioned in other commentsThere 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 only adds i items to the validators array, is there a reason to trim it?
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 per my previous comment we should rarely be using GetAllValidators so it should be its own edge case. But also, let's remove use of this function altogether, it bloats the keeper - what we should really be doing is just converting the validators to bech once we've retrieved them from
GetValidators
.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.
With that implementation we'd have to iterate the validator array twice, one to retrieve the validators and another to convert each of them into
BechValidator
...