update
This commit is contained in:
@@ -5,9 +5,8 @@ We consider a set of processes communicating asynchronously over reliable point-
|
||||
\item \textbf{\textit{delivered}}: the set of messages that have been ordered.
|
||||
\item \textbf{\textit{prop}[$r$][$j$]}: the proposal set announced by process $j$ at round $r$. It contains a set of messages that process $j$ claims to have received but not yet delivered.
|
||||
\item \textbf{\textit{winner}$^r$}: the set of processes that have issued a valid \texttt{PROVE} for round $r$, as observed through the registry.
|
||||
\item \textbf{\textit{window}}: the list of the ids from the $f+1$ last rounds. \textit{window.pop()} remove the first value of the array. \textit{window.push(x)} append x as the last value of the array.
|
||||
\item \textbf{\texttt{RB-cast}$(\texttt{PROP}, S, r, j)$}: a reliable broadcast invocation that disseminates the proposal $S$ from process $j$ for round $r$.
|
||||
\item \textbf{\texttt{RB-delivered}$(\texttt{PROP}, S, r, j)$}: the handler invoked upon reception of a \texttt{RB-cast}, which stores the received proposal $S$ into $\textit{prop}[r][j]$.
|
||||
\item \textbf{\texttt{R-Broadcast}$(\texttt{PROP}, S, r, j)$}: a reliable broadcast invocation that disseminates the proposal $S$ from process $j$ for round $r$.
|
||||
\item \textbf{\texttt{R-Delivered}$(\texttt{PROP}, S, r, j)$}: the handler invoked upon reception of a \texttt{RB-cast}, which stores the received proposal $S$ into $\textit{prop}[r][j]$.
|
||||
\item \textbf{\texttt{READ}()} : returns the current view of all valid operations stored in the DenyList registry.
|
||||
\item \textbf{\texttt{ordered}$(S)$}: returns a deterministic total order over a set $S$ of messages.
|
||||
\item \textbf{\texttt{hash}$(T, r)$}: returns the identifier of the next round as a deterministic function of the delivered set $T$ and current round $r$.
|
||||
@@ -17,57 +16,53 @@ We consider a set of processes communicating asynchronously over reliable point-
|
||||
\begin{algorithm}
|
||||
\caption{Atomic Broadcast with DenyList}
|
||||
\begin{algorithmic}[1]
|
||||
\State $\textit{proves} \gets \emptyset$
|
||||
\State $\textit{received} \gets \emptyset$
|
||||
\State $\textit{delivered} \gets \emptyset$
|
||||
\State $\textit{window} \gets [\bot]^{f+1}$
|
||||
\State $r_1 \gets 0$
|
||||
|
||||
\vspace{1em}
|
||||
% --- AB-Broadcast ---
|
||||
\State \nextalgline \textbf{AB-Broadcast}$_j(m)$
|
||||
\State \nextalgline \hspace{1em} $\texttt{RB-Broadcast}_j(m)$
|
||||
% --- A-Broadcast ---
|
||||
\State \nextalgline \textbf{A-Broadcast}$_j(m)$
|
||||
\State \nextalgline \hspace{1em} $\texttt{R-Broadcast}_j(m)$
|
||||
|
||||
\vspace{1em}
|
||||
% --- RB-delivered ---
|
||||
\State \nextalgline \textbf{RB-delivered}$_j(m)$
|
||||
% --- R-delivered ---
|
||||
\State \nextalgline \textbf{R-Delivered}$_j(m)$
|
||||
\State \nextalgline \hspace{1em} $\textit{received} \gets \textit{received} \cup \{m\}$
|
||||
\State \nextalgline \hspace{1em} \textbf{repeat while} $\textit{received} \setminus \textit{delivered} \neq \emptyset$
|
||||
\State \nextalgline \hspace{2em} $S \gets \textit{received} \setminus \textit{delivered}$
|
||||
\State \nextalgline \hspace{2em} $\texttt{RB-broadcast}(\texttt{PROP}, S, r_1, j)$
|
||||
\State \nextalgline \hspace{2em} $\textit{proves} \gets \texttt{READ}()$
|
||||
\State \nextalgline \hspace{2em} $\texttt{PROVE}[j](r_1)$
|
||||
% \State \nextalgline \hspace{2em} $r_1 \gets \max\{r : j,\ (j, \texttt{PROVE}(r)) \in \textit{proves}\} + 1$
|
||||
|
||||
\vspace{0.5em}
|
||||
\State \nextalgline \hspace{2em} $\texttt{APPEND}[j](r_1)$
|
||||
\State \nextalgline \hspace{2em} $S \gets \{1, ..., n\}$
|
||||
\State \nextalgline \hspace{2em} \textbf{repeat while} $|S| \leq n - f$
|
||||
\State \nextalgline \hspace{3em} \textbf{forall} $i \in S$
|
||||
\State \nextalgline \hspace{4em} \textbf{if} $\neg \texttt{PROVE}[i](r_1)$
|
||||
\State \nextalgline \hspace{5em} $S \gets S \setminus i$
|
||||
\State \nextalgline \hspace{2em} $\texttt{R-Broadcast}(\texttt{PROP}, S, r_1, j)$
|
||||
|
||||
\vspace{0.5em}
|
||||
\State \nextalgline \hspace{2em} $\textit{winner}[r_1] \gets \texttt{READ\_ALL}()$
|
||||
\State \nextalgline \hspace{2em} \textbf{wait } $\forall j \in \textit{winner}[r_1],\ |\textit{prop}[r_1][j] \neq \bot| \geq f+1$
|
||||
\State \nextalgline \hspace{2em} $T \gets \bigcup_{j \in \textit{winner}[r_1]} \textit{prop}[r_1][j] \setminus \textit{delivered}$
|
||||
\State \nextalgline \hspace{2em} \textbf{wait until } $|\{j_1 : |\{i_1 : (i_1, \textit{PROVE}(<r_1, j_1>)) \in \texttt{READ}[i_1]()\}| \geq n - f\}| \geq n -f$
|
||||
\State \nextalgline \hspace{2em} $\texttt{APPEND\_LINE}[j](r_1)$
|
||||
\State \nextalgline \hspace{2em} $B[r_1] \gets {1, ..., n}$
|
||||
\State \nextalgline \hspace{2em} \textbf{do}
|
||||
\State \nextalgline \hspace{3em} \textbf{for each } $j_1 \in B[r_1]$
|
||||
\State \nextalgline \hspace{4em} \textbf{if } $\nexists i_1 \text{ s.t. } \texttt{PROVE}[j_1](<r_1, i_1>) == \text{TRUE}$
|
||||
\State \nextalgline \hspace{5em} $B[r_1] \gets B[r_1] \setminus \{j_1\}$
|
||||
\State \nextalgline \hspace{2em} \textbf{while } $|B[r_1]| \geq f+1$
|
||||
\State \nextalgline \hspace{2em} $\textit{winner}[r_1] \gets \{j_1 : |\{i_1 : (i_1, \textit{PROVE}(<r_1, j_1>)) \in \texttt{READ}[i_1]()\}| \geq n - f\}$
|
||||
|
||||
\vspace{0.5em}
|
||||
\State \nextalgline \hspace{2em} \textbf{for each } $m \in \texttt{ordered}(T)$
|
||||
\State \nextalgline \hspace{2em} \textbf{wait } $\forall j \in \textit{winner}[r_1],\ \textit{prop}[r_1][j] \neq \bot$
|
||||
\State \nextalgline \hspace{2em} $M \gets \bigcup_{j \in \textit{winner}[r_1]} \textit{prop}[r_1][j] \setminus \textit{delivered}$
|
||||
\State \nextalgline \hspace{2em} \textbf{for each } $m \in \texttt{ordered}(M)$
|
||||
\State \nextalgline \hspace{3em} $\textit{delivered} \gets \textit{delivered} \cup \{m\}$
|
||||
\State \nextalgline \hspace{3em} $\texttt{AB-deliver}_j(m)$
|
||||
\State \nextalgline \hspace{2em} $r_1 \gets \textit{hash}(T, r_1)$
|
||||
\State \nextalgline \hspace{3em} $\texttt{A-Delivered}_j(m)$
|
||||
\State \nextalgline \hspace{2em} $r_1 \gets \textit{hash}(M, r_1)$
|
||||
|
||||
\vspace{1em}
|
||||
% --- READ_ALL() ---
|
||||
\State \nextalgline \textbf{READ\_ALL}$(r)$
|
||||
\State \nextalgline \hspace{1em} \textbf{for each } $j \in (1, ... , n)$
|
||||
\State \nextalgline \hspace{2em} $win[j] \gets \{j_1: \texttt{READ}_{j_1}() \ni (j, \texttt{PROVE}(r))\}$
|
||||
\State \nextalgline \hspace{1em} \textbf{for} $i \in (1, ... , n)$
|
||||
\State \nextalgline \hspace{2em} \textbf{for} $j \in (1, ... , n)$
|
||||
\State \nextalgline \hspace{3em} \textbf{if} $i \in win[j]$
|
||||
\State \nextalgline \hspace{4em} $count[i] ++$
|
||||
\State \nextalgline \hspace{1em} \textbf{return} $\{i: count[i] \geq n-f\}$
|
||||
% --- R-Delivered ---
|
||||
\State \nextalgline \textbf{R-Delivered}$_j(PROP, S, r, j_j)$
|
||||
\State \nextalgline \hspace{1em} $\textit{prop}[r][j_j] \gets S$
|
||||
\State \nextalgline \hspace{1em} \texttt{PROVE}$[j](<r, j_1>)$
|
||||
|
||||
\vspace{1em}
|
||||
% --- APPEND_LINE() ---
|
||||
\State \nextalgline \textbf{APPEND\_LINE}$_j(r)$
|
||||
\State \nextalgline \hspace{1em} \textbf{for each } $i_1 \in (1, ... , n)$
|
||||
\State \nextalgline \hspace{2em} \texttt{APPEND}$[j](<r, i_1>)$
|
||||
|
||||
\end{algorithmic}
|
||||
\end{algorithm}
|
||||
|
||||
Reference in New Issue
Block a user