Skip to content

Commit 21d3380

Browse files
authored
Merge pull request #5053 from IntersectMBO/coot/network-spec
network-spec: small improvements
2 parents 2589d0e + 552303d commit 21d3380

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

docs/network-spec/miniprotocols.tex

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,16 +1172,16 @@ \section{Tx-Submission mini-protocol}
11721172
\label{tx-submission-protocol}
11731173
\label{tx-submission-protocol2}
11741174

1175-
\newcommand{\StInit} {\state{StInit}}
1176-
\newcommand{\MsgInit} {\trans{MsgInit}}
1175+
\newcommand{\StInit} {\state{StInit}}
1176+
\newcommand{\MsgInit} {\msg{MsgInit}}
11771177
\newcommand{\StTxIdsBlocking} {\state{StTxIdsBlocking}}
11781178
\newcommand{\StTxIdsNonBlocking} {\state{StTxIdsNonBlocking}}
11791179
\newcommand{\StTxs} {\state{StTxs}}
1180-
\newcommand{\MsgRequestTxIdsNB} {\trans{MsgRequestTxIdsNonBlocking}}
1181-
\newcommand{\MsgRequestTxIdsB} {\trans{MsgRequestTxIdsBlocking}}
1182-
\newcommand{\MsgReplyTxIds} {\trans{MsgReplyTxIds}}
1183-
\newcommand{\MsgRequestTxs} {\trans{MsgRequestTxs}}
1184-
\newcommand{\MsgReplyTxs} {\trans{MsgReplyTxs}}
1180+
\newcommand{\MsgRequestTxIdsNB} {\msg{MsgRequestTxIdsNonBlocking}}
1181+
\newcommand{\MsgRequestTxIdsB} {\msg{MsgRequestTxIdsBlocking}}
1182+
\newcommand{\MsgReplyTxIds} {\msg{MsgReplyTxIds}}
1183+
\newcommand{\MsgRequestTxs} {\msg{MsgRequestTxs}}
1184+
\newcommand{\MsgReplyTxs} {\msg{MsgReplyTxs}}
11851185

11861186
\subsubsection{Description}
11871187
The node-to-node transaction submission protocol is used to transfer
@@ -1235,12 +1235,12 @@ \subsection{State machine}
12351235
\paragraph{Protocol messages}
12361236
\begin{description}
12371237
\item [\MsgInit] initial message of the protocol
1238-
\item [\MsgRequestTxIdsB{} {\boldmath $(ack,req)$}]
1239-
The server asks for new transaction ids and acknowledges old ids.
1240-
The client will block until new transactions are available.
12411238
\item [\MsgRequestTxIdsNB{} {\boldmath $(ack,req)$}]
12421239
The server asks for new transaction ids and acknowledges old ids.
12431240
The client immediately replies (possibly with an empty list).
1241+
\item [\MsgRequestTxIdsB{} {\boldmath $(ack,req)$}]
1242+
The server asks for new transaction ids and acknowledges old ids.
1243+
The client will block until new transactions are available.
12441244
\item [\MsgReplyTxIds{} {\boldmath ($\langle (id, size) \rangle$) }]
12451245
The client replies with a list of available transactions.
12461246
The list contains pairs of transaction ids and the corresponding size of the transaction in bytes.
@@ -1258,13 +1258,13 @@ \subsection{State machine}
12581258
\begin{tabular}{l|l|l|l}
12591259
\header{from state} & \header{message} & \header{parameters} & \header{to state} \\\hline
12601260
\StInit & \MsgInit & & \StIdle \\
1261-
\StIdle & \MsgRequestTxIdsB & $ack$,$req$ & \StTxIdsBlocking \\
1262-
\StTxIdsBlocking & \MsgReplyTxIds & $\langle (id, size) \rangle$ & \StIdle \\
12631261
\StIdle & \MsgRequestTxIdsNB & $ack$,$req$ & \StTxIdsNonBlocking \\
1262+
\StIdle & \MsgRequestTxIdsB & $ack$,$req$ & \StTxIdsBlocking \\
12641263
\StTxIdsNonBlocking & \MsgReplyTxIds & $\langle (id, size) \rangle$ & \StIdle \\
1264+
\StTxIdsBlocking & \MsgReplyTxIds & $\langle (id, size) \rangle$ & \StIdle \\
12651265
\StIdle & \MsgRequestTxs & $\langle ids \rangle$ & \StTxs \\
12661266
\StTxs & \MsgReplyTxs & $\langle txs \rangle$ & \StIdle \\
1267-
\MsgRequestTxIdsB & \MsgDone & & \StDone \\
1267+
\StIdle & \MsgDone & & \StDone \\
12681268
\end{tabular}
12691269
\caption{Tx-Submission mini-protocol (version 2) messages.}
12701270
\end{table}

ouroboros-network-protocols/cddl/specs/tx-submission2.cddl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
txSubmission2Message
99
= msgInit
10+
; corresponds to either MsgRequestTxIdsBlocking or
11+
; MsgRequestTxIdsNonBlocking in the spec
1012
/ msgRequestTxIds
1113
/ msgReplyTxIds
1214
/ msgRequestTxs

0 commit comments

Comments
 (0)