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

Problem: interchain-accounts module is not integrated #541

Merged
merged 2 commits into from
Jul 5, 2022

Conversation

yihuang
Copy link
Collaborator

@yihuang yihuang commented Jun 7, 2022

Closes: #540

Solution:

  • integrate ica controller module
  • add integration test, refactor the ibc integration test using builtin capabilities of pystarport

👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻

PR Checklist:

  • Have you read the CONTRIBUTING.md?
  • Does your PR follow the C4 patch requirements?
  • Have you rebased your work on top of the latest master?
  • Have you checked your code compiles? (make)
  • Have you included tests for any non-trivial functionality?
  • Have you checked your code passes the unit tests? (make test)
  • Have you checked your code formatting is correct? (go fmt)
  • Have you checked your basic code style is fine? (golangci-lint run)
  • If you added any dependencies, have you checked they do not contain any known vulnerabilities? (go list -json -m all | nancy sleuth)
  • If your changes affect the client infrastructure, have you run the integration test?
  • If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
  • If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?
  • If you are contributing for the first time, please read the agreement in CONTRIBUTING.md now and add a comment to this pull request stating that your PR is in accordance with the Developer's Certificate of Origin.

Thank you for your code, it's appreciated! :)

@codecov
Copy link

codecov bot commented Jun 7, 2022

Codecov Report

Merging #541 (25b4771) into main (c1932fd) will decrease coverage by 2.10%.
The diff coverage is 12.30%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #541      +/-   ##
==========================================
- Coverage   41.83%   39.72%   -2.11%     
==========================================
  Files          30       36       +6     
  Lines        1690     1820     +130     
==========================================
+ Hits          707      723      +16     
- Misses        929     1043     +114     
  Partials       54       54              
Impacted Files Coverage Δ
x/icactl/types/codec.go 0.00% <0.00%> (ø)
x/icactl/types/genesis.go 0.00% <0.00%> (ø)
x/icactl/types/params.go 0.00% <0.00%> (ø)
x/icactl/types/message_submit_tx.go 10.52% <10.52%> (ø)
x/icactl/types/message_register_account.go 26.08% <26.08%> (ø)
x/icactl/types/types.go 100.00% <100.00%> (ø)

Copy link
Contributor

@tomtau tomtau left a comment

Choose a reason for hiding this comment

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

x/icaauth seems to be for the "host" chain , so perhaps that's not needed in the context of #539 ? i.e. x/icaauth would need some patches in Ethermint to support eth accounts and transactions?

@yihuang
Copy link
Collaborator Author

yihuang commented Jun 7, 2022

x/icaauth seems to be for the "host" chain , so perhaps that's not needed in the context of #539 ? i.e. x/icaauth would need some patches in Ethermint to support eth accounts and transactions?

the icaauth seems needed for controller chain too, to register the accounts, and provide the SendTx msg.

@yihuang yihuang force-pushed the ica-controller branch 3 times, most recently from 41727a6 to c9bd3e8 Compare June 7, 2022 10:22
@yihuang yihuang marked this pull request as ready for review June 7, 2022 10:22
@yihuang yihuang requested a review from a team as a code owner June 7, 2022 10:22
@yihuang yihuang requested review from calvinaco, leejw51crypto, tomtau and devashishdxt and removed request for a team June 7, 2022 10:22
Copy link
Contributor

@tomtau tomtau left a comment

Choose a reason for hiding this comment

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

if icaauth is really needed even for controller, could it be imported from crypto.org chain repo (if duplicate / identical)?

@devashishdxt
Copy link

if icaauth is really needed even for controller, could it be imported from crypto.org chain repo (if duplicate / identical)?

We may need custom hooks in cronos when receiving acknowledgement.

@yihuang
Copy link
Collaborator Author

yihuang commented Jun 8, 2022

if icaauth is really needed even for controller, could it be imported from crypto.org chain repo (if duplicate / identical)?

there are several minor differences right now:

  • chain-main master branch has moved to ibc-go master for the relayer incentivization support, there are api breaking changes.
  • cronos's version removed the unused storeKey.
  • namespace change in the rest api, /cronos/icaauth/v1/interchain_account_address vs /chain-main/icaauth/v1/interchain_account_address.

@yihuang
Copy link
Collaborator Author

yihuang commented Jun 8, 2022

if icaauth is really needed even for controller, could it be imported from crypto.org chain repo (if duplicate / identical)?

We may need custom hooks in cronos when receiving acknowledgement.

yeah, we might need that to integrate with smart contract.

integration_tests/test_ibc.py Outdated Show resolved Hide resolved
@yihuang
Copy link
Collaborator Author

yihuang commented Jun 8, 2022

if icaauth is really needed even for controller, could it be imported from crypto.org chain repo (if duplicate / identical)?

I'll try to simplify it, I think it's possible to merge the functionalities to cronos module itself.

@yihuang
Copy link
Collaborator Author

yihuang commented Jun 8, 2022

if icaauth is really needed even for controller, could it be imported from crypto.org chain repo (if duplicate / identical)?

I'll try to simplify it, I think it's possible to merge the functionalities to cronos module itself.

ah, I think all the codes in icaauth module are actually for the controller side, even if merge the modules, it can't be simplified:

  • it provides the tx msgs/queries/clis for the controller size.
  • it provides the ibc module to handle capability and permissions for the controller side.

it's actually not very useful for host side I think, it's critical for the controller side.

@yihuang
Copy link
Collaborator Author

yihuang commented Jun 8, 2022

Maybe the name icaauth is confusing here, to my understanding, it's something to complete the ica controller side, the controller module provided in ibc-go only provides the ibc middleware and keeper, and the icaauth provides the tx msgs, query handlers, cmds, ibc module.

which do you think could be a better name? some ideas:

  • ica
  • icamodule
  • icacontroller
  • icacronos

@tomtau
Copy link
Contributor

tomtau commented Jun 8, 2022

maybe ica, given it's the shortest? :)

@yihuang
Copy link
Collaborator Author

yihuang commented Jun 8, 2022

maybe ica, given it's the shortest? :)

how about icactl? it emphasizes that it's the controller side logic, and doesn't directly conflict with the name icacontroller.

@tomtau
Copy link
Contributor

tomtau commented Jun 8, 2022

icacontroller is fine too.
@devashishdxt do you have any preference (in the case you plan to refactor the name in chain-main to make it aligned)?

@devashishdxt
Copy link

icacontroller is fine too.

@devashishdxt do you have any preference (in the case you plan to refactor the name in chain-main to make it aligned)?

I don't think we can use icacontroller because it conflicts with the module in ibc-go. icactl sounds good.

@yihuang yihuang force-pushed the ica-controller branch 2 times, most recently from 5472d3a to c855b48 Compare June 14, 2022 04:11
@yihuang yihuang requested a review from tomtau June 30, 2022 06:59
Copy link
Contributor

@tomtau tomtau left a comment

Choose a reason for hiding this comment

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

I can give another round of review next week unless it's urgent

@yihuang
Copy link
Collaborator Author

yihuang commented Jun 30, 2022

I can give another round of review next week unless it's urgent

I think not urgent

@yihuang yihuang force-pushed the ica-controller branch 2 times, most recently from ee9fc04 to adbbe89 Compare July 4, 2022 04:45
Copy link
Contributor

@tomtau tomtau left a comment

Choose a reason for hiding this comment

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

I haven't read through the generated pb files, but others look ok

app/app.go Show resolved Hide resolved
app/app.go Show resolved Hide resolved
nix/sources.json Show resolved Hide resolved
x/icactl/keeper/keeper.go Show resolved Hide resolved
app/app.go Show resolved Hide resolved
x/icactl/module_ibc.go Show resolved Hide resolved
Closes: crypto-org-chain#540

Solution:
- integrate ica controller module

add ica integration tests

regen proto

temp

cleanup

fix integration test

Update integration_tests/test_ibc.py

cleanup

icaauth -> icactl

gen proto

fix integration test

fix conflicts

add v0.8.0 upgrade test and comment

use flake-compat to build v0.7.0 binary for upgrade test

fix integration test

use flake-compat to build v0.7.0 binary for upgrade test

fix integration test

fix rebase

fix key_name
@yihuang yihuang merged commit 7cb1631 into crypto-org-chain:main Jul 5, 2022
@yihuang yihuang deleted the ica-controller branch July 5, 2022 03:44
mmsqe pushed a commit to mmsqe/cronos that referenced this pull request Aug 29, 2023
…in#541)

* Problem: interchain-accounts module is not integrated

Closes: crypto-org-chain#540

Solution:
- integrate ica controller module

add ica integration tests

regen proto

temp

cleanup

fix integration test

Update integration_tests/test_ibc.py

cleanup

icaauth -> icactl

gen proto

fix integration test

fix conflicts

add v0.8.0 upgrade test and comment

use flake-compat to build v0.7.0 binary for upgrade test

fix integration test

use flake-compat to build v0.7.0 binary for upgrade test

fix integration test

fix rebase

fix key_name

* update swagger ui
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.

Problem: interchain-accounts module is not integrated
3 participants