Skip to content
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: mapped accounts #436

Merged
merged 31 commits into from
Jun 7, 2023
Merged

feat: mapped accounts #436

merged 31 commits into from
Jun 7, 2023

Conversation

aljo242
Copy link

@aljo242 aljo242 commented May 18, 2023

1. Summary

Fixes QCK-452

2.Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

3. Implementation details

4. How to test/use

5. Checklist

  • Does the Readme need to be updated?

6. Limitations (optional)

7. Future Work (optional)

@codecov-commenter
Copy link

codecov-commenter commented May 18, 2023

Codecov Report

Merging #436 (b8781bd) into develop (6c5bde1) will decrease coverage by 0.10%.
The diff coverage is 44.81%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #436      +/-   ##
===========================================
- Coverage    54.47%   54.38%   -0.10%     
===========================================
  Files          163      164       +1     
  Lines        12045    12255     +210     
===========================================
+ Hits          6562     6665     +103     
- Misses        4987     5087     +100     
- Partials       496      503       +7     
Flag Coverage Δ
unittests 54.38% <44.81%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
utils/test.go 0.00% <0.00%> (ø)
x/interchainstaking/client/cli/query.go 52.71% <0.00%> (-13.31%) ⬇️
x/interchainstaking/keeper/receipt.go 24.54% <0.00%> (-3.38%) ⬇️
x/interchainstaking/types/keys.go 40.74% <0.00%> (-5.10%) ⬇️
x/interchainstaking/keeper/intent.go 72.98% <50.00%> (+0.82%) ⬆️
x/interchainstaking/types/zones.go 69.94% <67.30%> (-9.18%) ⬇️
x/interchainstaking/keeper/grpc_query.go 80.50% <81.25%> (+0.06%) ⬆️
x/interchainstaking/keeper/address_map.go 87.80% <87.80%> (ø)

... and 1 file with indirect coverage changes

Copy link
Contributor

@joe-bowman joe-bowman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far;

xcclookup will require a new query type to return map of addresses, indexed by chain ID (I don't think we need them bech32ified, because the first thing we do in xcclookup is decode the address anyway) for a given address:

/quicksilver/interchainstaking/v1/mapped_addresses/quick1abcdef

which is why we prefix the local address mapping by address and not chain, so we prefix iterator over it for this query :)

if we do, we will need to add the account prefix to the ProtocolDataConnection structs

x/interchainstaking/keeper/address_map_test.go Outdated Show resolved Hide resolved
@aljo242 aljo242 marked this pull request as ready for review June 1, 2023 12:07
ajansari95 and others added 3 commits June 2, 2023 22:09
* add mapped account query

* format

* rebase

* return map instead of struct

* Update x/interchainstaking/client/cli/query.go

Co-authored-by: Alex Johnson <[email protected]>

* Update x/interchainstaking/keeper/grpc_query.go

* Update x/interchainstaking/keeper/grpc_query_test.go

* fix lint

* use sdkConfig

---------

Co-authored-by: Alex Johnson <[email protected]>
@aljo242 aljo242 requested review from joe-bowman and ajansari95 June 5, 2023 17:42
Copy link
Contributor

@joe-bowman joe-bowman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple of nits remaining

@aljo242 aljo242 requested a review from joe-bowman June 6, 2023 16:41
ajansari95
ajansari95 previously approved these changes Jun 7, 2023
Copy link
Contributor

@ajansari95 ajansari95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

joe-bowman
joe-bowman previously approved these changes Jun 7, 2023
Copy link
Contributor

@joe-bowman joe-bowman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@joe-bowman joe-bowman requested a review from muku314115 as a code owner June 7, 2023 10:26
ajansari95
ajansari95 previously approved these changes Jun 7, 2023
Copy link
Contributor

@ajansari95 ajansari95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ajansari95 ajansari95 dismissed stale reviews from joe-bowman and themself via 6ab8c5b June 7, 2023 10:35
Copy link
Contributor

@joe-bowman joe-bowman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@joe-bowman joe-bowman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@ajansari95 ajansari95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@joe-bowman joe-bowman merged commit 9db754d into develop Jun 7, 2023
@joe-bowman joe-bowman deleted the feat/keytypes branch June 7, 2023 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants