Skip to content

Commit

Permalink
Merge #3446
Browse files Browse the repository at this point in the history
3446: LocalStateQuery: document all messages r=coot a=coot

Document

* `MsgRelease`
* `MsgDone`

Fixes #3445.


Co-authored-by: Marcin Szamotulski <profunctor@pm.me>
  • Loading branch information
iohk-bors[bot] and coot committed Oct 29, 2021
2 parents 3f16f61 + 4b6378f commit 5743fdf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/network-spec/miniprotocols.tex
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,6 @@ \subsection{Description}
and the protocol parameters that are used by the client and the server.
It is run exactly once when a new connection is initialised
and consists of a single request from the client and a single reply from the server.
Section \ref{peer-setup-section} explains the live cycle of a connection and the role of
the handshake mini protocol in more detail.

The handshake mini protocol is a generic protocol that can negotiate any kind protocol parameters.
It only assumes that protocol parameters can be encoded to, and decoded from, CBOR terms.
Expand Down Expand Up @@ -1291,13 +1289,17 @@ \subsection{State machine}
\node[state, myblue, right of=Idle] (Acquiring) {\StAcquiring};
\node[state, mygreen, right of=Acquiring] (Acquired) {\StAcquired};
\node[state, myblue, right of=Acquired] (Querying) {\StQuerying};
\node[state, below of=Idle] (Done) {\StDone};

\draw (Idle) edge[bend left=45] node{\MsgAcquire} (Acquiring);
\draw (Acquiring) edge[bend left=45] node{\MsgFailure} (Idle);
\draw (Acquiring) edge[bend left=45] node{\MsgAcquired} (Acquired);
\draw (Acquired) edge[bend left=45] node{\MsgReAcquire} (Acquiring);
\draw (Acquired) edge[bend left=45] node{\MsgQuery} (Querying);
\draw (Acquired.275)
to[in=-65, out=-115] node{\MsgRelease} (Idle.260);
\draw (Querying) edge[bend left=45] node{\MsgResult} (Acquired);
\draw (Idle) edge node[left]{\MsgDone} (Done)
\end{tikzpicture}
\caption{State machine of the Local State Query mini-protocol.}
\end{figure}
Expand All @@ -1312,9 +1314,11 @@ \subsection{State machine}
\StIdle & \MsgAcquire & $Maybe\ point$ & \StAcquiring \\\hline
\StAcquiring & \MsgFailure & $AcquireFailure$ & \StIdle \\\hline
\StAcquiring & \MsgAcquired & & \StAcquired \\\hline
\StAcquired & \MsgReAcquire & $Maybe\ point$ & \StAcquiring \\\hline
\StAcquired & \MsgQuery & $query$ & \StQuerying \\\hline
\StQuerying & \MsgResult & $result$ & \StAcquired \\\hline
\StAcquired & \MsgReAcquire & $Maybe\ point$ & \StAcquiring \\\hline
\StAcquired & \MsgRelease & & \StIdle \\\hline
\StIdle & \MsgDone & & \StDone \\\hline
\end{tabular}
\caption{Local State Query mini-protocol messages.}
\end{figure}
Expand Down

0 comments on commit 5743fdf

Please sign in to comment.