-
Notifications
You must be signed in to change notification settings - Fork 397
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
ICS4: question on send packet with channel not opened #536
Comments
Thanks for bringing this up @ancazamfir. I think this area of design was overlooked in the last minute identifier changes. I believe it is safe for us to disable the identifier check since the destination port should only be used in receive at which point the channel must be open. We might need to add more packet data checks in receive since I think we rely on the checks in send. At the very least this is not problematic right now, it just prevents optimistic sends (which seems a little unnecessary to be for ICS 20) cc @cwgoes |
Yes, was trying to test optimistic channel opening, optimistic send, channel closing. Optimistic sends handling in the relayer needs a bit of a special treatment and would be happy to leave it for later if we confirm this will not be supported in Stargate. |
Thanks @ancazamfir - good catch - this should be changed, but it won't happen for Stargate, we aren't going to delay for it. |
(this is technically breaking, so it can't be in 1.0.1) |
I'm going to move this to the spec repo, it needs to be dealt with there first. |
We have used a partial version of this in wasmd. Basically, in the |
cc @AdityaSripal has this been fixed since? |
I happened to revisit this issue. I think:
|
The spec comment is clearly wrong and should change. If optimistic sends are desired, the |
I opened #865 to update the comment. If it gets merged I propose we close this issue and open a different one to discuss how to properly support optimistic sends. |
Summary
The send packet handler checks if a channel is not closed (*), however I believe it will only be successful if the channel is in open state. Trying to send a fungible token transfer packet over a channel in init state returns this error:
With the latest specs/ code the destination channel identifier is only known once in open state.
(*) same in the ics02 pseudocode
function sendPacket(packet: Packet) {..
but there is also this comment before "Checks that the channel & connection are open to send packets".For Admin Use
The text was updated successfully, but these errors were encountered: