Skip to content

Commit 303dde8

Browse files
committed
simulation: network-spec: more on catchup
1 parent 9a93d71 commit 303dde8

File tree

2 files changed

+23
-13
lines changed

2 files changed

+23
-13
lines changed

simulation/docs/network-spec/miniprotocols.tex

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,20 @@ \subsubsection{Description}
8888
EB-relay rely on \Announcements{} to let consumers know when block bodies
8989
are available as well. Consumers request IB and EB bodies through the corresponding
9090
\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.}
9192

9293
\begin{table}[h!]
9394
\begin{tabular}{l l l l l l l l}
9495
\header{instance} & \header{\BoundedWindow} & \header{\Announcements} & \header{\id{}} & \header{\info{}}
9596
& \header{\datum} & \header{\annCond{}} & \header{\ann{}} \\\hline
96-
Tx-submission & Yes & No & txid & size & tx & N/A & N/A \\
97-
IB-relay & No & Yes & hash & slot & ib-header & body available & unit \\
98-
EB-relay & No & Yes & hash & slot & eb-header & body available & unit \\
99-
Vote-relay & No & No & hash & slot & vote-bundle & N/A & N/A \\
97+
Tx-submission & Yes & No & txid & size & tx & N/A & N/A \\
98+
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 \\
100101
\end{tabular}
101102
\caption{\relay{} mini-protocol instances.}
102103
\label{table:relay-instances}
103104
\end{table}
104-
\todo{Review \info{} wrt equivocation.}
105105

106106
\subsection{State machine}
107107

@@ -451,13 +451,19 @@ \subsection{Description}
451451
relevant to reconstruct the ledger state. Additionally it covers
452452
certified EBs not yet in the chain but which are still recent enough
453453
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
455461
for a node to participate in future pipelines.
456462

457463
The protocol should allow the consumer to divide the requests between
458464
different producers, and for the producer to have an efficient way to
459465
retrieve the requested blocks.
460-
466+
%
461467
The consumer should be able to retrieve the base chain through the
462468
other mini protocols, and so the EB references within. However, the
463469
slots of those EBs are unknown, as well as any indirect references.
@@ -467,21 +473,22 @@ \subsection{Description}
467473
\item[EBs by RB \rbrange{}] given an RB \rbrange{} from its chain, the producer
468474
should reply with all EBs which are (i) transitively referenced by RBs in that
469475
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
471477
producer should reply with all certified EBs which are (i) generated
472478
in the slot range, (ii) not referenced by RBs\footnote{Restriction
473479
(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
474480
slot range should be no earlier than the oldest slot an EB could be
475481
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.
476483
\item[IBs by EB \point{}, and \slot{} range] given a \point{} for a
477484
certified EB, the producer should reply with all the IBs which are (i)
478485
generated in the given slot range, (ii) directly referenced by
479486
the EB. The slot range allows for partitioning request about the
480487
same EB across different peers.
481488
\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.}
485492

486493
\paragraph{Definition} The \catchup{} protocol is defined as a new instance of the \fetch{} protocol. We give the parameters as a grammar
487494
\[
@@ -491,6 +498,9 @@ \subsection{Description}
491498
& \mid & \text{ibs-by-eb-and-slot-range}(\point{},(\slot{},\slot{}))\\
492499
\body{}_{\catchup{}} & ::= & \text{ib-block}(\text{ib-header},\text{ib-body}) \\
493500
& \mid & \text{eb-block}(\text{eb-header}, \text{eb-body})\\
501+
& \mid & \text{eb-certificate}(\text{certificate})\\
494502
\end{array}
495503
\]
496-
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{}.

simulation/docs/network-spec/network-spec.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
\ifbool{isRelease}
1818
{\usepackage[disable]{todonotes}}
1919
{\usepackage{todonotes}}
20-
20+
\setuptodonotes{inline}
2121
\usepackage{amsmath}
2222
\usepackage{stmaryrd}
2323
\usepackage{colonequals}

0 commit comments

Comments
 (0)