-
Notifications
You must be signed in to change notification settings - Fork 586
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: ics27 middleware callback routing #2157
Conversation
channelID, err := k.registerInterchainAccount(ctx, connectionID, owner, version) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
portID, err := icatypes.NewControllerPortID(owner) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
k.SetMiddlewareEnabled(ctx, portID, channelID) |
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.
Thinking about change the signature of the private func registerInterchainAccount
and having this func and the msg server func generate the port ID.
Thoughts?
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 don't have a preference. Whatever you think is best
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.
Thanks for picking this up and doing it so fast ❤️ , we will need to export this state in genesis and update the simulation directory in followup prs
modules/apps/27-interchain-accounts/controller/keeper/keeper.go
Outdated
Show resolved
Hide resolved
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.
🤝
Am I correct in saying we don't need to do anything with SendTx
? Whether or not middleware is enabled is dependent entirely on the use of RegisterInterchainAccount
as the entry point?
…go into damian/2145-ics27-cb-routing
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
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.
* [WIP] add middleware enabled flags and conditional logic * adapting private registerInterchainAccount func to accept portID in favour of owner * updating tests * cleaning up tests * adding changelog * updating tests: adding cbs with unreachable error returns for safety * Update modules/apps/27-interchain-accounts/controller/keeper/keeper.go Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> (cherry picked from commit dda9f98) # Conflicts: # CHANGELOG.md # modules/apps/27-interchain-accounts/controller/ibc_middleware.go
* chore: ics27 middleware callback routing (#2157) * [WIP] add middleware enabled flags and conditional logic * adapting private registerInterchainAccount func to accept portID in favour of owner * updating tests * cleaning up tests * adding changelog * updating tests: adding cbs with unreachable error returns for safety * Update modules/apps/27-interchain-accounts/controller/keeper/keeper.go Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> (cherry picked from commit dda9f98) # Conflicts: # CHANGELOG.md # modules/apps/27-interchain-accounts/controller/ibc_middleware.go * resolvning conflicts Co-authored-by: Damian Nolan <damiannolan@gmail.com>
Description
IsMiddlewareEnabled
keeper functions, key prefix and functions.SetMiddlewareEnabled
when ICS27 account is registered via the legacy go API -RegisterInterchainAccount
Msg
service do not invoke the underlying application callbackscloses: #2145
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