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

ICS4: Sequence should be fastforwarded even outside crossing hello in UPGRADE_TRY #1052

Closed
AdityaSripal opened this issue Dec 13, 2023 · 1 comment · Fixed by #1055
Closed

Comments

@AdityaSripal
Copy link
Member

AdityaSripal commented Dec 13, 2023

If two crossing hellos are incompatible at the same sequence than they will not be able to proceed.

Suppose one side then makes itself compatible with a new INIT, then the sequences will mismatch but the upgrades are compatible. Then with the current spec, we will require that the sequences match exactly in the crossing hello case thus we cannot proceed. Note we only fastforward the sequence in the non-crossing-hello case.

The only way to progress in this case, would be for the other side to also RE-INIT or cancel the upgrade so that we can proceed.

This is quite inefficient.

The solution is to fastforward even in the non-crossing hello case in TRY.

If the upgrades are indeed incompatible, we still abort the transaction and revert state so we are not in danger of committing incorrect state. However, in this case when both upgrades are compatible and one sequence is higher we can fastforward and continue in the crossing hello case.

See the discovery and fix of this behaviour in the following commits on the quint tests:

https://github.com/cosmos/quint-channel-upgradability/pull/8/commits/4a21351b662c6028eae3ccf78fb0113187c97941

https://github.com/cosmos/quint-channel-upgradability/pull/8/commits/17095a1b0d5773575a532f0568f4577f5f379ae2

@sangier
Copy link
Contributor

sangier commented Dec 15, 2023

Thanks @AdityaSripal! I checked quint too and the proposed solution LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

2 participants