Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
oduameh committed Nov 6, 2024
1 parent e48414e commit e84457d
Showing 1 changed file with 56 additions and 2 deletions.
58 changes: 56 additions & 2 deletions docs/docs/dev/protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,61 @@

Additional implementation-specific documentation for the Hydra Head protocol and extensions like incremental decommits.

### Incremental decommits
### Incremental Commits

#### Deposit flow

```mermaid
sequenceDiagram
Alice->>+Node A: POST /commit UTxO
Node A-->>-Alice: depositTx
Alice ->> Alice: sign depositTx
Alice ->> Chain: submit depositTx
Chain ->>+ Node A: OnDepositTx utxo
Chain ->>+ Node B: OnDepositTx utxo
Node A -->> Alice: CommitRecorded
par Alice isLeader
Node A->>Node A: ReqSn utxoToCommit
and
Node A->>Node B: ReqSn utxoToCommit
end
Node A->>Node A: sig = sign snapshot incl. utxoToCommit
par broadcast
Node A->>Node A: AckSn sig
and
Node A->>Node B: AckSn sig
end
Node B->>Node A: AckSn sig
Node A -->> Alice: SnapshotConfirmed
Node A -->> Alice: CommitApproved
Node A ->> Chain: IncrementTx snapshot sig
Chain ->> Node A: OnIncrementTx
Node A -->> Alice: CommitFinalized
```

#### Recover flow

```mermaid
sequenceDiagram
Alice->>+Node A: DELETE /commits/<tx-id>
Node A->>Chain: recoverTx
Chain ->>+ Node A: OnRecoverTx utxo
Chain ->>+ Node B: OnRecoverTx utxo
Node A -->>- Alice: CommitRecovered
Node B -->>- Bob: CommitRecovered
Node A-->>-Alice: OK
```

### Incremental Decommits

```mermaid
sequenceDiagram
Expand Down Expand Up @@ -42,4 +96,4 @@ sequenceDiagram
Node A ->> Chain: DecrementTx snapshot sig
Chain ->> Node A: OnDecrementTx
Node A -->> Alice: DecommitFinalized
```
```

0 comments on commit e84457d

Please sign in to comment.