-
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
feat: adding chanUpgradeAck
handler to 04-channel
#3828
feat: adding chanUpgradeAck
handler to 04-channel
#3828
Conversation
false, | ||
}, | ||
{ | ||
"channel end version mismatch on crossing hellos", |
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.
spoke with @AdityaSripal about this yesterday, testing this case as a full integration with the testing lib is tricky as its a timing sensitive state we end up, which would require a historical proof being submitted for the second chain to transition to TRY.
I chose to override the channel state directly here in order to cover this case.
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.
Maybe we can open an issue to make the test case more robust? It might be nice to have a test which simulates this scenario as it would potentially occur
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 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.
Excellent! Only requested change is moving the version check below startFlushUpgradeHandshake
. Left many suggestions
false, | ||
}, | ||
{ | ||
"channel end version mismatch on crossing hellos", |
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.
Maybe we can open an issue to make the test case more robust? It might be nice to have a test which simulates this scenario as it would potentially occur
chanUpgradeAck
handler to 04-channelchanUpgradeAck
handler to 04-channel
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.
yay! Great work :)
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.
Thanks, @damiannolan!
return errorsmod.Wrapf(types.ErrInvalidFlushStatus, "expected one of [%s, %s], got %s", types.FLUSHING, types.FLUSHCOMPLETE, counterpartyFlushStatus) | ||
} | ||
|
||
connection, err := k.GetConnection(ctx, channel.ConnectionHops[0]) |
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.
Should we do this instead?
connection, err := k.GetConnection(ctx, channel.ConnectionHops[0]) | |
connection, err := k.connectionKeeper.GetConnection(ctx, channel.ConnectionHops[0]) |
I believe this is the way we retrieve the connection from the channel keeper in the rest of the 04-channel codebase. If I'm not mistaken, the GetConnection
function in channel keeper is only used in ICA, since it is not possible to access the connection keeper from there.
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.
seems like all of the channel upgradability code is currently using k.GetConnection()
, maybe we could address all together and choose one for consistency in a follow up PR.
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.
opened #3840 as I'd like to get this merged
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.
LGTM! I left a few small suggestions, not of which are blockers and I'd be happy with followups if you'd like to get this merged 💪
Description
Adding 04-channel handler for
ChanUpgradeAck
, msg server implementation PR will follow this.closes: #3741
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.Files changed
in the Github PR explorer.Codecov Report
in the comment section below once CI passes.