-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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: add DenomOwners gRPC method for x/bank #9533
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.
DenomOwners sounds fine to me 👍
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## master #9533 +/- ##
===========================================
+ Coverage 35.48% 60.71% +25.23%
===========================================
Files 332 588 +256
Lines 32620 37310 +4690
===========================================
+ Hits 11575 22653 +11078
+ Misses 19819 12703 -7116
- Partials 1226 1954 +728
|
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 🎉 . Since this is a query and not state breaking can we merge before 0.43 RC? or should we block @AmauryM @robert-zaremba ?
// QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. | ||
message QueryDenomOwnersResponse { | ||
// addresses defines the set of addresses that own a particular denomination. | ||
repeated string addresses = 1; |
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.
do we want to include balances here too?
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.
I think that'd be useful too. @alexanderbez ?
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.
Sure, I'll make this change.
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.
Done :)
OK to include this in 0.43. We can do a quick manual test once this is merged. |
@AmauryM @aaronc can you follow up in #9393 (comment)? I'd like to know how to proceed with this PR. |
I'm personally fine to merge this PR as-is, include it in 0.43, though I think adding #9533 (comment) is useful. If we add another index as per #9393, it's state breaking so would need to wait the next release. I would do that in a follow-up PR. |
I'd be happy to tackle the reverse index issue after this is merged. |
if req.Denom != balance.Denom { | ||
return false, nil | ||
} |
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.
yeah I think we need to have an index to avoid unmarshaling and doing this step
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.
Yes, #9590 should address this.
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!
Description
Adds a new gRPC method,
DenomOwners
, to thex/bank
module. This method queries for all account addresses that own a particular token denomination (paginated). Naming subject to change based on reviews.closes: #9393
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change