Skip to content

Commit

Permalink
Add more increment parts to the spec
Browse files Browse the repository at this point in the history
  • Loading branch information
v0d1ch committed Jul 10, 2024
1 parent 7152dae commit e33a39a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
Binary file added spec/figures/incrementTx.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions spec/macros.tex
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@
\newcommand{\mtxCommit}{\textit{commit}}
\newcommand{\mtxCCom}{\textit{collectCom}}
\newcommand{\mtxCollect}{\textit{collectCom}}
\newcommand{\mtxIncrement}{\textit{increment}}
\newcommand{\mtxDecrement}{\textit{decrement}}
\newcommand{\mtxAbort}{\textit{abort}}
\newcommand{\mtxClose}{\textit{close}}
Expand Down
1 change: 1 addition & 0 deletions spec/offchain.tex
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ \section{Off-Chain Protocol}\label{sec:offchain}
\item $\mathtt{initialTx}$: initiates a head
\item $\mathtt{commitTx}$: commits UTxO to an initializing head
\item $\mathtt{collectComTx}$: opens a head
\red{\item $\mathtt{incrementTx}$: adds UTxO from L1 to an open head}
\red{\item $\mathtt{decrementTx}$: removes UTxO from an open head}
\item $\mathtt{closeTx}$: closes a head
\item $\mathtt{contestTx}$: contests a closed head
Expand Down
14 changes: 11 additions & 3 deletions spec/onchain.tex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ \section{On-chain Protocol}\label{sec:on-chain}
life-cycle of a Hydra head, which can be intuitively described as a state
machine (see Figure~\ref{fig:SM_states_basic}). Each transition in this state
machine is represented and caused by a corresponding Hydra protocol transaction
on-chain: $\mtxInit{}$, $\mtxCom{}$, $\mtxAbort{}$, $\mtxCollect{}$, \red{$\mtxDecrement{}$,}
on-chain: $\mtxInit{}$, $\mtxCom{}$, $\mtxAbort{}$, $\mtxCollect{}$, \red{$\mtxIncrement{}$,} \red{$\mtxDecrement{}$,}
$\mtxClose{}$, $\mtxContest{}$, and $\mtxFanout{}$.

% TODO: Could include a combined overview, slightly more detailed than Figure 1
Expand All @@ -27,7 +27,7 @@ \section{On-chain Protocol}\label{sec:on-chain}
\item $\nuCommit$ controls the collection of committed UTxOs into the head in
$\mtxCollect$ or that funds are reimbursed in an $\mtxAbort{}$.
\item $\nuHead$ represents the main protocol state machine logic and ensures
contract continuity throughout $\mtxCollect{}$, \red{$\mtxDecrement{}$,} $\mtxClose{}$,
contract continuity throughout $\mtxCollect{}$, \red{$\mtxIncrement{}$,} \red{$\mtxDecrement{}$,} $\mtxClose{}$,
$\mtxContest{}$ and $\mtxFanout{}$.
\end{itemize}

Expand Down Expand Up @@ -319,7 +319,8 @@ \subsection{CollectCom Transaction}\label{sec:collect-tx}

\subsection{Increment Transaction}\label{sec:increment-tx}

\noindent The increment transaction allows a party to add a UTxO to an already open head.
\noindent The \mtxIncrement{} transaction (Figure~\ref{fig:IncrementTx}) allows a party to
add a UTxO to an already open head.

\begin{itemize}
\item one input spending from $\nuHead$ holding the $\st$ with $\datumHead$,
Expand Down Expand Up @@ -348,6 +349,13 @@ \subsection{Increment Transaction}\label{sec:increment-tx}
$\valHead' \supseteq \valHead \cup (\bigcup_{j=1}^{m} \val_{\mathsf{committed}_{j}})$
\end{menumerate}

\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{figures/incrementTx.pdf}
\caption{\mtxIncrement{} transaction spending an open head output,
producing a new head output which includes new UTxO.}\label{fig:incrementTx}
\end{figure}

\subsection{\red{Decrement Transaction}}\label{sec:decrement-tx}

\noindent The \mtxDecrement{} transaction (Figure~\ref{fig:DecrementTx}) allows
Expand Down
3 changes: 2 additions & 1 deletion spec/overview.tex
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ \subsection{The Coordinated Head protocol}
\red{Besides processing ``normal'' transactions, participants can also request
to take some UTxO they can spend out of the Head and make it available on main
chain using a \mtxDecrement{} transaction - the whole process is called
decommit.}
decommit. Another ``unusual`` transaction is \mtxIncrement{} transaction which
allows Head participants to add some UTxO from L1 to the Head.}
\subsection{Closing the head}
Expand Down

0 comments on commit e33a39a

Please sign in to comment.