-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup incremental decommit - Part 1 (#1491)
A first round of things which stood out to me when reviewing #1344: - Removed unnecessary changes of cardano-configurations, incrementTx figure from spec, a renaming in the spec and moved sequence diagram in the docs - Renamed the tx benchmark to `decrement` - Added missing version checks validators - Major refactor of close/contest with the new redeemer classes (to align with the spec) - Removed redundant snapshot number checks - Made `deltaUTxOHash` a `Maybe Hash` - Some further refactor of on-chain types into sub-types (to be more type-safe.. but could have been another PR). - ReqDec handling similar to ReqTx handling (DecommitInvalid similar to TxInvalid behavior). - Align signable representation with spec (order or arguments in tuple) This does target #1344 and should resolve many conversations (my notes I left).
- Loading branch information
Showing
52 changed files
with
28,460 additions
and
36,475 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Protocol | ||
|
||
Additional implementation-specific documentation for the Hydra Head protocol and extensions like incremental decommits. | ||
|
||
### Incremental Decommits | ||
|
||
```mermaid | ||
sequenceDiagram | ||
Alice->>HeadLogic: Decommit (decTx) | ||
HeadLogic->>HeadLogic: canApply decTx | ||
par broadcast | ||
HeadLogic->>HeadLogic: ReqDec decTx | ||
and | ||
HeadLogic->>Node B: ReqDec decTx | ||
end | ||
HeadLogic -->> Alice: DecommitRequested | ||
par Alice isLeader | ||
HeadLogic->>HeadLogic: ReqSn decTx | ||
and | ||
HeadLogic->>Node B: ReqSn decTx | ||
end | ||
HeadLogic->>HeadLogic: canApply decTx, decUTxO = outputs(decTx) | ||
HeadLogic->>HeadLogic: sig = sign snapshot incl. decUTxO | ||
par broadcast | ||
HeadLogic->>HeadLogic: AckSn sig | ||
and | ||
HeadLogic->>Node B: AckSn sig | ||
end | ||
Node B->>HeadLogic: AckSn sig | ||
HeadLogic -->> Alice: SnapshotConfirmed | ||
HeadLogic -->> Alice: DecommitApproved | ||
HeadLogic ->> Chain: DecrementTx snapshot sig | ||
Chain ->> HeadLogic: OnDecrementTx | ||
HeadLogic -->> Alice: DecommitFinalized | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.