Skip to content

Commit

Permalink
fix: timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
sangier committed Nov 17, 2023
1 parent 837da2f commit f6e876e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions spec/core/ics-004-channel-and-packet-semantics/FSM_UPGRADES.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ This flow represents the situation where Party B initiates the process, with Par
| **q3.2** | | | | | | | | | | | | | |
| **q4** | | | | | | | 1 | 1 | 1 | | | | |
| **q5.1** | | | | | | | | | | 1 | | | |
| **q5.2** | | | | | | | | | 1 | 1,(1)| |1(q6) | |
| **q5.2** | | | | | | | | | 1 | 1,(1)|1(q6)| | |
| **q6** | | | | | | | | | | | 1 |1 | |
| **q7.1** | | | | | | | | | | | | | 1 |
| **q7.2** | | | | | | | | | | | | | 1 |
Expand Down Expand Up @@ -312,6 +312,7 @@ We list here all the conditions involved in the state transitions related to tim
- c19: errorReceipt.sequence >= Chan.UpgradeSequence === True
- c20: isCompatibleUpgradeFields === False
- c21: CounterPartyTimeoutExpired === True
- c22: Chan.State !== FLUSHING_COMPLETE
```

#### Σ: Error and Timeout Accepted Inputs
Expand Down Expand Up @@ -362,7 +363,8 @@ Below, we list the expanded representation of the protocol inputs.
- i3.3: [A, c21 , ]: ChanUpgradeConfirm --> restoreChannel -- CounterPartyTimeoutExceeded
- i3.3: [B, c21 , ]: ChanUpgradeConfirm --> restoreChannel -- CounterPartyTimeoutExceeded

- i6.1: [A or B, (c0; c5; c18; c19), ] : ChanUpgradeCancel --> restoreChannel
- i6.1: [A or B, (c0; c5; c22 ), ] : ChanUpgradeCancel --> restoreChannel --restoreWihtoutVerifyingError
- i6.1: [A or B, (c5; c18; c19), ] : ChanUpgradeCancel --> restoreChannel --restoreVerifyingError

- i7.1: [A or B, (c5; c7; c17), ] : ChanUpgradeTimeout --> restoreChannel
- i7.1: [A, (c5; c7; c17), ] : ChanUpgradeTimeout --> restoreChannel
Expand Down Expand Up @@ -394,27 +396,32 @@ Below, we list the expanded representation of the protocol inputs.

- [`q5.2`] -> x[i3.3: [A, c21, ]] -> [`q9.1`]

- [`q9.1`] x [i6.1: [A or B, (c0; c5; c22), ]] -> [`q0`]
- [`q9.1`] x [i6.1: [A or B, (c5; c18; c19), ]] -> [`q0`]


// Timeout
- [`q3.1`] x [i7.1: [A, (c5; c17; c11), ]] -> [`q9.2`]

- [`q3.2`] x [i7.1: [B, (c5; c17; c11), ]] -> [`q9.2`]

- [`q4`] x [i7.1: [A or B, (c5; c17; c11), ]] -> [`q9.2`]

- [`q5.1`] x [i7.1: [A or B, (c5; c17; c11), ]] -> [`q9.2`]
- [`q5.1`] x [i7.1: [B, (c5; c17; c11), ]] -> [`q9.2`]

- [`q5.2`] x [i7.1: [A, (c5; c17; c11), ]] -> [`q9.2`]

- [`q5.2`] x [i7.1: [A or B, (c5; c17; c11), ]] -> [`q9.2`]
- [`q9.2`] x [i6.1: [A or B, (c0; c5; c22), ]] -> [`q0`]
- [`q9.2`] x [i6.1: [A or B, (c5; c18; c19), ]] -> [`q0`]

- [`q6`] x [i7.1: [A or B, (c5; c17; c11), ]] -> [`q9.2`]

- [`q9.2`] x [i6.1: [A or B, c15, ]] -> [`q0`]
```

#### Error and Timeout Finite State Machine Diagram

//Todo Description

[Errors_and_Timeout_FSM](https://excalidraw.com/#json=jWWRYhcEYftExsUtfAG66,p_218xOMeWB6lVOV4UNIhw)
[Errors_and_Timeout_FSM](https://excalidraw.com/#json=QuXnHZqsVbAHw44DMu1F4,ZbsDB4zjdPvSc90E-fYQxQ)
![Picture2](img_fsm/FSM_Upgrades_Error_Timeout.png)

#### Error and Timeout Matrix Table
Expand All @@ -430,7 +437,7 @@ Below, we list the expanded representation of the protocol inputs.
| **q4** | 1 | 1 |
| **q5.1** | 1 | 1 |
| **q5.2** | 1 | 1 |
| **q6** | | 1 |
| **q6** | | |
| **q7.1** | | |
| **q7.2** | | |
| **q8** | | |
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f6e876e

Please sign in to comment.