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!: use antehandlers for wasm calls to core #2045

Merged
merged 21 commits into from
Dec 12, 2023

Conversation

cgorenflo
Copy link
Contributor

@cgorenflo cgorenflo commented Nov 30, 2023

@cgorenflo cgorenflo requested a review from a team as a code owner November 30, 2023 17:24
@xyuanatbgraph
Copy link
Contributor

will user-made cosmwasm contracts deployed on axelar eventually have access to evmkeeper and axelarkeeper routes? or is only gatewayAddress allow to send messages at all?

if yes, this might take care of my other PR

@cgorenflo
Copy link
Contributor Author

will user-made cosmwasm contracts deployed on axelar eventually have access to evmkeeper and axelarkeeper routes? or is only gatewayAddress allow to send messages at all?

if yes, this might take care of my other PR

yes, if a route is only available through the core (evm, axelarnet) cosmos sdk modules, the cosmwasm router contract is going to reroute messages there

@cgorenflo cgorenflo marked this pull request as draft November 30, 2023 23:05
@cgorenflo cgorenflo marked this pull request as ready for review November 30, 2023 23:18
x/nexus/exported/types.go Outdated Show resolved Hide resolved
Base automatically changed from move-ante-handlers to main December 1, 2023 23:30
# Conflicts:
#	app/app.go
#	app/keepers.go
#	x/ante/ante.go
#	x/ante/log.go
#	x/ante/undelegate.go
@xyuanatbgraph
Copy link
Contributor

xyuanatbgraph commented Dec 4, 2023

will user-made cosmwasm contracts deployed on axelar eventually have access to evmkeeper and axelarkeeper routes? or is only gatewayAddress allow to send messages at all?
if yes, this might take care of my other PR

yes, if a route is only available through the core (evm, axelarnet) cosmos sdk modules, the cosmwasm router contract is going to reroute messages there

i see, thanks. does this require the evm axelarnet modules to migrate to not legacy? i think so, after looking at how x/wasm implementation

i checked and this might just be types.RegisterMsgServiceServer(cfg.MsgServer(), keeper.NewMsgServerImpl(...)) in module.go. if this make sense would it help if i make pr to add modules to grpc msg server in this way?

x/nexus/exported/types.go Show resolved Hide resolved
app/wasm.go Show resolved Hide resolved
app/app.go Outdated Show resolved Hide resolved
app/app.go Show resolved Hide resolved
x/ante/ante.go Show resolved Hide resolved
@cgorenflo
Copy link
Contributor Author

will user-made cosmwasm contracts deployed on axelar eventually have access to evmkeeper and axelarkeeper routes? or is only gatewayAddress allow to send messages at all?
if yes, this might take care of my other PR

yes, if a route is only available through the core (evm, axelarnet) cosmos sdk modules, the cosmwasm router contract is going to reroute messages there

i see, thanks. does this require the evm axelarnet modules to migrate to not legacy? i think so, after looking at how x/wasm implementation

i checked and this might just be types.RegisterMsgServiceServer(cfg.MsgServer(), keeper.NewMsgServerImpl(...)) in module.go. if this make sense would it help if i make pr to add modules to grpc msg server in this way?

No work required. The necessary changes have already been merged into main. The nexus/keeper/msg_dispatcher.go handles calls from wasm and routes them to the nexus

@xyuanatbgraph
Copy link
Contributor

xyuanatbgraph commented Dec 7, 2023

will user-made cosmwasm contracts deployed on axelar eventually have access to evmkeeper and axelarkeeper routes? or is only gatewayAddress allow to send messages at all?
if yes, this might take care of my other PR

yes, if a route is only available through the core (evm, axelarnet) cosmos sdk modules, the cosmwasm router contract is going to reroute messages there

i see, thanks. does this require the evm axelarnet modules to migrate to not legacy? i think so, after looking at how x/wasm implementation
i checked and this might just be types.RegisterMsgServiceServer(cfg.MsgServer(), keeper.NewMsgServerImpl(...)) in module.go. if this make sense would it help if i make pr to add modules to grpc msg server in this way?

No work required. The necessary changes have already been merged into main. The nexus/keeper/msg_dispatcher.go handles calls from wasm and routes them to the nexus

Thank you. But I have one confusion. I checked this and it looks like it is on only for GeneralMessages. What about sdk.Msg but from cosmwasm contract to x/evm or x/axelarnet module? It seems nexus dispatchMessage doesnt reroute there. This due to all Custom msgs encoded to "exported.WasmMessage"

@cgorenflo
Copy link
Contributor Author

will user-made cosmwasm contracts deployed on axelar eventually have access to evmkeeper and axelarkeeper routes? or is only gatewayAddress allow to send messages at all?
if yes, this might take care of my other PR

yes, if a route is only available through the core (evm, axelarnet) cosmos sdk modules, the cosmwasm router contract is going to reroute messages there

i see, thanks. does this require the evm axelarnet modules to migrate to not legacy? i think so, after looking at how x/wasm implementation
i checked and this might just be types.RegisterMsgServiceServer(cfg.MsgServer(), keeper.NewMsgServerImpl(...)) in module.go. if this make sense would it help if i make pr to add modules to grpc msg server in this way?

No work required. The necessary changes have already been merged into main. The nexus/keeper/msg_dispatcher.go handles calls from wasm and routes them to the nexus

Thank you. But I have one confusion. I checked this and it looks like it is on only for GeneralMessages. What about sdk.Msg but from cosmwasm contract to x/evm or x/axelarnet module? It seems nexus dispatchMessage doesnt reroute there. This due to all Custom msgs encoded to "exported.WasmMessage"

I'm not sure what you mean by that. sdk.Msg is cosmos's basic message interface. You can only route expected messages to any given module (see handlers and msg servers in each module).
The cosmwasm routing is only going to support general message passing. Token transfers will work through the Interchain Token Standard (https://docs.axelar.dev/dev/send-tokens/interchain-tokens). This will be supported for messages from cosmwasm to any existing chain registered in the x/axelarnet and x/evm modules.

app/wasm.go Outdated Show resolved Hide resolved
x/ante/ante.go Show resolved Hide resolved
@xyuanatbgraph
Copy link
Contributor

Hi is it possible allow stargate? We meant to use these modules to script axelar interactions. I think security is same because only using Msg types already in app.

app/wasm.go Show resolved Hide resolved
x/nexus/exported/types.go Outdated Show resolved Hide resolved
@cgorenflo
Copy link
Contributor Author

Hi is it possible allow stargate? We meant to use these modules to script axelar interactions. I think security is same because only using Msg types already in app.

To guarantee safety we are going to roll out cosmwasm support with stargate and direct IBC calls (without going through axelar routing) blocked. We're going to revisit this once we are absolutely sure it can't be used to cause harm to the protocol

@xyuanatbgraph
Copy link
Contributor

Hi is it possible allow stargate? We meant to use these modules to script axelar interactions. I think security is same because only using Msg types already in app.

To guarantee safety we are going to roll out cosmwasm support with stargate and direct IBC calls (without going through axelar routing) blocked. We're going to revisit this once we are absolutely sure it can't be used to cause harm to the protocol

It makes sense, thanks. Do you have estimate on when you think that happens? e.g. 1+, 3+, 6+ months?

@cgorenflo
Copy link
Contributor Author

Hi is it possible allow stargate? We meant to use these modules to script axelar interactions. I think security is same because only using Msg types already in app.

To guarantee safety we are going to roll out cosmwasm support with stargate and direct IBC calls (without going through axelar routing) blocked. We're going to revisit this once we are absolutely sure it can't be used to cause harm to the protocol

It makes sense, thanks. Do you have estimate on when you think that happens? e.g. 1+, 3+, 6+ months?

Not before Q2

@cgorenflo cgorenflo merged commit 18c0eeb into main Dec 12, 2023
7 checks passed
@cgorenflo cgorenflo deleted the extract-message-ante-handlers branch December 12, 2023 21:28
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.

5 participants