-
Notifications
You must be signed in to change notification settings - Fork 610
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
Amend timeoutPacket to allow timeouts on any channel state. #4367
Merged
DimitrisJim
merged 4 commits into
04-channel-upgrades
from
jim/4080-amend-timeout-packet
Aug 24, 2023
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f8fc836
Amend timeoutPacket to allow timeouts on any channel state.
DimitrisJim 81c9e56
Merge branch '04-channel-upgrades' into jim/4080-amend-timeout-packet
DimitrisJim 3c095fa
Merge branch '04-channel-upgrades' into jim/4080-amend-timeout-packet
damiannolan ae6ff22
Merge branch '04-channel-upgrades' into jim/4080-amend-timeout-packet
DimitrisJim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
couldn't we also just extend this to allow timeouts on
OPEN
andFLUSHING
channels?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.
that was my initial thought pre-discussion. This isn't spec'ed out in any way (i.e the check for
State != types.OPEN
also isn't there), so when we talked about it I remember us coming to the conclusion that it could be removed. Happy to wait for a review from @colin-axner when he gets backThere 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.
Why would you want to restrict when packets can be timed out?
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.
It should be possible to timeout a packet even after a channel closes
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.
My only thinking was that a closed channel maybe shouldn't be acted on, but its fair, don't see exactly why that would be an issue either.
If you're happy with removing this check, then let's go ahead and do it 👍
I do think restricting to open and flushing makes it very explicit tho, and removes any room for potentially odd side effects when in handshakes or in the case of a channel closed and reopened.
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.
In theory that makes sense, but in practice it is problematic. There's a potential state where chainA has a closed channel and chainB doesn't. Until someone calls ChanCloseConfirm, all timeouts are valid, but with a restriction, after calling close confirm, timeouts are no longer valid, but that's a very loose assumption and I don't think apps are built to handle channel closes like that
My preference would be to open an issue on the spec if there's a concern. I don't see why ibc-go should be opinionated in this matter
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.
There's also no check on TimeoutOnClose, so this restriction can be bypassed unless you added it there as well
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.
Sounds fair enough to me!
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 think the other point I'd make is that IBC only specifies optimistic sends as unsafe (potentially not recoverable). I think it's important to build the assumption that all other sends can be reverted regardless of what occurs