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

ValidationContext::compute_packet_commitment should be a standalone exported function #470

Closed
plafer opened this issue Feb 24, 2023 · 2 comments · Fixed by #492
Closed
Assignees
Labels
A: breaking Admin: breaking change that may impact operators A: good-first-issue Admin: good for newcomers
Milestone

Comments

@plafer
Copy link
Contributor

plafer commented Feb 24, 2023

There's only one correct way to compute a commitment. This would also make it available for implementors e.g. of TokenTransferValidationContext.

@plafer plafer added the A: good-first-issue Admin: good for newcomers label Feb 24, 2023
@Farhad-Shabani
Copy link
Member

Farhad-Shabani commented Feb 28, 2023

When you say "one correct way", do you mean it's required by the protocol? Wouldn't be a different implementation for a non-tendermint chain?
If that's the case, I think it would make sense to apply this to the ack_commitment() method as well.

@Farhad-Shabani Farhad-Shabani added the A: breaking Admin: breaking change that may impact operators label Feb 28, 2023
@Farhad-Shabani Farhad-Shabani moved this to 📥 To Do in ibc-rs Feb 28, 2023
@plafer
Copy link
Contributor Author

plafer commented Mar 1, 2023

When you say "one correct way", do you mean it's required by the protocol?

Yes; if a chain computes it differently from any other chain, the Merkle proof for checking that the packet commitment is there will fail. This is independent from the host consensus algorithm.

If that's the case, I think it would make sense to apply this to the ack_commitment() method as well.

Right, we should also export it as standalone. Related: #375

@Farhad-Shabani Farhad-Shabani self-assigned this Mar 2, 2023
@Farhad-Shabani Farhad-Shabani moved this from 📥 To Do to 🏗️ In Progress in ibc-rs Mar 2, 2023
@github-project-automation github-project-automation bot moved this from 🏗️ In Progress to ✅ Done in ibc-rs Mar 6, 2023
@Farhad-Shabani Farhad-Shabani added this to the v0.32.0 milestone Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: breaking Admin: breaking change that may impact operators A: good-first-issue Admin: good for newcomers
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants