-
Notifications
You must be signed in to change notification settings - Fork 352
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
Handshake verification logic #1878
Handshake verification logic #1878
Conversation
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.
Looks good, neat work Sean!
@@ -1196,10 +1197,17 @@ fn check_destination_connection_state( | |||
|| existing_connection.counterparty().connection_id() | |||
== expected_connection.counterparty().connection_id(); | |||
|
|||
// TODO check versions and store prefix | |||
// https://github.com/informalsystems/ibc-rs/issues/1389 | |||
let good_version = existing_connection.versions() == expected_connection.versions(); |
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.
Not sure about this, it's more like existing_connection.versions()
is a subset of the expected_connection.versions()
. Also it's not clear that the versions of the expected_connection
are properly populated by caller here. Maybe it should get the versions on source and destination, and stuff the intersection in the expected_connection
.
This code will work until a second connection version is introduced. It's also the case that we don't have a gRPC endpoint to query connection versions supported by a chain, currently hardcoded. Unless a new gRPC is provided, we will need to put the chain supported versions in the config file (similar story as for store prefix which is not queryable but this one we put it in the config file)
* Add checks for version and prefix for expected connections. * Add some doc comments. * Add changelog file. * Add more doc comments. * Remove `to_vec` call. * Improve changelog entry.
Closes: #1389
Description
Adds checks for
ConnectionEnd::versions
andCounterparty::prefix
fields to thecheck_destination_connection_state
method.PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.