-
Notifications
You must be signed in to change notification settings - Fork 585
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
chore: adding assertion of channel capabilities migration #2140
Conversation
…cosmos/ibc-go into damian/ics27-chan-capability-migrations
Opening initially as draft. Happy path tests on this require #2033. |
modules/apps/27-interchain-accounts/controller/keeper/migrations.go
Outdated
Show resolved
Hide resolved
|
||
// AssertChannelCapabilityMigrations checks that all channel capabilities generated using the interchain accounts controller port prefix | ||
// are owned by the controller submodule and ibc. | ||
func (m Migrator) AssertChannelCapabilityMigrations(ctx sdk.Context) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm open to suggestions on improving the name of this method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the name
Codecov Report
@@ Coverage Diff @@
## main #2140 +/- ##
==========================================
- Coverage 79.48% 79.47% -0.02%
==========================================
Files 173 174 +1
Lines 12011 12029 +18
==========================================
+ Hits 9547 9560 +13
- Misses 2042 2045 +3
- Partials 422 424 +2
|
I believe we also need to call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work. Super clean! Could you add a changelog entry?
modules/apps/27-interchain-accounts/controller/keeper/migrations_test.go
Show resolved
Hide resolved
Makes sense to me. And if the chain removes the underlying app entirely, those middleware enabled checks won't be reached since the underlyingApp != nil check comes first |
* wip initial commit * draft migration completed * removing unnecessary storekey arg * additional cleanup * adding updates to migrations and tests additional assertions * updating and moving migrations code * adding additional checks to tests * cleaning up tests * cleaning up tests * updating inline doc comments, checking err return * using InitMemStore in favour of InitializeCapability, adjusting tests * adding assertion of channel capabilities migration * adapting migration code to use get/authenticate capability * adding changelog * updating tests * set middleware enabled for existing channels * assert middleware enabled in tests * updating changelog with middleware enabled flag (cherry picked from commit 8d56b94) # Conflicts: # CHANGELOG.md
…2140) (#2219) * chore: adding assertion of channel capabilities migration (#2140) * wip initial commit * draft migration completed * removing unnecessary storekey arg * additional cleanup * adding updates to migrations and tests additional assertions * updating and moving migrations code * adding additional checks to tests * cleaning up tests * cleaning up tests * updating inline doc comments, checking err return * using InitMemStore in favour of InitializeCapability, adjusting tests * adding assertion of channel capabilities migration * adapting migration code to use get/authenticate capability * adding changelog * updating tests * set middleware enabled for existing channels * assert middleware enabled in tests * updating changelog with middleware enabled flag (cherry picked from commit 8d56b94) # Conflicts: # CHANGELOG.md * resolving conflicts Co-authored-by: Damian Nolan <[email protected]>
Description
closes: #XXXX
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes