Skip to content

Commit

Permalink
Some alignment between spec and impl
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1bo committed Mar 7, 2024
1 parent c6a5994 commit 2871737
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions hydra-plutus/src/Hydra/Contract/HeadState.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ data State
| Closed
{ parties :: [Party]
, snapshotNumber :: SnapshotNumber
-- ^ Spec: fst of η
, utxoHash :: Hash
-- ^ Spec: snd of η
, utxoToDecommitHash :: Hash
-- ^ Spec: ηω
, contestationDeadline :: POSIXTime
, contestationPeriod :: ContestationPeriod
, headId :: CurrencySymbol
Expand Down
3 changes: 2 additions & 1 deletion spec/onchain.tex
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ \subsection{Close Transaction}\label{sec:close-tx}
$\datumHead' \sim \stClosed$, parameters $\cid,\hydraKeysAgg,\nop,\cPer$
stay unchanged and the new state is governed again by $\nuHead$:
\[
(\stOpen,\cid,\hydraKeysAgg,\nop,\cPer,\eta) \xrightarrow[\xi]{\stClose} (\stClosed,\cid,\hydraKeysAgg,\nop,\cPer,\eta_0,\eta',\contesters,\Tfinal)
(\stOpen,\cid,\hydraKeysAgg,\nop,\cPer,\eta) \xrightarrow[\xi]{\stClose} (\stClosed,\cid,\hydraKeysAgg,\nop,\cPer,\eta_0,\eta',\textcolor{blue}{\eta_{\omega}},\contesters,\Tfinal)
\]
\item Records the initial snapshot state $\eta_0 = \eta$. \\
This makes off-chain signatures rollback and replay resistant,
Expand All @@ -433,6 +433,7 @@ \subsection{Close Transaction}\label{sec:close-tx}
% TODO: η₀ is not yet incorporated
and $\eta'$: $\mathsf{msg} = (\cid || \textcolor{red}{\eta_{0} ||} \eta')$.
% TODO: detailed CDDL definition of msg
\todo{snapshot/msg with pending decommit must work as well}
\item Initializes the set of contesters as $\contesters = \emptyset$. \\
This allows the closing party to also contest and is required for use
cases where pre-signed, valid in the future, close transactions are
Expand Down
5 changes: 4 additions & 1 deletion spec/overview.tex
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ \subsection{Opening the head}
evolves the initial UTxO set (the union over all UTxOs committed by all head
members) independently of the mainchain. For the case where some head members
fail to post a \mtxCom{} transaction, the head can be aborted by going directly
from $\stInitial$ to $\stFinal$.
from $\stInitial$ to $\stFinal$ \todo{increment / decrement}.


\subsection{The Coordinated Head protocol}

The actual Head protocol starts after the initialization phase with an initial
Expand Down Expand Up @@ -110,6 +112,7 @@ \subsection{Differences}
\item No hanging transactions due to `coordination'.
\item No acknowledgement nor confirmation of transactions.
\item No confirmation message for snapshots (two-round local confirmation).
\todo{increment / decrement extension}
\end{itemize}

%%% Local Variables:
Expand Down

0 comments on commit 2871737

Please sign in to comment.