-
Notifications
You must be signed in to change notification settings - Fork 587
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
chore: ctrl port connection id validation #454
Merged
damiannolan
merged 27 commits into
interchain-accounts
from
damian/444-ctrl-port-connection-id-validation
Oct 7, 2021
Merged
Changes from 13 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
755ce69
adding pipe char | to identifier regex
damiannolan a8128ce
updating GeneratePortID to use pipe delimiter in favour of dash, Pars…
damiannolan bce3407
adding CounterpartyHops method to expected channel keeper interface
damiannolan cd8ac79
updating tests to satisy delimiter updates
damiannolan 45d8f8d
adding connection seq validation of ctrl port id and updating tests
damiannolan 1ec19f1
cleanup
damiannolan 5d01500
adding defensive check for ParseAddressFromVersion
damiannolan 0c56d06
adding conn sequence parsing funcs to pkg types
damiannolan d3039bb
moving conn sequence validation to reusable func
damiannolan 6761d2d
updating error msgs, adding tests for conn seq parsers
damiannolan e22f3ea
adding expected sequence to error msgs
damiannolan 09f741a
updating ParseCtrlConnSequence to ParseControllerConnSequence
damiannolan 6982141
fixing counterparty port error
damiannolan 88bc3c8
Update modules/apps/27-interchain-accounts/keeper/handshake.go
damiannolan 31536af
Update modules/apps/27-interchain-accounts/keeper/handshake.go
damiannolan d09703e
Update modules/apps/27-interchain-accounts/types/account.go
damiannolan ac87f9d
removing pipe from valid identifier regex
damiannolan b6925ab
adding error returns to parsing funcs, updating tests, error messages
damiannolan c21c153
separting imports in keys.go
damiannolan a8bab3a
Merge branch 'interchain-accounts' into damian/444-ctrl-port-connecti…
damiannolan 6cedcf1
updating handshake tests
damiannolan 59340ac
Update modules/apps/27-interchain-accounts/types/keys.go
damiannolan c84996f
renaming validation func, removing parenthesis in error msgs
damiannolan 495c864
renaming func validateControllerPort -> validateControllerPortParams
damiannolan f68d7ec
Merge branch 'interchain-accounts' into damian/444-ctrl-port-connecti…
damiannolan b4d1191
Merge branch 'interchain-accounts' into damian/444-ctrl-port-connecti…
damiannolan 9d4dfd7
Merge branch 'interchain-accounts' into damian/444-ctrl-port-connecti…
damiannolan 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
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
Oops, something went wrong.
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.
maybe the error message should say connection params? Otherwise maybe we should rename the function to
validateControllerPort
?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.
Sure thing! Any preference on this before I update?
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
validateControllerPort
makes the most sense to me. It will likely align closer with the ICS specThere 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.
Cool, I've updated to
validateControllerPort
. My only gripe with this, and perhaps its overly pedantic, is that we never actually pass the controller port to this function. We pass the self port ID to retrieve the channel which is obviously going to be different in theOnChainOpenInit
andOnChanOpenTry
callbacks.We could... 🤔
validateControllerPortParams
and leave the args the same.The only problem I see with opt 2 is that having two port ID args may be confusing(?), while opt 1 is a bit long winded...
Either way I'm happy to leave it as is now if you are 😄
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 vote for
validateControllerPortParams and leave the args the same