feat: add DenomOwners gRPC method for x/bank#9533
Conversation
amaury1093
left a comment
There was a problem hiding this comment.
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.
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.
do we want to include balances here too?
There was a problem hiding this comment.
Sure, I'll make this change.
|
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.
yeah I think we need to have an index to avoid unmarshaling and doing this step
Description
Adds a new gRPC method,
DenomOwners, to thex/bankmodule. 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.mdReviewers 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