Skip to content
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

Implement bottom up path validation #345

Closed
colin-axner opened this issue Jan 5, 2021 · 4 comments · Fixed by #398
Closed

Implement bottom up path validation #345

colin-axner opened this issue Jan 5, 2021 · 4 comments · Fixed by #398
Labels
T: ux TYPE: Issue or Pull Request related to developer experience

Comments

@colin-axner
Copy link
Contributor

The current code does little path validation since the required identifiers recently changed in #334

This should be implemented as @AdityaSripal specifies in this comment

@colin-axner
Copy link
Contributor Author

colin-axner commented Jan 20, 2021

tagging for akash

This is very useful for helping spot invalid config files which would likely lead to very confusing errors from the relayer. This should also handle cases where the connection identifier defined doesn't have the specified parameters (the client ID doesn't match with that for the defined connection ID)

cc @gosuri @akhilkumarpilli @anilcse @boz

@akhilkumarpilli
Copy link
Contributor

tagging for akash

This is very useful for helping spot invalid config files which would likely lead to very confusing errors from the relayer. This should also handle cases where the connection identifier defined doesn't have the specified parameters (the client ID doesn't match with that for the defined connection ID)

cc @gosuri @akhilkumarpilli @anilcse @boz

We are looking on this.

@akhilkumarpilli
Copy link
Contributor

@colin-axner, From where do we need to check existing connections or channels, from config or querying from chain?

@colin-axner
Copy link
Contributor Author

If the configuration sets a client/connection/channel, the code needs to ensure that the set identifiers makes sense and that they exist.

If a configuration sets a channel identifier, but not a client identifier, this is wrong, as per bottom up validation. Channels must have an associated client so therefore the config should ensure that client identifier is set.

If a configuration sets a connection ID, but that connection does not exist on chain, we should return an error

These are specific examples, but that's the general idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: ux TYPE: Issue or Pull Request related to developer experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants