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

Update Interchain Account to use proto.Any instead of BaseAccount #1298

Open
3 tasks
fedekunze opened this issue Apr 26, 2022 · 2 comments
Open
3 tasks

Update Interchain Account to use proto.Any instead of BaseAccount #1298

fedekunze opened this issue Apr 26, 2022 · 2 comments
Labels
27-interchain-accounts needs discussion Issues that need discussion before they can be worked on type: feature New features, sub-features or integrations

Comments

@fedekunze
Copy link
Contributor

Summary

Change the Interchain account implementation to support other account types

Problem Definition

The interchain account implementation currently only supports cosmos BaseAccounts, preventing applications that use different account types (eg: smart contracts, vesting accounts, etc) to benefit from the use cases that Interchain Account provides.

https://github.com/cosmos/ibc-go/blob/main/proto/ibc/applications/interchain_accounts/v1/account.proto#L17

Proposal

Update the InterchainAccount protobuf message to use proto.Any to support the Account interface from the Cosmos SDK


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@crodriguezvega crodriguezvega added needs discussion Issues that need discussion before they can be worked on 27-interchain-accounts type: feature New features, sub-features or integrations labels Apr 26, 2022
@colin-axner
Copy link
Contributor

I'm in favor of the proposal. The actual implementation of it is not straight forward though.

Outside of migrating all existing accounts to proto.Any, we also need the controller side to indicate what type of account to create. Account registration occurs during the handshake. Currently the metadata for account creation is done via the channel version. ICS27 requires strict version creation on both sides otherwise it will return an error. Thus, the counterparty needs to support this change as well (it isn't a one sided upgrade). We would likely add a new field to the metadata negotiated. This would result in one account type per channel. This is fine for now, but taking into account future plans for ics27 - this also means when many accounts are supported for one channel, only one account type will be used on that channel. I think this could actually be beneficial (all smart contracts on one channel). It's possible when we upgrade ics27 to support multiple accounts on one channel, we add a new packet type for registering an account, so maybe we could support multiple account types in that case.

We could add a ics27-2 version which uses the extended metadata (ie metadata with the account type for the channel). I'm not sure the point of upgrading existing channels as the account has already been decided for that channel. Maybe for consistency we could upgrade older channels (allowing us to deprecate support for ics27-1 in the future). Both chains would need to upgrade to support the new version before a interchain account with a proto.Any for the account type could be created

@colin-axner
Copy link
Contributor

If we are adding an ics27-2 version, this should be discussed on the spec repo first

CosmosCar pushed a commit to caelus-labs/ibc-go that referenced this issue Nov 6, 2023
cosmos#1298)

Bumps
[github.com/celestiaorg/go-header](https://github.com/celestiaorg/go-header)
from 0.4.0 to 0.4.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/celestiaorg/go-header/releases">github.com/celestiaorg/go-header's
releases</a>.</em></p>
<blockquote>
<h2>v0.4.1</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(sync): Fix <code>total_synced</code> metric recording by <a
href="https://github.com/renaynay"><code>@​renaynay</code></a> in <a
href="https://redirect.github.com/celestiaorg/go-header/pull/124">celestiaorg/go-header#124</a></li>
<li>feat(p2p): metrics for Subscriber by <a
href="https://github.com/Wondertan"><code>@​Wondertan</code></a> in <a
href="https://redirect.github.com/celestiaorg/go-header/pull/119">celestiaorg/go-header#119</a></li>
<li>feat(p2p): metrics for Exchange by <a
href="https://github.com/Wondertan"><code>@​Wondertan</code></a> in <a
href="https://redirect.github.com/celestiaorg/go-header/pull/125">celestiaorg/go-header#125</a></li>
<li>feat(p2p): metrics for ExchangeServer by <a
href="https://github.com/Wondertan"><code>@​Wondertan</code></a> in <a
href="https://redirect.github.com/celestiaorg/go-header/pull/126">celestiaorg/go-header#126</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/celestiaorg/go-header/compare/v0.4.0...v0.4.1">https://github.com/celestiaorg/go-header/compare/v0.4.0...v0.4.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/celestiaorg/go-header/commit/a8ce731635c5b8863353567ce6ae5fef0591e767"><code>a8ce731</code></a>
feat(p2p): metrics for ExchangeServer (<a
href="https://redirect.github.com/celestiaorg/go-header/issues/126">#126</a>)</li>
<li><a
href="https://github.com/celestiaorg/go-header/commit/a4d3ca0ecdd47e889fea42fb6b1e7f15c74f2218"><code>a4d3ca0</code></a>
feat(p2p): metrics for Exchange (<a
href="https://redirect.github.com/celestiaorg/go-header/issues/125">#125</a>)</li>
<li><a
href="https://github.com/celestiaorg/go-header/commit/09c272dc8e9718e6d076eba780e6ef3df86eb540"><code>09c272d</code></a>
feat(p2p): metrics for Subscriber (<a
href="https://redirect.github.com/celestiaorg/go-header/issues/119">#119</a>)</li>
<li><a
href="https://github.com/celestiaorg/go-header/commit/cb63b3978f69f1644bca5e82ba4221fc97600134"><code>cb63b39</code></a>
Merge pull request <a
href="https://redirect.github.com/celestiaorg/go-header/issues/124">#124</a>
from renaynay/fix-total-synced</li>
<li><a
href="https://github.com/celestiaorg/go-header/commit/f13c92cd04e4a8fc17e0905ca5782310df272b70"><code>f13c92c</code></a>
fix(sync): Fix total_synced metric - add, do not override</li>
<li>See full diff in <a
href="https://github.com/celestiaorg/go-header/compare/v0.4.0...v0.4.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/celestiaorg/go-header&package-manager=go_modules&previous-version=0.4.0&new-version=0.4.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
27-interchain-accounts needs discussion Issues that need discussion before they can be worked on type: feature New features, sub-features or integrations
Projects
None yet
Development

No branches or pull requests

3 participants