You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: simulation/docs/network-spec/miniprotocols.tex
+150-6Lines changed: 150 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -84,10 +84,10 @@ \subsubsection{Description}
84
84
allowed. IB-relay, EB-relay, and Vote-relay are each parametrized by
85
85
the maximum age beyond which a datum is no longer
86
86
relayed\footnote{older EBs and IBs referenced by the blockchain can be
87
-
accessed from the \catchup{} in Sec.\ref{ptcl:catch-up}}. IB-relay and
87
+
accessed from the \catchup{} mini protocol (Sec.~\ref{ptcl:catch-up}).}. IB-relay and
88
88
EB-relay rely on \Announcements{} to let consumers know when block bodies
89
89
are available as well. Consumers request IB and EB bodies through the corresponding
90
-
\fetch{} protocol (Sec.~\ref{ptcl:fetch}).
90
+
\fetch{} mini protocol (Sec.~\ref{ptcl:fetch}). For EB-relay we specify the \datum{} to be eb-header, by which we mean the constant size part of an Endorse block, while the references (to IBs and EBs) are considered the body.
91
91
92
92
\begin{table}[h!]
93
93
\begin{tabular}{l l l l l l l l}
@@ -288,10 +288,154 @@ \subsection{Producer and Consumer Implementation}
The \fetch{} mini protocol enables a node to download block bodies identified by a pair of slot and block id (i.e. hash). It is intended for on-the-fly block diffusion, complementing the \relay{} mini protocol.
311
+
312
+
It is a minor variation of the Block Fetch mini protocol used for
313
+
Praos blocks: IBs and EBs do not have a notion of range, so they are
314
+
requested by individual identifiers.
315
+
316
+
\paragraph{Parameters} A \fetch{} instance is specified by these parameters
317
+
\begin{description}
318
+
\item [\id{}] Identifier for a body to fetch.
319
+
\item [\body{}] Block body itself.
320
+
\end{description}
321
+
322
+
\paragraph{Instances} are listed in Table~{table:fetch-instances}. The \body{} descriptions included here are for illustration, in particular to clarify what we mean by \body{} of an Endorse block.
The consumer requests a sequence of bodies from the producer.
370
+
\todo{If we keep the streaming setup, we could abstract from $[\point{}]$ to a \emph{sequence} parameter, allowing the original Block Fetch as an instance.}
371
+
\item [\MsgNoBlocks]
372
+
The producer tells the consumer that it does not have all of the blocks in the requested sequence.
373
+
\item [\MsgStartBatch]
374
+
The producer starts body streaming.
375
+
\todo{Does a streaming setup still makes sense, or should we drop it in favor of pipelining?}
376
+
\item [\MsgBody{} {\boldmath$(\body{})$}]
377
+
Stream a single block's body.
378
+
\item [\MsgBatchDone]
379
+
The producer ends block streaming.
380
+
\item [\MsgConsumerDone]
381
+
The consumer terminates the protocol.
382
+
\end{description}
383
+
384
+
Transition table is shown in table~\ref{table:fetch}.
0 commit comments