-
Notifications
You must be signed in to change notification settings - Fork 626
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
Propose changes on ica host and ica controller #1238
Comments
I know this is a bold proposal and this might be dumb since you guys must have a reason for those choice of design for ica that I haven't understood yet, so I'd love to hear it from you guys. |
I think trying to split off the controller module into it's own module will cause a lot of unforeseen issues. Particularly around duplicate registration as the SDK assumes only one unique module (I'm guessing the protobuf generation would cause a lot of issues) Regardless, this is a hefty change to be made. It requires migrating existing state into a new SDK module. What is the exact issue with the current structure? It should be possible to use only the host or the controller module when desired. The |
Sorry for the late response
U mean the module registration? . Yes I agree with you that moving it will leaves us a lot of works to do.
So in my opinion, the exact issues with the current structure is :
|
On second thought about this issue, I think we don't need to move |
Hi @catShaark. I think you are right that it should be possible for more that one authentication module to be able to use the ICA controller functionality. Just thinking out loud here... Would it be possible to enable that if it was possible to instantiate multiple And do you mind to elaborate a bit more why we would need to remove the |
Hi @crodriguezvega, I just read the code again and I think you're right that it's possible for more than one authentication module to use the ICA controller functionality with the current ICA logic. Back then when I made this issue, I haven't thought it through 😮💨 . Tho, I think we don't need to create many |
I considered removing the That's my reasoning. Any how, I'm not so against the |
Hi @catShaark. Sorry for not replying earlier, but, as you may have already seen, we are going to remove the validation of the controller prefix on the host chain. Thanks a lot for suggesting this! I will close this issue for now and we will track the change on #2580. |
…s#1238) Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.16.0 to 1.17.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/spf13/viper/releases">github.com/spf13/viper's releases</a>.</em></p> <blockquote> <h2>v1.17.0</h2> <h2>Major changes</h2> <p>Highlighting some of the changes for better visibility.</p> <p>Please share your feedback in the Discussion forum. Thanks! ❤️</p> <h3>Minimum Go version: 1.19</h3> <p>Viper now requires Go 1.19</p> <p>This change ensures we can stay up to date with modern practices and dependencies.</p> <h3><code>log/slog</code> support <strong>[BREAKING]</strong></h3> <p>Viper <a href="https://github.com/spf13/viper/releases/tag/v1.11.0">v1.11.0</a> added an experimental <code>Logger</code> interface to allow custom implementations (besides <a href="https://github.com/spf13/jwalterweatherman">jwalterweatherman</a>).</p> <p>In addition, it also exposed an experimental <code>WithLogger</code> function allowing to set a custom logger.</p> <p>This release deprecates that interface in favor of <a href="https://pkg.go.dev/log/slog">log/slog</a> released in Go 1.21.</p> <blockquote> <p>[!WARNING] <code>WithLogger</code> accepts an <a href="https://pkg.go.dev/log/slog#Logger">*slog.Logger</a> from now on.</p> </blockquote> <p>To preserve backwards compatibility with older Go versions, prior to Go 1.21 Viper accepts a <a href="https://pkg.go.dev/golang.org/x/exp/slog#Logger">*golang.org/x/exp/slog.Logger</a>.</p> <p>The experimental flag is removed.</p> <h3>New finder implementation <strong>[BREAKING]</strong></h3> <p>As of this release, Viper uses a new library to look for files, called <a href="https://github.com/sagikazarmark/locafero">locafero</a>.</p> <p>The new library is better covered by tests and has been built from scratch as a general purpose file finder library.</p> <p>The implementation is experimental and is hidden behind a <code>finder</code> build tag.</p> <blockquote> <p>[!WARNING] The <code>io/fs</code> based implementation (that used to be hidden behind a <code>finder</code> build tag) has been removed.</p> </blockquote> <h2>What's Changed</h2> <h3>Exciting New Features 🎉</h3> <ul> <li>Add NATS support by <a href="https://github.com/hooksie1"><code>@hooksie1</code></a> in <a href="https://redirect.github.com/spf13/viper/pull/1590">spf13/viper#1590</a></li> <li>Add slog support by <a href="https://github.com/sagikazarmark"><code>@sagikazarmark</code></a> in <a href="https://redirect.github.com/spf13/viper/pull/1627">spf13/viper#1627</a></li> </ul> <h3>Enhancements 🚀</h3> <ul> <li>chore: add local development environment using nix by <a href="https://github.com/sagikazarmark"><code>@sagikazarmark</code></a> in <a href="https://redirect.github.com/spf13/viper/pull/1572">spf13/viper#1572</a></li> <li>feat: add func GetEnvPrefix by <a href="https://github.com/baruchiro"><code>@baruchiro</code></a> in <a href="https://redirect.github.com/spf13/viper/pull/1565">spf13/viper#1565</a></li> <li>Improve dev env by <a href="https://github.com/sagikazarmark"><code>@sagikazarmark</code></a> in <a href="https://redirect.github.com/spf13/viper/pull/1575">spf13/viper#1575</a></li> <li>fix: code optimization by <a href="https://github.com/testwill"><code>@testwill</code></a> in <a href="https://redirect.github.com/spf13/viper/pull/1557">spf13/viper#1557</a></li> <li>test: remove not needed testutil.Setenv by <a href="https://github.com/alexandear"><code>@alexandear</code></a> in <a href="https://redirect.github.com/spf13/viper/pull/1610">spf13/viper#1610</a></li> <li>new finder library based on afero by <a href="https://github.com/sagikazarmark"><code>@sagikazarmark</code></a> in <a href="https://redirect.github.com/spf13/viper/pull/1625">spf13/viper#1625</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/spf13/viper/commit/f62f86a84b8395051efe0e490a29f3f89830a3ed"><code>f62f86a</code></a> refactor: make use of <code>strings.Cut</code></li> <li><a href="https://github.com/spf13/viper/commit/94632fa21e01819de78bf0c931eb3cbdd1d426b4"><code>94632fa</code></a> chore: Use pip3 explicitly to install yamllint</li> <li><a href="https://github.com/spf13/viper/commit/3f6cadcbeb9f193f8483c9edf6c6114ca7a20056"><code>3f6cadc</code></a> chore: Fix copy-paste error for yamllint target</li> <li><a href="https://github.com/spf13/viper/commit/287507c0b5a13320f9b616e458ab7f3aadab1603"><code>287507c</code></a> docs: add set subset KV example</li> <li><a href="https://github.com/spf13/viper/commit/f1cb2262bbda4cc549e617f41ba963409f23871c"><code>f1cb226</code></a> chore(deps): update crypt</li> <li><a href="https://github.com/spf13/viper/commit/c292b55050aadcf08f9094033eb14d241f5002c5"><code>c292b55</code></a> test: refactor asserts</li> <li><a href="https://github.com/spf13/viper/commit/3d006fe361ca4ea1ec973e39ce40f98aa3d2f2c9"><code>3d006fe</code></a> refactor: replace interface{} with any</li> <li><a href="https://github.com/spf13/viper/commit/8a6dc5d43ce8b58288ec5b1db9ce83ab32580549"><code>8a6dc5d</code></a> build(deps): bump github/codeql-action from 2.21.8 to 2.21.9</li> <li><a href="https://github.com/spf13/viper/commit/96c5c0083fb4a0e42282fbf04b626ca6792d8885"><code>96c5c00</code></a> chore: remove deprecated build tags</li> <li><a href="https://github.com/spf13/viper/commit/44911d2cacff57448929c13f7346a1ea6ab13591"><code>44911d2</code></a> build(deps): bump github/codeql-action from 2.21.7 to 2.21.8</li> <li>Additional commits viewable in <a href="https://github.com/spf13/viper/compare/v1.16.0...v1.17.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/spf13/viper&package-manager=go_modules&previous-version=1.16.0&new-version=1.17.0)](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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Problem
So for now
ica host
module can only connectica controller
module . I know this is intended for some reason, but I think that constrain limit custom logic for other ibc module, such aswasmd
. In order to use ica,wasmd
keeper must has ica controller keeper in it so thatwasmd
can callRegisterInterchainAccount
, we also have to putwasmd IBCHandler
intoica controller middleware
. Those changes causes many inconvenient aswasmd
can't do ica directly on their ibc port id.What if there're many
ibc modules
who want to useica
. Will there be some sort of anothermiddleware
that packs all thoseibc module
'sIBCHandler
into one and then also comes a router to route eachica packet ack
to the correctIBCHandler
. I think this is too many step.Why don't we make it like the transfer module so that the
counterparty module
or thecounterparty port id
can be whatever it is. As long as the handshake conforms to the protocol defined by host ( ordered channel, metadata defined in version... ), I don't see any security issues AFAIK. This way, we get rid of many complication cause by using a middleware and open for many cool custom ibc logic.Proposal
My suggestion is that we remove the validation of
counterpartyPortID
inica host handshake
. By doing so, we basically remove the hard tie betweenica controller
andica host
. Because of that,ica controller
should be moved fromica
to another module. I propose we combineica controller
withinter tx
to make a new module with complete logic ( with msg server and tx cli ) for an ica application.The text was updated successfully, but these errors were encountered: