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
+22-12Lines changed: 22 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -88,20 +88,20 @@ \subsubsection{Description}
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
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
+
\todo{For IB, EB, and Vote the \info{} could actually be unit as we do not need to apply prioritization to headers. However the slot might provide useful filtering, such as avoid downloading any more votes of a pipeline once we have a certificate for a seen EB.}
IB-relay & No & Yes & hash & slot & ib-header & body available & unit \\
99
+
EB-relay & No & Yes & hash & slot & eb-header & body available & unit \\
100
+
Vote-relay & No & No & hash & slot & vote-bundle & N/A & N/A \\
100
101
\end{tabular}
101
102
\caption{\relay{} mini-protocol instances.}
102
103
\label{table:relay-instances}
103
104
\end{table}
104
-
\todo{Review \info{} wrt equivocation.}
105
105
106
106
\subsection{State machine}
107
107
@@ -451,13 +451,19 @@ \subsection{Description}
451
451
relevant to reconstruct the ledger state. Additionally it covers
452
452
certified EBs not yet in the chain but which are still recent enough
453
453
for inclusion in a future ranking block, and any blocks they
454
-
reference. This data, together with the base chain, is what is needed
454
+
reference.
455
+
%
456
+
\todo{Unless we specify recent certified EBs are to be offered through
457
+
the \relay{} protocol still, in which case request
458
+
\ref{catchup:req:recent-ebs} can be dropped.}
459
+
%
460
+
This data, together with the base chain, is what is needed
455
461
for a node to participate in future pipelines.
456
462
457
463
The protocol should allow the consumer to divide the requests between
458
464
different producers, and for the producer to have an efficient way to
459
465
retrieve the requested blocks.
460
-
466
+
%
461
467
The consumer should be able to retrieve the base chain through the
462
468
other mini protocols, and so the EB references within. However, the
463
469
slots of those EBs are unknown, as well as any indirect references.
@@ -467,21 +473,22 @@ \subsection{Description}
467
473
\item[EBs by RB \rbrange{}] given an RB \rbrange{} from its chain, the producer
468
474
should reply with all EBs which are (i) transitively referenced by RBs in that
469
475
range, (ii) not referenced by earlier RBs.
470
-
\item[Recent certified EBs by \slot{} range] given a slot range, the
476
+
\item[Recent certified EBs by \slot{} range]\label{catchup:req:recent-ebs} given a slot range, the
471
477
producer should reply with all certified EBs which are (i) generated
472
478
in the slot range, (ii) not referenced by RBs\footnote{Restriction
473
479
(ii) is to avoid overlap with an RB range query, but could be dropped to save on complexity if not worth the saved bandwidth}. The start of the
474
480
slot range should be no earlier than the oldest slot an EB could be
475
481
generated in and still referenced in a future RB.
482
+
\item[Certificate by EB \point{}] given the \point{} of a certified EB not referenced by the chain, the producer should reply with a certificate for it. Needed for inclusion of the EB into a future RB produced by the consumer.
476
483
\item[IBs by EB \point{}, and \slot{} range] given a \point{} for a
477
484
certified EB, the producer should reply with all the IBs which are (i)
478
485
generated in the given slot range, (ii) directly referenced by
479
486
the EB. The slot range allows for partitioning request about the
480
487
same EB across different peers.
481
488
\end{description}
482
-
\todo{Another option for IBs could be a list of refs and a slot range. The refs come from EB bodies, and the slot range can be calculated from the slot of the EB.}
483
-
\todo{The \emph{IBs by EB \point{}, and \slot{} range} request could be replaced by just a list of IB\point{}s, if IB references are augmented with the slot.}
484
-
\todo{The \emph{EBs by RB \rbrange{}} request could similarly be a list of EB \point{}s instead, if EB refs in RBs and EBs contain slot, and let the consumer discover referenced EBs it needs as it fetches the one it knows about.}
489
+
\todo{The \emph{IBs by EB \point{}, and \slot{} range} request could be replaced by just a list of IB \point{}s, if IB references in EB bodies are augmented with the IB slot. Maybe size of request could become a consideration: by EB \point{} and \slot{} range the request size is $56$ bytes for possibly all the referenced IBs at once, while by IB \point{} the size is $40$ bytes each, and there could be double digits of them. If expect to always fragment requests to just a few IBs at a time the difference is perhaps not important.}
490
+
\todo{The \emph{EBs by RB \rbrange{}} request could similarly be replaced by a list of EB\point{}s,
491
+
if EB references in RBs and EBs are augmented with the EB slot. In this case, the consumer would be in charge of discovering needed referenced EBs as it fetches the ones it knows about.}
485
492
486
493
\paragraph{Definition} The \catchup{} protocol is defined as a new instance of the \fetch{} protocol. We give the parameters as a grammar
alternatively there could be separate protocols for IB and EB \catchup{}, so that there cannot be a format mismatch between requests and replies.
504
+
alternatively there could be separate mini protocols for IB, EB, and Certificate \catchup{}, so that there cannot be a format mismatch between requests and replies.
505
+
506
+
\paragraph{Implementation} To fulfill the higher-level freshest-first delivery goal, we might need to stipulate that producers should prioritize serving requests for the \{IB,EB,Vote\}-\relay{} and \{IB,EB\}-\fetch{} mini protocols over requests for \catchup{}.
0 commit comments