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

Add basic validation of client upgrade proposal contents #3106

Closed
3 tasks
damiannolan opened this issue Feb 3, 2023 · 4 comments
Closed
3 tasks

Add basic validation of client upgrade proposal contents #3106

damiannolan opened this issue Feb 3, 2023 · 4 comments
Labels
02-client 07-tendermint needs discussion Issues that need discussion before they can be worked on type: refactor Architecture, code or CI improvements that may or may not tackle technical debt.

Comments

@damiannolan
Copy link
Member

damiannolan commented Feb 3, 2023

Summary

We should consider adding an additional validation step of at minimum (chainID suffix, height revision number) before proceeding with client upgrade proposals.

For example, if a client upgrade proposal is submitted which modifies the chainID from testchain-1 to testchain-2, then it is required for the UpgradedClientState provided in the proposal contents to ensure the client state LatestHeight.RevisionNumber follows suit and increments from revision 1 to 2.

The issue arises when a misconfigured upgrade proposal is accepted and a relayer attempts to upgrade the client on the counterparty chain. This results in an error being returned from VerifyUpgradeAndUpdateState when attempting to call Validate on the new client state.

Adding an additional basic validation step to the proposal handler will allow this to be caught much earlier in the client upgrade process.

ref: informalsystems/hermes#3057


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@damiannolan damiannolan added needs discussion Issues that need discussion before they can be worked on 07-tendermint type: refactor Architecture, code or CI improvements that may or may not tackle technical debt. 02-client labels Feb 3, 2023
@adizere
Copy link

adizere commented Feb 4, 2023

Thank you Damian! This hygienic improvement would likely make diagnosing the problem on the relayer side easier also.

@phamminh0811
Copy link
Contributor

hi @adizere , can I handle this issue?

@crodriguezvega
Copy link
Contributor

hi @adizere , can I handle this issue?

Hi @phamminh0811. Thanks for volunteering! The issue is still labeled with needs discussion so we would like first to iron out some details before anyone starts working on it, so that we prevent re-work. We might have some discussion about it today, so hopefully by the end of the day we can signal that you can start working on it, if you want.

@crodriguezvega
Copy link
Contributor

@phamminh0811 We have decided to close this issue in favour of #1310. However, we can't be work on #1310 yet, since it needs #1282 first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
02-client 07-tendermint needs discussion Issues that need discussion before they can be worked on type: refactor Architecture, code or CI improvements that may or may not tackle technical debt.
Projects
Status: Done 🥳
Development

No branches or pull requests

4 participants