You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The timeoutChannelUpgrade should write an error receipt upon successfully timing out an upgrade. While not strictly necessary, it potentially reduces handshake steps by 1. In the case of crossing INIT's, 1 side might timeout before the other. If this occurs, without the error receipt, the counterparty would either need to force a error receipt by calling the TRY step or wait for it's own timeout to exceed its deadline.
By writing the error receipt upon timeout, you don't require a TRY to be executed just to obtain an error receipt to cancel the upgrade
In the non-crossing INIT case, such as a single chain calling INIT and then timeout, an error receipt isn't useful, but it should not cause any issues either. In fact, it could simply allow a chain to synchronize upgrade sequences:
chain A, sequence 1, INIT, moves to sequence 2
chain A, timeout, error receipt for sequence 2 written
chain B, INIT, moves to sequence 2
chain B, cancel on error receipt, write error receipt
(without the error receipt written on timeout, chain A would have needed to call TRY to force an error receipt for sequence 2, note chain A could not respond to sequence 2 since it already attempted that sequence for a different upgrade)
chain B, INIT, moves to sequence 3
chain A, TRY, success
The text was updated successfully, but these errors were encountered:
crodriguezvega
changed the title
timeoutChannelUpgrade should write error receipt
ICS 04: timeoutChannelUpgrade should write error receipt
Jun 24, 2023
As it stands now timeoutChannelUpgrade does write an error receipt, but the channel state must be FLUSHING or FLUSHCOMPLETE. Therefore it would not be possible to call timeoutChannelUpgrade after INIT. Since INIT only increments the upgrade sequence and stores the upgrade info, I believe it is fine not to allow to call timeoutChannelUpgrade when the channel state is OPEN, since there is no channel state to revert to. I will then close the issue; please reopen if you think these changes would still be needed.
The
timeoutChannelUpgrade
should write an error receipt upon successfully timing out an upgrade. While not strictly necessary, it potentially reduces handshake steps by 1. In the case of crossing INIT's, 1 side might timeout before the other. If this occurs, without the error receipt, the counterparty would either need to force a error receipt by calling the TRY step or wait for it's own timeout to exceed its deadline.By writing the error receipt upon timeout, you don't require a TRY to be executed just to obtain an error receipt to cancel the upgrade
In the non-crossing INIT case, such as a single chain calling INIT and then timeout, an error receipt isn't useful, but it should not cause any issues either. In fact, it could simply allow a chain to synchronize upgrade sequences:
chain A, sequence 1, INIT, moves to sequence 2
chain A, timeout, error receipt for sequence 2 written
chain B, INIT, moves to sequence 2
chain B, cancel on error receipt, write error receipt
(without the error receipt written on timeout, chain A would have needed to call TRY to force an error receipt for sequence 2, note chain A could not respond to sequence 2 since it already attempted that sequence for a different upgrade)
chain B, INIT, moves to sequence 3
chain A, TRY, success
The text was updated successfully, but these errors were encountered: