refactoring
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
\RB provides the following properties in the model.
|
||||
\begin{itemize}[leftmargin=*]
|
||||
\item \textbf{Integrity}: Every message received was previously sent. $\forall p_i:\ m = \RBreceived_i() \Rightarrow \exists p_j:\ \RBcast_j(m)$.
|
||||
\item \textbf{Integrity}: Every message received was previously sent. $\forall p_i:\ m = \rbreceived_i() \Rightarrow \exists p_j:\ \RBcast_j(m)$.
|
||||
\item \textbf{No-duplicates}: No message is received more than once at any process.
|
||||
\item \textbf{Validity}: If a correct process broadcasts $m$, every correct process eventually receives $m$.
|
||||
\end{itemize}
|
||||
|
||||
@@ -17,48 +17,48 @@ We present below an example of implementation of Atomic Reliable Broadcast (\ARB
|
||||
|
||||
\SetKwBlock{LocalVars}{Local Variables:}{}
|
||||
\LocalVars{
|
||||
$\mathit{unordered} \gets \emptyset$,
|
||||
$\mathit{ordered} \gets \epsilon$,
|
||||
$\mathit{delivered} \gets \epsilon$\;
|
||||
$\mathit{prop}[r][j] \gets \bot,\ \forall r,j$\;
|
||||
$\unordered \gets \emptyset$,
|
||||
$\ordered \gets \epsilon$,
|
||||
$\delivered \gets \epsilon$\;
|
||||
$\prop[r][j] \gets \bot,\ \forall r,j$\;
|
||||
}
|
||||
|
||||
\vspace{0.3em}
|
||||
|
||||
\For{$r = 1, 2, \ldots$}{
|
||||
\textbf{wait until} $\mathit{unordered} \setminus \mathit{ordered} \neq \emptyset$\;
|
||||
$S \leftarrow (\mathit{unordered} \setminus \mathit{ordered})$\;\nllabel{code:Sconstruction}
|
||||
\textbf{wait until} $\unordered \setminus \ordered \neq \emptyset$\;
|
||||
$S \leftarrow (\unordered \setminus \ordered)$\;\nllabel{code:Sconstruction}
|
||||
$\RBcast(\texttt{PROP}, S, \langle r, i \rangle)$; $\PROVE(r)$; $\APPEND(r)$\;\nllabel{code:submit-proposition}
|
||||
|
||||
$\mathit{winners}_r \gets \{ j : (j, r) \in \READ() \}$\;\nllabel{code:Wcompute}
|
||||
$\winners[r] \gets \{ j : (j, r) \in \READ() \}$\;\nllabel{code:Wcompute}
|
||||
|
||||
\textbf{wait until} $\forall j \in \mathit{winners}_r,\ \mathit{prop}[r][j] \neq \bot$\;\nllabel{code:check-winners-ack}
|
||||
\textbf{wait until} $\forall j \in \winners[r],\ \prop[r][j] \neq \bot$\;\nllabel{code:check-winners-ack}
|
||||
|
||||
$M \gets \bigcup_{j \in \mathit{winners}_r} \mathit{prop}[r][j]$\;\nllabel{code:Mcompute-dl}
|
||||
$\mathit{ordered} \leftarrow \mathit{ordered} \cdot \ordered(M)$\;\nllabel{code:next-msg-extraction}
|
||||
$M \gets \bigcup_{j \in \winners[r]} \prop[r][j]$\;\nllabel{code:Mcompute-dl}
|
||||
$\ordered \leftarrow \ordered \cdot \ordered(M)$\;\nllabel{code:next-msg-extraction}
|
||||
}
|
||||
|
||||
\vspace{0.3em}
|
||||
|
||||
\Upon{$\ABbroadcast(m)$}{
|
||||
$\mathit{unordered} \gets \mathit{unordered} \cup \{m\}$\;\nllabel{code:abbroadcast-add}
|
||||
$\unordered \gets \unordered \cup \{m\}$\;\nllabel{code:abbroadcast-add}
|
||||
}
|
||||
|
||||
\vspace{0.3em}
|
||||
|
||||
\Upon{$\textsf{rdeliver}(\texttt{PROP}, S, \langle r, j \rangle)$ from process $p_j$}{
|
||||
$\mathit{unordered} \leftarrow \mathit{unordered} \cup \{S\}$\;\nllabel{code:receivedConstruction}
|
||||
$\mathit{prop}[r][j] \leftarrow S$\;\nllabel{code:prop-set}
|
||||
\Upon{$\rdeliver(\texttt{PROP}, S, \langle r, j \rangle)$ from process $p_j$}{
|
||||
$\unordered \leftarrow \unordered \cup \{S\}$\;\nllabel{code:receivedConstruction}
|
||||
$\prop[r][j] \leftarrow S$\;\nllabel{code:prop-set}
|
||||
}
|
||||
|
||||
\vspace{0.3em}
|
||||
|
||||
\Upon{$\ABdeliver()$}{
|
||||
\If{$\mathit{ordered} \setminus \mathit{delivered} = \emptyset$}{
|
||||
\If{$\ordered \setminus \delivered = \emptyset$}{
|
||||
\Return{$\bot$}
|
||||
}
|
||||
let $m$ be the first element in $\mathit{ordered} \setminus \mathit{delivered}$\;\nllabel{code:adeliver-extract}
|
||||
$\mathit{delivered} \gets \mathit{delivered} \cdot m$\;\nllabel{code:adeliver-mark}
|
||||
let $m$ be the first element in $\ordered \setminus \delivered$\;\nllabel{code:adeliver-extract}
|
||||
$\delivered \gets \delivered \cdot m$\;\nllabel{code:adeliver-mark}
|
||||
\Return{$m$}
|
||||
}
|
||||
|
||||
@@ -121,19 +121,19 @@ We present below an example of implementation of Atomic Reliable Broadcast (\ARB
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[Well-defined winners]\label{lem:winners}
|
||||
For any correct process $p_i$ and round $r$, if $p_i$ computes $\mathit{winners}_r$ at line~\ref{code:Wcompute}, then :
|
||||
For any correct process $p_i$ and round $r$, if $p_i$ computes $\winners[r]$ at line~\ref{code:Wcompute}, then :
|
||||
\begin{itemize}
|
||||
\item $\Winners_r$ is defined;
|
||||
\item the computed $\mathit{winners}_r$ is exactly $\Winners_r$.
|
||||
\item the computed $\winners[r]$ is exactly $\Winners_r$.
|
||||
\end{itemize}
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}
|
||||
Lets consider a correct process $p_i$ that reach line~\ref{code:Wcompute} to compute $\mathit{winners}_r$. \\
|
||||
Lets consider a correct process $p_i$ that reach line~\ref{code:Wcompute} to compute $\winners[r]$. \\
|
||||
By program order, $p_i$ must have executed $\APPEND_i(r)$ at line~\ref{code:submit-proposition} before, which implies by \Cref{def:closed-round} that round $r$ is closed at that point. So by \Cref{def:winner-invariant}, $\Winners_r$ is defined. \\
|
||||
By \Cref{lem:closure-view}, all correct processes eventually observe the same set of valid tuples $(\_,r)$ in their \DL view. Hence, when $p_i$ executes the $\READ()$ at line~\ref{code:Wcompute} after the $\APPEND_i(r)$, it observes a set $P$ that includes all valid tuples $(\_,r)$ such that
|
||||
\[
|
||||
\mathit{winners}_r = \{ j : (j,r) \in P \} = \{j : \PROVE_j(r) \prec \APPEND^{(\star)}(r) \} = \Winners_r
|
||||
\winners[r] = \{ j : (j,r) \in P \} = \{j : \PROVE_j(r) \prec \APPEND^{(\star)}(r) \} = \Winners_r
|
||||
\]
|
||||
\end{proof}
|
||||
|
||||
@@ -195,7 +195,7 @@ We present below an example of implementation of Atomic Reliable Broadcast (\ARB
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}[Proof]
|
||||
Let take a correct process $p_i$ that compute $M$ at line~\ref{code:Mcompute-dl}. That implies that $p_i$ has defined $\mathit{winners}_r$ at line~\ref{code:Wcompute}. It implies that, by \Cref{lem:winners}, $r$ is closed and $\mathit{winners}_r = \Winners_r$. \\
|
||||
Let take a correct process $p_i$ that compute $M$ at line~\ref{code:Mcompute-dl}. That implies that $p_i$ has defined $\winners r$ at line~\ref{code:Wcompute}. It implies that, by \Cref{lem:winners}, $r$ is closed and $\winners_r = \Winners_r$. \\
|
||||
By \Cref{lem:eventual-closure}, for every $j \in \Winners_r$, $\prop^{(i)}[r][j] \neq \bot$. By \Cref{lem:unique-proposal}, each winner $j$ invokes at most one $\RBcast(PROP, S^{(j)}, \langle r, j \rangle)$, so $\prop^{(i)}[r][j] = S^{(j)}$ is uniquely defined. Hence, when $p_i$ computes
|
||||
\[
|
||||
M^{(i)} = \bigcup_{j\in\Winners_r} \prop^{(i)}[r][j] = \bigcup_{j\in\Winners_r} S^{(j)} = \Messages_r.
|
||||
@@ -210,17 +210,17 @@ We present below an example of implementation of Atomic Reliable Broadcast (\ARB
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}
|
||||
Let $p_i$ be a correct process that invokes $\ABbroadcast(m)$. By the handler at line~\ref{code:abbroadcast-add}, $m$ is added to $\mathit{unordered}$. Since $p_i$ is correct, it continues executing the main loop.
|
||||
Let $p_i$ be a correct process that invokes $\ABbroadcast(m)$. By the handler at line~\ref{code:abbroadcast-add}, $m$ is added to $\unordered$. Since $p_i$ is correct, it continues executing the main loop.
|
||||
|
||||
Consider any iteration of the loop where $p_i$ executes line~\ref{code:Sconstruction} while $m \in (\mathit{unordered} \setminus \mathit{ordered})$. At that iteration, for some round $r$, process $p_i$ constructs $S$ containing $m$ and invokes $\RBcast(PROP, S, \langle r, i \rangle)$ at line~\ref{code:submit-proposition}.
|
||||
Consider any iteration of the loop where $p_i$ executes line~\ref{code:Sconstruction} while $m \in (\unordered \setminus \ordered)$. At that iteration, for some round $r$, process $p_i$ constructs $S$ containing $m$ and invokes $\RBcast(PROP, S, \langle r, i \rangle)$ at line~\ref{code:submit-proposition}.
|
||||
|
||||
We distinguish two cases:
|
||||
\begin{itemize}
|
||||
\item \textbf{Case 1: $p_i$ is a winner.} If $p_i \in \Winners_r$ for this round $r$, then by \Cref{def:winner-invariant} and program order, $p_i$ has invoked $\RBcast(PROP, S, \langle r, i \rangle)$ with $m \in S$, and the lemma holds with $j = i$.
|
||||
|
||||
\item \textbf{Case 2: $p_i$ is not a winner.} If $p_i \notin \Winners_r$, then by the \RB \emph{Validity} property, all correct processes eventually \textsf{rdeliver} $p_i$'s message. By line~\ref{code:receivedConstruction}, each correct process $p_k$ adds $m$ to its own $\mathit{unordered}$ set. Hence every correct process will eventually attempt to broadcast $m$ in some subsequent round.
|
||||
\item \textbf{Case 2: $p_i$ is not a winner.} If $p_i \notin \Winners_r$, then by the \RB \emph{Validity} property, all correct processes eventually \rdeliver $p_i$'s message. By line~\ref{code:receivedConstruction}, each correct process $p_k$ adds $m$ to its own $\unordered$ set. Hence every correct process will eventually attempt to broadcast $m$ in some subsequent round.
|
||||
|
||||
Since there are infinitely many rounds and finitely many processes, and by \Cref{lem:nonempty} every closed round has at least one winner, there must exist a round $r'$ and a correct process $p_j \in \Winners_{r'}$ such that $m \in (\mathit{unordered} \setminus \mathit{ordered})$ when $p_j$ constructs its proposal $S$ at line~\ref{code:Sconstruction} for round $r'$. Hence $p_j$ invokes $\RBcast(PROP, S, \langle r', j \rangle)$ with $m \in S$.
|
||||
Since there are infinitely many rounds and finitely many processes, and by \Cref{lem:nonempty} every closed round has at least one winner, there must exist a round $r'$ and a correct process $p_j \in \Winners_{r'}$ such that $m \in (\unordered \setminus \ordered)$ when $p_j$ constructs its proposal $S$ at line~\ref{code:Sconstruction} for round $r'$. Hence $p_j$ invokes $\RBcast(PROP, S, \langle r', j \rangle)$ with $m \in S$.
|
||||
\end{itemize}
|
||||
|
||||
In both cases, there exists a round and a winner whose proposal includes $m$.
|
||||
@@ -265,7 +265,7 @@ We present below an example of implementation of Atomic Reliable Broadcast (\ARB
|
||||
\begin{proof}
|
||||
Let consider two invokations of $\ABdeliver()$ made by the same correct process which returns $m$. Let call these two invocations respectively $\ABdeliver^{(A)}()$ and $\ABdeliver^{(B)}()$.
|
||||
|
||||
When $\ABdeliver^{(A)}()$ occurs, by program order and because it reached line~\ref{code:adeliver-mark} to return $m$, the process must have add $m$ to $\delivered$. Hence when $\ABdeliver^{(B)}()$ reached line~\ref{code:adeliver-extract} to extract the next message to deliver, it can't be $m$ because $m \not\in (\mathit{ordered} \setminus \mathit{delivered})$. So a $\ABdeliver^{(B)}()$ which delivers $m$ can't occur.
|
||||
When $\ABdeliver^{(A)}()$ occurs, by program order and because it reached line~\ref{code:adeliver-mark} to return $m$, the process must have add $m$ to $\delivered$. Hence when $\ABdeliver^{(B)}()$ reached line~\ref{code:adeliver-extract} to extract the next message to deliver, it can't be $m$ because $m \not\in (\ordered \setminus \delivered)$. So a $\ABdeliver^{(B)}()$ which delivers $m$ can't occur.
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[Total order]\label{lem:total-order}
|
||||
|
||||
@@ -4,7 +4,7 @@ We consider a static set $\Pi$ of $n$ processes with known identities, communica
|
||||
|
||||
\paragraph{Synchrony.} The network is asynchronous.
|
||||
|
||||
\paragraph{Communication.} Processes can exchange through a Reliable Broadcast ($\RB$) primitive (defined below) which is invoked with the functions $\RBcast(m)$ and $m = \RBreceived()$. There exists a shared object called DenyList ($\DL$) (defined below) that is interfaced with a set $O$ of operations. There exist three types of these operations: $\APPEND(x)$, $\PROVE(x)$ and $\READ()$.
|
||||
\paragraph{Communication.} Processes can exchange through a Reliable Broadcast ($\RB$) primitive (defined below) which is invoked with the functions $\RBcast(m)$ and $m = \rbreceived()$. There exists a shared object called DenyList ($\DL$) (defined below) that is interfaced with a set $O$ of operations. There exist three types of these operations: $\APPEND(x)$, $\PROVE(x)$ and $\READ()$.
|
||||
|
||||
\paragraph{Byzantine behaviour}
|
||||
A process is said to exhibit Byzantine behaviour if it deviates arbitrarily from the prescribed algorithm. Such deviations may, for instance, consist in invoking primitives ($\RBcast$, $\APPEND$, $\PROVE$, etc.) with invalid inputs or inputs crafted maliciously, colluding with other Byzantine processes in an attempt to manipulate the system state or violate its guarantees, deliberately delaying or accelerating the delivery of messages to selected nodes so as to disrupt the expected timing of operations, or withholding messages and responses in order to induce inconsistencies in the system state.
|
||||
@@ -65,21 +65,21 @@ For each $U \in \mathcal{U}$, we instantiate one DenyList object $DL_U$ whose au
|
||||
\vspace{1em}
|
||||
|
||||
\Fn{$\BFTPROVE(x)$}{
|
||||
$state \gets false$\;
|
||||
$\state \gets false$\;
|
||||
\For{\textbf{each } $U \in \mathcal{U}$}{
|
||||
$state \gets state \textbf{ OR } DL_U.\PROVE(x)$\;\nllabel{code:prove-or}
|
||||
$\state \gets \state \textbf{ OR } DL_U.\PROVE(x)$\;\nllabel{code:prove-or}
|
||||
}
|
||||
\Return{$state$}\;
|
||||
\Return{$\state$}\;
|
||||
}
|
||||
|
||||
\vspace{1em}
|
||||
|
||||
\Fn{$\BFTREAD()$}{
|
||||
$results \gets \emptyset$\;
|
||||
$\results \gets \emptyset$\;
|
||||
\For{\textbf{each } $U \in \mathcal{U}$}{
|
||||
$results \gets results \cup DL_U.\READ()$\;
|
||||
$\results \gets \results \cup DL_U.\READ()$\;
|
||||
}
|
||||
\Return{$results$}\;
|
||||
\Return{$\results$}\;
|
||||
}
|
||||
\end{algorithm}
|
||||
|
||||
@@ -92,7 +92,7 @@ For each $U \in \mathcal{U}$, we instantiate one DenyList object $DL_U$ whose au
|
||||
|
||||
\begin{itemize}
|
||||
\item \textbf{Case (i): $|A|\ge t+1$.}
|
||||
Fix any $U\in\mathcal{U}$. $A\cap U\neq\emptyset$. Pick $j\in A\cap U$. Since $j\in U$, the call $\BFTAPPEND_j(x)$ triggers $DL_U.\APPEND(x)$, and because $\BFTAPPEND_j(x)\prec op$ in $\Seq$, this induces a valid $DL_U.\APPEND(x)$ that appears before the induced $DL_U.\PROVE(x)$ by $p_i$. By \textbf{PROVE Validity} of $\DL$, the induced $DL_U.\PROVE(x)$ is invalid. As this holds for every $U\in\mathcal{U}$, there is \emph{no} component $DL_U$ where $\PROVE(x)$ is valid, so the field $state$ at line~\ref{code:prove-or} is never becoming true, and $op$ return false.
|
||||
Fix any $U\in\mathcal{U}$. $A\cap U\neq\emptyset$. Pick $j\in A\cap U$. Since $j\in U$, the call $\BFTAPPEND_j(x)$ triggers $DL_U.\APPEND(x)$, and because $\BFTAPPEND_j(x)\prec op$ in $\Seq$, this induces a valid $DL_U.\APPEND(x)$ that appears before the induced $DL_U.\PROVE(x)$ by $p_i$. By \textbf{PROVE Validity} of $\DL$, the induced $DL_U.\PROVE(x)$ is invalid. As this holds for every $U\in\mathcal{U}$, there is \emph{no} component $DL_U$ where $\PROVE(x)$ is valid, so the field $\state$ at line~\ref{code:prove-or} is never becoming true, and $op$ return false.
|
||||
|
||||
\item \textbf{Case (ii): $|A|\le t$.}
|
||||
There exists $U^\star\in\mathcal{U}$ such that $A\cap U^\star=\emptyset$. For any $j\in A$, we have $j\notin U^\star$, so $\BFTAPPEND_j(x)$ does \emph{not} call $DL_{U^\star}.\APPEND(x)$. Hence no valid $DL_{U^\star}.\APPEND(x)$ appears before the induced $DL_{U^\star}.\PROVE(x)$. Since also $i\in \Pi_V(DL_{U^\star})$, by \textbf{PROVE Validity} of $\DL$ the induced $DL_{U^\star}.\PROVE(x)$ is valid. Therefore, there exists a component with a valid $\PROVE(x)$, so $op$ is valid.
|
||||
@@ -177,72 +177,72 @@ For each $U \in \mathcal{U}$, we instantiate one DenyList object $DL_U$ whose au
|
||||
|
||||
\SetKwBlock{LocalVars}{Local Variables:}{}
|
||||
\LocalVars{
|
||||
$\mathit{unordered} \gets \emptyset$,
|
||||
$\mathit{ordered} \gets \epsilon$,
|
||||
$\mathit{delivered} \gets \epsilon$\;
|
||||
$\mathit{prop}[r][j] \gets \bot, \forall j, r \in \Pi \times \mathbb{N}$\;
|
||||
$\mathit{done}[r] \gets \emptyset, \forall r \in \mathbb{N}$\;
|
||||
$\unordered \gets \emptyset$,
|
||||
$\ordered \gets \epsilon$,
|
||||
$\delivered \gets \epsilon$\;
|
||||
$\prop[r][j] \gets \bot, \forall j, r \in \Pi \times \mathbb{N}$\;
|
||||
$\done[r] \gets \emptyset, \forall r \in \mathbb{N}$\;
|
||||
}
|
||||
|
||||
\vspace{0.3em}
|
||||
|
||||
\For{$r = 1, 2, \ldots$}{
|
||||
\textbf{wait until} $\mathit{unordered} \setminus \mathit{ordered} \neq \emptyset$\;
|
||||
$S \gets \mathit{unordered} \setminus \mathit{ordered}$;
|
||||
\textbf{wait until} $\unordered \setminus \ordered \neq \emptyset$\;
|
||||
$S \gets \unordered \setminus \ordered$;
|
||||
$\RBcast(i, \texttt{PROP}, S, r)$\;
|
||||
|
||||
\textbf{wait until} $|\textsf{validated}(r)| \geq n - t$\;
|
||||
\textbf{wait until} $|\validated(r)| \geq n - t$\;
|
||||
|
||||
\ForEach{$j \in \Pi$}{
|
||||
$\BFTAPPEND(\langle j, r\rangle)$\;
|
||||
}
|
||||
|
||||
\ForEach{$j \in \Pi$}{
|
||||
$\textsf{send}(j, \texttt{DONE}, r)$\;
|
||||
$\send(j, \texttt{DONE}, r)$\;
|
||||
}
|
||||
\textbf{wait until} $|\mathit{done}[r]| \geq n - t$\;
|
||||
\textbf{wait until} $|\done[r]| \geq n - t$\;
|
||||
|
||||
$\mathit{winners}[r] \gets \textsf{validated}(r)$\;
|
||||
$\winners[r] \gets \validated(r)$\;
|
||||
|
||||
\textbf{wait until} $\forall j \in \mathit{winners}[r],\ \mathit{prop}[r][j] \neq \bot$\;
|
||||
$M \gets \bigcup_{j \in \mathit{winners}[r]} \mathit{prop}[r][j]$\;\nllabel{code:Mcompute}
|
||||
$\mathit{ordered} \gets \mathit{ordered} \cdot \ordered(M)$\;
|
||||
\textbf{wait until} $\forall j \in \winners[r],\ \prop[r][j] \neq \bot$\;
|
||||
$M \gets \bigcup_{j \in \winners[r]} \prop[r][j]$\;\nllabel{code:Mcompute}
|
||||
$\ordered \gets \ordered \cdot \ordered(M)$\;
|
||||
}
|
||||
|
||||
\vspace{0.3em}
|
||||
|
||||
\Fn{\textsf{validated}($r$)}{
|
||||
\Fn{\validated($r$)}{
|
||||
\Return{$\{j: |\{k: (k, r) \in \BFTREAD()\}| \geq t+1\}$}\;
|
||||
}
|
||||
|
||||
\vspace{0.3em}
|
||||
|
||||
\Upon{$\ABbroadcast(m)$}{
|
||||
$\mathit{unordered} \gets \mathit{unordered} \cup \{m\}$\;
|
||||
$\unordered \gets \unordered \cup \{m\}$\;
|
||||
}
|
||||
|
||||
\vspace{0.3em}
|
||||
|
||||
\Upon{$\textsf{rdeliver}(\texttt{PROP}, S, \langle j, r \rangle)$ from process $p_j$}{
|
||||
$\mathit{unordered} \gets \mathit{unordered} \cup S$;
|
||||
$\mathit{prop}[r][j] \gets S$\;
|
||||
\Upon{$\rdeliver(\texttt{PROP}, S, \langle j, r \rangle)$ from process $p_j$}{
|
||||
$\unordered \gets \unordered \cup S$;
|
||||
$\prop[r][j] \gets S$\;
|
||||
$\BFTPROVE(\langle j, r\rangle)$\;
|
||||
}
|
||||
|
||||
\vspace{0.3em}
|
||||
|
||||
\Upon{$\textsf{receive}(\texttt{DONE}, r)$ from process $p_j$}{
|
||||
$\mathit{done}[r] \gets \mathit{done}[r] \cup \{j\}$\;
|
||||
\Upon{$\receive(\texttt{DONE}, r)$ from process $p_j$}{
|
||||
$\done[r] \gets \done[r] \cup \{j\}$\;
|
||||
}
|
||||
|
||||
\vspace{0.3em}
|
||||
|
||||
\Upon{$\ABdeliver()$}{
|
||||
\If{$\mathit{ordered} \setminus \mathit{delivered} = \emptyset$}{
|
||||
\If{$\ordered \setminus \delivered = \emptyset$}{
|
||||
\Return{$\bot$}
|
||||
}
|
||||
let $m$ be the first message in $\mathit{ordered} \setminus \mathit{delivered}$\;
|
||||
$\mathit{delivered} \gets \mathit{delivered} \cdot \{m\}$\;
|
||||
let $m$ be the first message in $\ordered \setminus \delivered$\;
|
||||
$\delivered \gets \delivered \cdot \{m\}$\;
|
||||
\Return{$m$}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
@@ -44,54 +44,59 @@
|
||||
\newtheorem{remark}{Remark}
|
||||
|
||||
\newcommand{\RB}{\textsf{RB}\xspace}
|
||||
\newcommand{\res}{\mathsf{res}}
|
||||
\newcommand{\ARB}{\textsf{ARB}\xspace}
|
||||
\newcommand{\DL}{\textsf{DL}}
|
||||
\newcommand{\APPEND}{\textsf{APPEND}}
|
||||
\newcommand{\PROVE}{\textsf{PROVE}}
|
||||
\newcommand{\PROVEtrace}{\textsf{prove}}
|
||||
\newcommand{\READ}{\textsf{READ}}
|
||||
\newcommand{\append}{\ensuremath{\mathsf{append}}}
|
||||
\newcommand{\prove}{\ensuremath{\mathsf{prove}}}
|
||||
\newcommand{\PROVEtrace}{\ensuremath{\mathsf{prove}}}
|
||||
\newcommand{\readop}{\ensuremath{\mathsf{read}}}
|
||||
|
||||
\newcommand{\BFTAPPEND}{\textsf{BFT\text{-}APPEND}}
|
||||
\newcommand{\BFTPROVE}{\textsf{BFT\text{-}PROVE}}
|
||||
\newcommand{\BFTREAD}{\textsf{BFT\text{-}READ}}
|
||||
% Backward compatibility aliases
|
||||
\newcommand{\APPEND}{\append}
|
||||
\newcommand{\PROVE}{\prove}
|
||||
\newcommand{\READ}{\readop}
|
||||
|
||||
\newcommand{\BFTAPPEND}{\textsc{bft-append}}
|
||||
\newcommand{\BFTPROVE}{\textsc{bft-prove}}
|
||||
\newcommand{\BFTREAD}{\textsc{bft-read}}
|
||||
|
||||
\newcommand{\ABbroadcast}{\textsf{ABroadcast}}
|
||||
\newcommand{\ABdeliver}{\textsf{ADeliver}}
|
||||
\newcommand{\RBcast}{\textsf{RBroadcast}}
|
||||
\newcommand{\RBreceived}{\textsf{RReceived}}
|
||||
\newcommand{\ordered}{\textsf{order}}
|
||||
\newcommand{\ABbroadcast}{\textsc{abroadcast}}
|
||||
\newcommand{\ABdeliver}{\textsc{adeliver}}
|
||||
\newcommand{\validated}{\ensuremath{\textsc{validated}}}
|
||||
\newcommand{\rbcast}{\ensuremath{\mathsf{rbcast}}}
|
||||
\newcommand{\rbreceived}{\ensuremath{\mathsf{rreceived}}}
|
||||
% \newcommand{\ordered}{\ensuremath{\mathsf{order}}}
|
||||
|
||||
% Backward compatibility aliases
|
||||
\newcommand{\RBcast}{\rbcast}
|
||||
|
||||
\newcommand{\rdeliver}{\ensuremath{\mathsf{rdeliver}}}
|
||||
\newcommand{\send}{\ensuremath{\mathsf{send}}}
|
||||
\newcommand{\receive}{\ensuremath{\mathsf{receive}}}
|
||||
|
||||
% Local variables
|
||||
\newcommand{\unordered}{\ensuremath{\mathit{unordered}}}
|
||||
\newcommand{\ordered}{\ensuremath{\mathit{ordered}}}
|
||||
\newcommand{\delivered}{\ensuremath{\mathit{delivered}}}
|
||||
\newcommand{\prop}{\ensuremath{\mathit{prop}}}
|
||||
\newcommand{\winners}{\ensuremath{\mathit{winners}}}
|
||||
\newcommand{\done}{\ensuremath{\mathit{done}}}
|
||||
\newcommand{\res}{\ensuremath{\mathit{res}}}
|
||||
\newcommand{\flag}{\ensuremath{\mathit{flag}}}
|
||||
|
||||
%% Used in BFT-DL implementation
|
||||
\newcommand{\state}{\ensuremath{\mathit{state}}}
|
||||
\newcommand{\results}{\ensuremath{\mathit{results}}}
|
||||
|
||||
% Invariant/concept names (used in proofs)
|
||||
\newcommand{\Winners}{\mathsf{Winners}}
|
||||
\newcommand{\Messages}{\mathsf{Messages}}
|
||||
\newcommand{\ABlisten}{\textsf{AB-listen}}
|
||||
|
||||
\newcommand{\CANDIDATE}{\textsf{VOTE}}
|
||||
\newcommand{\CLOSE}{\textsf{COMMIT}}
|
||||
\newcommand{\READGE}{\textsf{RESULT}}
|
||||
|
||||
\newcommand{\SHARE}{\mathsf{SHARE}}
|
||||
\newcommand{\COMBINE}{\mathsf{COMBINE}}
|
||||
\newcommand{\VERIFY}{\mathsf{VERIFY}}
|
||||
|
||||
\newcommand{\RETRIEVE}{\mathsf{RETRIEVE}}
|
||||
\newcommand{\SUBMIT}{\mathsf{SUBMIT}}
|
||||
|
||||
\newcommand{\delivered}{\mathsf{delivered}}
|
||||
\newcommand{\received}{\mathsf{received}}
|
||||
\newcommand{\prop}{\mathsf{prop}}
|
||||
\newcommand{\resolved}{\mathsf{resolved}}
|
||||
\newcommand{\current}{\mathsf{current}}
|
||||
\newcommand{\received}{\ensuremath{\mathsf{received}}}
|
||||
\newcommand{\current}{\ensuremath{\mathsf{current}}}
|
||||
|
||||
\newcommand{\Seq}{\mathsf{Seq}}
|
||||
\newcommand{\GE}{\mathsf{GE}}
|
||||
\newcommand{\BFTDL}{\textsf{BFT\text{-}DL}}
|
||||
|
||||
\newcommand{\BFTGE}{\textsf{BFT\text{-}GE}}
|
||||
\newcommand{\BFTVOTE}{\textsf{BFT\text{-}VOTE}}
|
||||
\newcommand{\BFTCOMMIT}{\textsf{BFT\text{-}COMMIT}}
|
||||
\newcommand{\BFTRESULT}{\textsf{BFT\text{-}RESULT}}
|
||||
|
||||
|
||||
\crefname{theorem}{Theorem}{Theorems}
|
||||
\crefname{lemma}{Lemma}{Lemmas}
|
||||
@@ -112,7 +117,7 @@ We consider a static set $\Pi$ of $n$ processes with known identities, communica
|
||||
|
||||
\paragraph{Synchrony.} The network is asynchronous.
|
||||
|
||||
\paragraph{Communication.} Processes can exchange through a Reliable Broadcast ($\RB$) primitive (defined below) which is invoked with the functions $\RBcast(m)$ and $m = \RBreceived()$. There exists a shared object called DenyList ($\DL$) (defined below) that is interfaced with a set $O$ of operations. There exist three types of these operations: $\APPEND(x)$, $\PROVE(x)$ and $\READ()$.
|
||||
\paragraph{Communication.} Processes can exchange through a Reliable Broadcast ($\RB$) primitive (defined below) which is invoked with the functions $\RBcast(m)$ and $m = \rbreceived()$. There exists a shared object called DenyList ($\DL$) (defined below) that is interfaced with a set $O$ of operations. There exist three types of these operations: $\APPEND(x)$, $\PROVE(x)$ and $\READ()$.
|
||||
|
||||
\paragraph{Notation.} For any indice $x$ we defined by $\Pi_x$ a subset of $\Pi$. We consider two subsets $\Pi_M$ and $\Pi_V$ two authorization subsets. Indices $i \in \Pi$ refer to processes, and $p_i$ denotes the process with identifier $i$. Let $\mathcal{M}$ denote the universe of uniquely identifiable messages, with $m \in \mathcal{M}$. Let $\mathcal{R} \subseteq \mathbb{N}$ be the set of round identifiers; we write $r \in \mathcal{R}$ for a round. We use the precedence relation $\prec$ for the \DL{} linearization: $x \prec y$ means that operation $x$ appears strictly before $y$ in the linearized history of \DL. For any finite set $A \subseteq \mathcal{M}$, \ordered$(A)$ returns a deterministic total order over $A$ (e.g., lexicographic order on $(\textit{senderId},\textit{messageId})$ or on message hashes).
|
||||
For any operation $F \in O$,$F_i(...)$ denotes that the operation $F$ is invoked by process $p_i$.
|
||||
@@ -225,11 +230,11 @@ Such that :
|
||||
\begin{algorithm}[H]
|
||||
\caption{$\READ'() \rightarrow \mathcal{L}(\mathbb{R} \times \PROVEtrace(\mathbb{R}))$}
|
||||
$j \gets$ the process invoking $\READ'()$\;
|
||||
$res \gets \emptyset$\;
|
||||
$\res \gets \emptyset$\;
|
||||
\ForAll{$i \in \{1, \dots, k\}$}{
|
||||
$res \gets res \cup DL_i.\READ()$\;
|
||||
$\res \gets \res \cup DL_i.\READ()$\;
|
||||
}
|
||||
\Return{$res$}\;
|
||||
\Return{$\res$}\;
|
||||
\end{algorithm}
|
||||
|
||||
\begin{algorithm}[H]
|
||||
@@ -243,11 +248,11 @@ Such that :
|
||||
\begin{algorithm}[H]
|
||||
\caption{$\PROVE'(\sigma) \rightarrow \{0, 1\}$}
|
||||
$j \gets$ the process invoking $\PROVE'(\sigma)$\;
|
||||
$flag \gets false$\;
|
||||
$\flag \gets false$\;
|
||||
\ForAll{$i \in \{1, \dots, k\}$}{
|
||||
$flag \gets flag$ OR $DL_i.\PROVE(\sigma)$\;
|
||||
$\flag \gets \flag$ OR $DL_i.\PROVE(\sigma)$\;
|
||||
}
|
||||
\Return{$flag$}\;
|
||||
\Return{$\flag$}\;
|
||||
\end{algorithm}
|
||||
|
||||
\subsection{Threshold Cryptography}
|
||||
|
||||
Reference in New Issue
Block a user