-
Notifications
You must be signed in to change notification settings - Fork 110
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
func (vm *VM) IBCPacketReceive consistency #398
Comments
The other (maybe simpler) option is to always return the inner result to wasmd |
The error handling in wasmd is going to be modified in CosmWasm/wasmd#1220 to handle |
Right. Then we should always return the result for the other APIs at the same level for consistency. wasmd can then handle the cases separately or just turn the error result in an error. |
For all other IBC methods we do not have 2 different error scenarios with different db transaction behaviour. IMHO we should accept that IBCPacketReceive is different and not make everything equal. |
Analogue to to the other IBC functions in
lib.go
,IBCPacketReceive
should return anIBCReceiveResponse
instead ofIBCReceiveResult
as the first return value. This basically reverts c300106.Currently wasmd requires special error handling to handle both error types: https://github.com/CosmWasm/wasmd/blob/c7670fae4e6ca24d7fd6bfa6768f166b36976432/x/wasm/keeper/relay.go#L135-L137
A more straight forward way to do this adding this back to wasmvm:
Now in order to allow wasmd to get full access to the error returned by the contract, we can use a dedicated error type for that case.
The text was updated successfully, but these errors were encountered: