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(app): add interchain accounts for v0.46.0 #2703

Merged
merged 2 commits into from
Aug 10, 2022

Conversation

aljo242
Copy link
Contributor

@aljo242 aljo242 commented Aug 5, 2022

Resolves #2700

@aljo242 aljo242 self-assigned this Aug 5, 2022
@aljo242 aljo242 changed the title templates(app): add interchain accounts for v0.46.0 feat(app): add interchain accounts for v0.46.0 Aug 5, 2022
@lumtis lumtis linked an issue Aug 5, 2022 that may be closed by this pull request
@fadeev
Copy link
Contributor

fadeev commented Aug 6, 2022

This is great! 👍

What I've found is that when trying to implement an ICA authentication module, the error checking logic we have in module_ibc.go actually prevents the data to be written in the authentication module store. Doesn't throw an error either, just silently fails to write the data.

Just something to consider, but maybe having a very lightweight module_ibc.go would be the way to go.

https://gist.github.com/fadeev/593e45a63103dbd87df539693d50309d

@lumtis
Copy link
Contributor

lumtis commented Aug 8, 2022

What I've found is that when trying to implement an ICA authentication module, the error checking logic we have in module_ibc.go actually prevents the data to be written in the authentication module store. Doesn't throw an error either, just silently fails to write the data.

Do you have more details on the issue like which method is involved? It seems outside the scope of the PR to me if it's related to another module scaffolding

Just something to consider, but maybe having a very lightweight module_ibc.go would be the way to go.

Do you mean we should remove ignite s packet command?

@fadeev
Copy link
Contributor

fadeev commented Aug 8, 2022

@lubtd good call. Silly of me to forget about packet scaffolding. I'll create a new issue for this.

@lumtis
Copy link
Contributor

lumtis commented Aug 8, 2022

@lubtd good call. Silly of me to forget about packet scaffolding. I'll create a new issue for this.

Yes, the current scaffolding add the logic to dispatch different logic from different packet content in your module as it is showcased for the Interchange tuto.

But in many cases, you have a single packet for the whole IBC module and in this context, it can be seen that the dispatch logic of module_ibc.go is overengineered. Maybe it could be thought of having the option for the simpler scaffolding.

IMO the ideal case to me is that you have the minimal scaffolding by default (I think --no-message option of map and list should be the default behavior), this is another context where it might be the case.

I still don't get your initial issue and what would be the difference with your minimal code boilerplate. The scaffolded module_ibc.go is normally quite generic and doesn't create additional conditions.

@fadeev
Copy link
Contributor

fadeev commented Aug 8, 2022

@lubtd created an issue #2712

Just proposing to remove (or modify) two checks in OnChanOpenInit to make it compatible with the way k.icaControllerKeeper.RegisterInterchainAccount() works by default.

Again, not a big deal, just something I've noticed.

@aljo242
Copy link
Contributor Author

aljo242 commented Aug 8, 2022

Since we've added #2712, I think we can start reviews for this and address the issue at a later time. wdyt?

@tbruyelle
Copy link
Contributor

Is it feasible to add an integration test with ICA ?

@aljo242
Copy link
Contributor Author

aljo242 commented Aug 9, 2022

Is it feasible to add an integration test with ICA ?

It seems like that's a bit out of the scope of our current integration tests. For example, we don't have a test for IBC transfers between chains either.

@fadeev
Copy link
Contributor

fadeev commented Aug 10, 2022

wrt testing I wonder if https://github.com/strangelove-ventures/ibctest can be used?

@tbruyelle
Copy link
Contributor

Does ICA necessarily require 2 chains ? I though you could use ICA with a single chain, like for instance giving the permission to an other account for a particular access to your account (part of your balance, compounding...). Maybe this part is not implemented though.

@fadeev
Copy link
Contributor

fadeev commented Aug 10, 2022

The main purpose of ICAs is to let an account on chain A act on behalf of an account on chain B, so it's inter-chain by design. Within a single chain you might be thinking of authz:

https://docs.cosmos.network/v0.46/modules/auth/

@tbruyelle
Copy link
Contributor

The main purpose of ICAs is to let an account on chain A act on behalf of an account on chain B, so it's inter-chain by design. Within a single chain you might be thinking of authz:

https://docs.cosmos.network/v0.46/modules/auth/

oh yes I mixed up the two 🙇

@aljo242 aljo242 merged commit d1a6819 into feat/sdk-ibc-upgrade Aug 10, 2022
@aljo242 aljo242 deleted the feat/interchain-accounts branch August 10, 2022 15:32
aljo242 pushed a commit that referenced this pull request Aug 17, 2022
* docs(changelog): add unreleased section

* feat!: Cosmos SDK v0.46.0 (#2675)

* update go mod

* update ibc path

* fix merge errors

* add temp client mock

* fix: deps (#2676)

* revert packages to old ibc-go

* fix remaining ibc paths

* fix template go.sum

* panic keyring errors

* add mockery generate instructions

* regenerate mocks

Co-authored-by: İlker G. Öztürk <[email protected]>

* fix merge

* update spn

* upgrade spn

* remove ibc-go fork

* template updates

* fix ibc and oracle templates

* update templates

* remaining tempalte updates

* fix template

* fix faucet test

* use beta ibc release

* update deps in template

* use ibcmodule idiom (#2692)

* Update ignite/templates/module/create/ibc/x/{{moduleName}}/module_ibc.go.plush

Co-authored-by: Lucas Btd <[email protected]>

* fix(`pkg/cosmosaccount`): register cryptocodec interfaces (#2702)

* register crypto codec interfaces

* improve error messages

* fix(template): removed unused methods and fix comments (#2708)

* fix(`cosmosclient`): use protobuf Any for TxMsgData  (#2714)

* fix comment

* use proto Any

* Update ignite/pkg/cosmosclient/cosmosclient.go

Co-authored-by: Lucas Btd <[email protected]>

Co-authored-by: Lucas Btd <[email protected]>

* chore(0.46): upgrade spn version (#2730)

* feat(`app`): add interchain accounts for `v0.46.0` (#2703)

* update template for ica

* Update ignite/templates/app/stargate/app/app.go.plush

Co-authored-by: Lucas Btd <[email protected]>

Co-authored-by: Lucas Btd <[email protected]>

* fix: change relayer call to use secp256k1 private keys in call (#2729)

This chage uses secp256k1 private keys instead of ASCII armored ones as
gRPC arguments when calling the TS relayer.

* docs: update tutorials (#2737)

- Change `ibc-go` import to use "v5"
- Add package missing definition to code examples that can be copy/pasted
- Change file references to paths, for consistency with other tutorials
- Fix interchange tutorial to use ports that don't overlap
- Remove unused imports
- Fix documentation issues

* feat: upgrade `ts-relayer` dependencies (#2722)

* chore: upgrade `@confio/relayer` to the latest version 0.5.1
* chore: update `@cosmjs` to version 0.28.9
* chore: remove `@cosmjs/launchpad` from dependencies
* chore: add new dependency `@cosmjs/encoding` for relayer
* chore: add `sinon` dependency required to build the relayer
* fix: remove "gasLimit" option from relayer
* fix: update `@cosmjs` to version 0.28.11

* fix(cosmosclient): fix account prefix config (#2743)

* fix(cosmosclient): account prefix config not correct when broadcasting a tx from a newly created default account

* add issue

Co-authored-by: Alex Johnson <[email protected]>
Co-authored-by: Lucas Btd <[email protected]>
Co-authored-by: Denis Fadeev <[email protected]>
Co-authored-by: Jerónimo Albi <[email protected]>
Jchicode pushed a commit to Jchicode/cli that referenced this pull request Aug 9, 2023
* docs(changelog): add unreleased section

* feat!: Cosmos SDK v0.46.0 (ignite#2675)

* update go mod

* update ibc path

* fix merge errors

* add temp client mock

* fix: deps (ignite#2676)

* revert packages to old ibc-go

* fix remaining ibc paths

* fix template go.sum

* panic keyring errors

* add mockery generate instructions

* regenerate mocks

Co-authored-by: İlker G. Öztürk <[email protected]>

* fix merge

* update spn

* upgrade spn

* remove ibc-go fork

* template updates

* fix ibc and oracle templates

* update templates

* remaining tempalte updates

* fix template

* fix faucet test

* use beta ibc release

* update deps in template

* use ibcmodule idiom (ignite#2692)

* Update ignite/templates/module/create/ibc/x/{{moduleName}}/module_ibc.go.plush

Co-authored-by: Lucas Btd <[email protected]>

* fix(`pkg/cosmosaccount`): register cryptocodec interfaces (ignite#2702)

* register crypto codec interfaces

* improve error messages

* fix(template): removed unused methods and fix comments (ignite#2708)

* fix(`cosmosclient`): use protobuf Any for TxMsgData  (ignite#2714)

* fix comment

* use proto Any

* Update ignite/pkg/cosmosclient/cosmosclient.go

Co-authored-by: Lucas Btd <[email protected]>

Co-authored-by: Lucas Btd <[email protected]>

* chore(0.46): upgrade spn version (ignite#2730)

* feat(`app`): add interchain accounts for `v0.46.0` (ignite#2703)

* update template for ica

* Update ignite/templates/app/stargate/app/app.go.plush

Co-authored-by: Lucas Btd <[email protected]>

Co-authored-by: Lucas Btd <[email protected]>

* fix: change relayer call to use secp256k1 private keys in call (ignite#2729)

This chage uses secp256k1 private keys instead of ASCII armored ones as
gRPC arguments when calling the TS relayer.

* docs: update tutorials (ignite#2737)

- Change `ibc-go` import to use "v5"
- Add package missing definition to code examples that can be copy/pasted
- Change file references to paths, for consistency with other tutorials
- Fix interchange tutorial to use ports that don't overlap
- Remove unused imports
- Fix documentation issues

* feat: upgrade `ts-relayer` dependencies (ignite#2722)

* chore: upgrade `@confio/relayer` to the latest version 0.5.1
* chore: update `@cosmjs` to version 0.28.9
* chore: remove `@cosmjs/launchpad` from dependencies
* chore: add new dependency `@cosmjs/encoding` for relayer
* chore: add `sinon` dependency required to build the relayer
* fix: remove "gasLimit" option from relayer
* fix: update `@cosmjs` to version 0.28.11

* fix(cosmosclient): fix account prefix config (ignite#2743)

* fix(cosmosclient): account prefix config not correct when broadcasting a tx from a newly created default account

* add issue

Co-authored-by: Alex Johnson <[email protected]>
Co-authored-by: Lucas Btd <[email protected]>
Co-authored-by: Denis Fadeev <[email protected]>
Co-authored-by: Jerónimo Albi <[email protected]>
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.

Adding interchain account module in default template
4 participants