Compare commits
5 Commits
921dd502e3
...
18448b481e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18448b481e | ||
|
|
94b22408e5 | ||
|
|
8f51a7eed6 | ||
|
|
cc22c9d7f3 | ||
|
|
268c30a112 |
@@ -6,7 +6,7 @@
|
||||
"containerEnv": { //Add your build arguments here
|
||||
"DEBIAN_FRONTEND": "noninteractive"
|
||||
},
|
||||
"runArgs": ["--net=host"], //Add you docker run arguments here
|
||||
// "runArgs": ["--net=host"], //Add you docker run arguments here
|
||||
"updateContentCommand": ".devcontainer/install-tools.sh", //Path to the installation script run inside the DevContainer
|
||||
// "customizations": {
|
||||
// //Add your customizations here
|
||||
|
||||
@@ -225,7 +225,7 @@ Each process $p_i$ maintains:
|
||||
% ------------------------------------------------------------------------------
|
||||
\section{Correctness}
|
||||
|
||||
\begin{lemma}[Stable round closure]\label{lem:closure-stable}
|
||||
\begin{lemma}[Stable round closure]\label{rem:closure-stable}
|
||||
If a round $r$ is closed, then there exists a linearization point $t_0$ of $\APPEND(r)$ in the \DL, and from that point on, no $\PROVE(r)$ can be valid.
|
||||
Once closed, a round never becomes open again.
|
||||
\end{lemma}
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
\RB provides the following properties in the model.
|
||||
\begin{itemize}[leftmargin=*]
|
||||
\item \textbf{Integrity}: Every message received was previously sent. $\forall p_i:\ \RBreceived_i(m) \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}
|
||||
|
||||
\subsection{DenyList Object}
|
||||
|
||||
We assume a synchronous DenyList (\DL) object as in~\cite{frey:disc23} with the following properties.
|
||||
We assume a linearizable DenyList (\DL) object as in~\cite{frey:disc23} with the following properties.
|
||||
|
||||
The DenyList object type supports three operations: $\APPEND$, $\PROVE$, and $\READ$. These operations appear as if executed in a sequence $\Seq$ such that:
|
||||
\begin{itemize}
|
||||
@@ -17,18 +17,18 @@
|
||||
\item \textbf{APPEND Validity.} The invocation of $\APPEND(x)$ by a process $p$ is valid if:
|
||||
\begin{itemize}
|
||||
\item $p \in \Pi_M \subseteq \Pi$; \textbf{and}
|
||||
\item $x \in S$, where $S$ is a predefined set.
|
||||
\item $x \in S$, where $S$ denote the universe of valid entries to be appended to the DenyList.
|
||||
\end{itemize}
|
||||
Otherwise, the operation is invalid.
|
||||
\item \textbf{PROVE Validity.} If the invocation of a $op = \PROVE(x)$ by a correct process $p$ is not valid, then:
|
||||
\item \textbf{PROVE Validity.} Let $op$ the invocation of $\PROVE(x)$ by a process $p_i$. We said $op$ to be invalid, if and only if:
|
||||
\begin{itemize}
|
||||
\item $p \not\in \Pi_V \subseteq \Pi$; \textbf{or}
|
||||
\item A valid $\APPEND(x)$ appears before $op$ in $\Seq$.
|
||||
\end{itemize}
|
||||
Otherwise, the operation is valid.
|
||||
Otherwise, the operation is said to be valid.
|
||||
\item \textbf{PROVE Anti-Flickering.} If the invocation of a operation $op = \PROVE(x)$ by a correct process $p \in \Pi_V$ is invalid, then any $\PROVE(x)$ operation that appears after $op$ in $\Seq$ is invalid.
|
||||
\item \textbf{READ Validity.} The invocation of $op = \READ()$ by a process $p \in \pi_V$ returns the list of valid invocations of $\PROVE$ that appears before $op$ in $\Seq$ along with the names of the processes that invoked each operation.
|
||||
item \textbf{Anonymity.} Let us assume the process $p$ invokes a $\PROVE(v)$ operation. If the process $p'$ invokes a $\READ()$ operation, then $p'$ cannot learn the value $v$ unless $p$ leaks additional information.
|
||||
% \item \textbf{Anonymity.} Let us assume the process $p$ invokes a $\PROVE(v)$ operation. If the process $p'$ invokes a $\READ()$ operation, then $p'$ cannot learn the value $v$ unless $p$ leaks additional information.
|
||||
\end{itemize}
|
||||
|
||||
We assume that $\Pi_M = \Pi_V = \Pi$ (all processes can invoke \APPEND and \PROVE).
|
||||
We assume that $\Pi_M = \Pi_V = \Pi$ (all processes can invoke $\APPEND$ and $\PROVE$).
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
Processes export \ABbroadcast$(m)$ and \ABdeliver$(m)$. \ARB requires total order:
|
||||
Processes export \ABbroadcast$(m)$ and $m = \ABdeliver()$. \ARB requires total order:
|
||||
\begin{equation*}
|
||||
\forall m_1,m_2,\ \forall p_i,p_j:\ \ \ABdeliver_i(m_1) < \ABdeliver_i(m_2) \Rightarrow \ABdeliver_j(m_1) < \ABdeliver_j(m_2),
|
||||
\forall m_1,m_2,\ \forall p_i,p_j:\ \ (m_1 = \ABdeliver_i()) \prec (m_2 = \ABdeliver_i()) \Rightarrow (m_1 = \ABdeliver_j()) \prec (m_2 = \ABdeliver_j())
|
||||
\end{equation*}
|
||||
plus Integrity/No-duplicates/Validity (inherited from \RB and the construction).
|
||||
@@ -4,94 +4,90 @@ We present below an example of implementation of Atomic Reliable Broadcast (\ARB
|
||||
% granularité diff commentaire de code et paragraphe pre algo
|
||||
|
||||
\begin{definition}[Closed round]\label{def:closed-round}
|
||||
Given a \DL{} linearization $H$, a round $r\in\mathcal{R}$ is \emph{closed} in $H$ iff $H$ contains an operation $\APPEND(r)$.
|
||||
Given a \DL{} linearization $H$, a round $r\in\mathcal{R}$ is \emph{closed} in $H$ if $H$ contains an operation $\APPEND(r)$.
|
||||
Equivalently, there exists a time after which every $\PROVE(r)$ is invalid in $H$.
|
||||
\end{definition}
|
||||
|
||||
\subsubsection{Variables}
|
||||
Each process $p_i$ maintains:
|
||||
|
||||
%on met toutes les variables locales ici
|
||||
\begin{algorithmic}
|
||||
\State $\received \gets \emptyset$ \Comment{Messages received via \RB but not yet delivered}
|
||||
\State $\delivered \gets \emptyset$ \Comment{Messages already delivered}
|
||||
\State $\prop[r][j] \gets \bot,\ \forall r,j$ \Comment{Proposal from process $j$ for round $r$}
|
||||
\State $\current \gets 0$
|
||||
\end{algorithmic}
|
||||
\LinesNotNumbered
|
||||
\begin{algorithm}
|
||||
$\received \gets \emptyset$\; %\Comment{Messages received via \RB but not yet delivered}
|
||||
$\delivered \gets \emptyset$\; %\Comment{Messages already delivered}
|
||||
$\prop[r][j] \gets \bot,\ \forall r,j$\; %\Comment{Proposal from process $j$ for round $r$}
|
||||
$\current \gets 0$\;
|
||||
\end{algorithm}
|
||||
|
||||
\paragraph{DenyList.} The \DL is initialized empty. We assume $\Pi_M = \Pi_V = \Pi$ (all processes can invoke \APPEND and \PROVE).
|
||||
% \paragraph{DenyList.} The \DL is initialized empty. We assume $\Pi_M = \Pi_V = \Pi$ (all processes can invoke \APPEND and \PROVE).
|
||||
|
||||
\subsubsection{Handlers and Procedures}
|
||||
|
||||
\renewcommand{\algletter}{A}
|
||||
\LinesNumbered
|
||||
\begin{algorithm}[H]
|
||||
\caption{\RB handler (at process $p_i$)}\label{alg:rb-handler}
|
||||
\begin{algorithmic}[1]
|
||||
\Function{RBreceived}{$S, r, j$}
|
||||
% \State \textbf{on} $\RBreceived(S, r, j)$ \textbf{do}
|
||||
\State $\received \leftarrow \received \cup \{S\}$
|
||||
\State $\prop[r][j] \leftarrow S$ \Comment{Record sender $j$'s proposal $S$ for round $r$}
|
||||
\EndFunction
|
||||
\end{algorithmic}
|
||||
\Fn{RBreceived($S, r, j$)}{
|
||||
$\received \leftarrow \received \cup \{S\}$\;\nllabel{code:receivedConstruction}
|
||||
$\prop[r][j] \leftarrow S$\;\nllabel{code:prop-set} % \Comment{Record sender $j$'s proposal $S$ for round $r$}
|
||||
}
|
||||
\end{algorithm}
|
||||
|
||||
% \paragraph{} An \ABbroadcast$(m)$ chooses the next open round from the \DL view, proposes all pending messages together with the new $m$, disseminates this proposal via \RB, then executes $\PROVE(r)$ followed by $\APPEND(r)$ to freeze the winners of the round. The loop polls \DL until (i) some winner’s proposal includes $m$ in a \emph{closed} round and (ii) all winners' proposals for closed rounds are known locally, ensuring eventual inclusion and delivery.
|
||||
|
||||
\renewcommand{\algletter}{B}
|
||||
\begin{algorithm}[H]
|
||||
\begin{algorithm}[H]\label{alg:ABroadcast}
|
||||
\caption{\ABbroadcast$(m)$ (at process $p_i$)}\label{alg:ab-bcast}
|
||||
\begin{algorithmic}[1]
|
||||
\Function{ABbroadcast}{$m$}
|
||||
\State $P \leftarrow \READ()$ \Comment{Fetch latest \DL state to learn recent $\PROVE$ operations}
|
||||
\State $r_{max} \leftarrow \max(\{ r' : \exists j,\ (j,\PROVE(r')) \in P \})$ \Comment{Pick current open round}
|
||||
\State $S \leftarrow (\received \setminus \delivered) \cup \{m\}$ \Comment{Propose all pending messages plus the new $m$}
|
||||
\Fn{ABbroadcast($m$)}{
|
||||
$P \leftarrow \READ()$\;\nllabel{code:set-up-read} %\Comment{Fetch latest \DL state to learn recent $\PROVE$ operations}
|
||||
$r_{max} \leftarrow \max(\{ r' : \exists j,\ (j,r') \in P \})$\;\nllabel{code:rmax-compute} %\Comment{Pick current open round}
|
||||
$S \leftarrow (\received \setminus \delivered) \cup \{m\}$\;\nllabel{code:Sconstruction}
|
||||
%\Comment{Propose all pending messages plus the new $m$}
|
||||
|
||||
\vspace{1em}
|
||||
|
||||
\For{\textbf{each}\ $r \in \{r_{max}, r_{max}+1, \cdots \}$}
|
||||
\State $\RBcast(S, r, i)$; $\PROVE(r)$; $\APPEND(r)$;
|
||||
\State $P \leftarrow \READ()$ \Comment{Refresh local view of \DL}
|
||||
\If{($\big((i, \PROVEtrace(r)) \in P\ \vee\ (\exists j, r': (j, \PROVEtrace(r')) \in P \wedge \ m \in \prop[r'][j]))$)}
|
||||
\State \textbf{break} \Comment{Exit loop once $m$ is included in some closed round}
|
||||
\EndIf
|
||||
\EndFor
|
||||
\EndFunction
|
||||
\end{algorithmic}
|
||||
$r \gets r_{max} - 1$\;
|
||||
\While{$((i, r) \not\in P\ \wedge (\nexists j, r': (j, r') \in P \wedge m \in \prop[r'][j]))$}{\nllabel{code:sumbited-check-loop}
|
||||
$r \gets r + 1$\;\nllabel{code:round-increment}
|
||||
$\RBcast(S, r, i)$; $\PROVE(r)$; $\APPEND(r)$;\;\nllabel{code:submit-proposition}
|
||||
$P \leftarrow \READ()$\; % \Comment{Refresh local view of \DL}
|
||||
}
|
||||
}
|
||||
\end{algorithm}
|
||||
|
||||
\renewcommand{\algletter}{C}
|
||||
\begin{algorithm}[H]
|
||||
\begin{algorithm}[H]\label{alg:ADeliver}
|
||||
\caption{\ABdeliver() at process $p_i$}\label{alg:delivery}
|
||||
\begin{algorithmic}[1]
|
||||
\Function{ABdeliver}{}
|
||||
\State $r \gets \current$
|
||||
\State $P \gets \READ()$
|
||||
\If{$\forall j : (j, \PROVEtrace(r)) \not\in P$}
|
||||
\State \Return $\bot$
|
||||
\EndIf
|
||||
\State $\APPEND(r)$; $P \gets \READ()$
|
||||
\State $W_r \gets \{ j : (j, \PROVEtrace(r)) \in P \}$
|
||||
\If{$\exists j \in W_r,\ \prop[r][j] = \bot$}
|
||||
\State \Return $\bot$
|
||||
\EndIf
|
||||
\State $M_r \gets \bigcup_{j \in W_r} \prop[r][j]$
|
||||
\State $m \gets \ordered(M_r \setminus \delivered)[0]$ \Comment{Set $m$ as the smaller message not already delivered}
|
||||
\State $\delivered \leftarrow \delivered \cup \{m\}$
|
||||
\If{$M_r \setminus \delivered = \emptyset$} \Comment{Check if all messages from round $r$ have been delivered}
|
||||
\State $\current \leftarrow \current + 1$
|
||||
\EndIf
|
||||
\State \textbf{return} $m$
|
||||
\EndFunction
|
||||
\end{algorithmic}
|
||||
\Fn{ABdeliver($\bot$)}{
|
||||
$r \gets \current$\;
|
||||
$P_r \gets \{(j,r): (j,r) \in \READ()\}$ \;
|
||||
\If{$P_r = \emptyset$}{\nllabel{code:check-if-winners}
|
||||
\Return{$\bot$}
|
||||
}
|
||||
$\APPEND(r)$; $P \gets \READ()$\; \nllabel{code:append-read}
|
||||
$W_r \gets \{ j : (j, \PROVEtrace(r)) \in P \}$\;\nllabel{code:Wcompute}
|
||||
\If{$\exists j \in W_r,\ \prop[r][j] = \bot$}{ \nllabel{code:check-winners-ack}
|
||||
\Return{$\bot$}
|
||||
}
|
||||
$M_r \gets \bigcup_{j \in W_r} \prop[r][j]$\;\nllabel{code:Mcompute}
|
||||
$m \gets \ordered(M_r \setminus \delivered)[0]$\;\nllabel{code:next-msg-extraction}
|
||||
%\Comment{Set $m$ as the smaller message not already delivered}
|
||||
$\delivered \leftarrow \delivered \cup \{m\}$\;
|
||||
\If{$M_r \setminus \delivered = \emptyset$}{ %\Comment{Check if all messages from round $r$ have been delivered}
|
||||
$\current \leftarrow \current + 1$
|
||||
}
|
||||
\Return{$m$}
|
||||
}
|
||||
\end{algorithm}
|
||||
|
||||
% ------------------------------------------------------------------------------
|
||||
\subsection{Correctness}
|
||||
|
||||
\begin{lemma}[Stable round closure]\label{lem:closure-stable}
|
||||
If a round $r$ is closed, then there exists a linearization point $t_0$ of $\APPEND(r)$ in the \DL, and from that point on, no $\PROVE(r)$ can be valid.
|
||||
Once closed, a round never becomes open again.
|
||||
\end{lemma}
|
||||
\begin{definition}[First APPEND]\label{def:first-append}
|
||||
Given a \DL{} linearization $H$, for any closed round $r\in\mathcal{R}$, we denote by $\APPEND^{(\star)}(r)$ the earliest $\APPEND(r)$ in $H$.
|
||||
\end{definition}
|
||||
|
||||
\begin{remark}[Stable round closure]\label{rem:closure-stable}
|
||||
If a round $r$ is closed, then there exists a linearization point $t_0$ of $\APPEND(r)$ in the \DL, and from that point on, no $\PROVE(r)$ can be valid.
|
||||
Once closed, a round never becomes open again.
|
||||
\end{remark}
|
||||
|
||||
\begin{proof}
|
||||
By \Cref{def:closed-round}, some $\APPEND(r)$ occurs in the linearization $H$. \\
|
||||
@@ -101,60 +97,58 @@ Once closed, a round never becomes open again.
|
||||
Hence there exists a linearization point $t_0$ of $\APPEND(r)$ in the \DL, and from that point on, no $\PROVE(r)$ can be valid and the closure is stable.
|
||||
\end{proof}
|
||||
|
||||
\begin{definition}[First APPEND]\label{def:first-append}
|
||||
Given a \DL{} linearization $H$, for any closed round $r\in\mathcal{R}$, we denote by $\APPEND^{(\star)}(r)$ the earliest $\APPEND(r)$ in $H$.
|
||||
\end{definition}
|
||||
|
||||
\begin{lemma}[Across rounds]\label{lem:across}
|
||||
If there exists a $r$ such that $r$ is closed, $\forall r'$ such that $r' < r$, r' is also closed.
|
||||
If there exists a $r$ such that $r$ is closed, $\forall r'$ such that $r' < r$, r' is also closed.
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}
|
||||
\emph{Base.} For a closed round $k=0$, the set $\{k' \in \mathcal{R},\ k' < k\}$ is empty, hence the lemma is true.
|
||||
\emph{Base.} For a closed round $r=0$, the set $\{r' \in \mathcal{R},\ r' < r\}$ is empty, hence the lemma is true.
|
||||
|
||||
\emph{Induction.} Assume the lemma is true for round $k\geq 0$, we prove it for round $k+1$.
|
||||
\emph{Induction.} Assume the lemma is true for round $r\geq 0$, we prove it for round $r+1$.
|
||||
|
||||
\smallskip
|
||||
Assume $k+1$ is closed and let $\APPEND^{(\star)}(k+1)$ be the earliest $\APPEND(k+1)$ in the DL linearization $H$.
|
||||
By Lemma 1, after an $\APPEND(k)$ is in $H$, any later $\PROVE(k)$ is rejected also, a process’s program order is preserved in $H$.
|
||||
Assume $r+1$ is closed and by \cref{def:first-append} $\APPEND^{(\star)}(r+1)$ be the earliest $\APPEND(r+1)$ in the DL linearization $H$.
|
||||
By Lemma 1, after an $\APPEND(r)$ were in $H$, any later $\PROVE(r)$ will be invalid also, a process’s program order is preserved in $H$.
|
||||
|
||||
There are two possibilities for where $\APPEND^{(\star)}(k+1)$ is invoked.
|
||||
There are two possibilities for where $\APPEND^{(\star)}(r+1)$ is invoked.
|
||||
|
||||
\begin{itemize}
|
||||
\item \textbf{Case (B6) :}
|
||||
Some process $p^\star$ executes the loop (lines B5–B11) and invokes $\APPEND^{(\star)}(k+1)$ at line B6.
|
||||
Immediately before line B6, line B5 sets $r\leftarrow r+1$, so the previous loop iteration (if any) targeted $k$. We consider two sub-cases.
|
||||
\item \textbf{Case Algorithm \ref{alg:ABroadcast} :}
|
||||
Some process executes the loop at \ref{code:sumbited-check-loop} and invokes $\PROVE(r+1);\APPEND^{(\star)}(r+1)$ at line~\ref{code:submit-proposition}. Let $p_i$ be this process.
|
||||
Immediately before line~\ref{code:submit-proposition}, line~\ref{code:round-increment} sets $r\leftarrow r+1$, so the previous loop iteration targeted $r$. We consider two sub-cases.
|
||||
|
||||
\begin{itemize}
|
||||
\item \emph{(i) $p^\star$ is not in its first loop iteration.}
|
||||
In the previous iteration, $p^\star$ executed $\PROVE^{(\star)}(k)$ at B6, followed (in program order) by $\APPEND^{(\star)}(k)$.
|
||||
If round $k$ wasn't closed when $p^\star$ execute $\PROVE^{(\star)}(k)$ at B9, then the condition at B8 would be true hence the tuple $(p^\star, \PROVEtrace(k))$ should be visible in P which implies that $p^\star$ should leave the loop at round $k$, contradicting the assumption that $p^\star$ is now executing another iteration.
|
||||
Since the tuple is not visible, the $\PROVE^{(\star)}(k)$ was rejected by the DL which implies by definition an $\APPEND(k)$ already exists in $H$. Thus in this case $k$ is closed.
|
||||
\item \emph{(i) $p_i$ is not in its first loop iteration.}
|
||||
In the previous iteration, $p_i$ executed $\PROVE_i(r)$ at \ref{code:submit-proposition}, followed (in program order) by $\APPEND_i(r)$.
|
||||
If round $r$ wasn't closed when $p_i$ execute $\PROVE_i(r)$ at \ref{code:submit-proposition}, then the condition at \ref{code:sumbited-check-loop} would be true hence the tuple $(i, r)$ should be visible in P which implies that $p_i$ should leave the loop at round $r$, contradicting the assumption that $p_i$ is now executing another iteration.
|
||||
Since the tuple is not visible, the $\PROVE_i(r)$ was invalid which implies by definition that an $\APPEND(r)$ already exists in $H$. Thus in this case $r$ is closed.
|
||||
|
||||
\item \emph{(ii) $p^\star$ is in its first loop iteration.}
|
||||
To compute the value $r_{max}$, $p^\star$ must have observed one or many $(\_ , \PROVEtrace(k+1))$ in $P$ at B2/B3, issued by some processes (possibly different from $p^\star$). Let's call $p_1$ the issuer of the first $\PROVE^{(1)}(k+1)$ in the linearization $H$. \\
|
||||
When $p_1$ executed $P \gets \READ()$ at B2 and compute $r_{max}$ at B3, he observed no tuple $(\_,\PROVEtrace(k+1))$ in $P$ because he's the issuer of the first one. So when $p_1$ executed the loop (B5–B11), he run it for the round $k$, didn't seen any $(1,\PROVEtrace(k))$ in $P$ at B8, and then executed the first $\PROVE^{(1)}(k+1)$ at B6 in a second iteration. \\
|
||||
If round $k$ wasn't closed when $p_1$ execute $\PROVE^{(1)}(k)$ at B6, then the condition at B8 should be true which implies that $p_1$ sould leave the loop at round $k$, contradicting the assumption that $p_1$ is now executing $\PROVE^{(1)}(r+1)$. In this case $k$ is closed.
|
||||
\item \emph{(ii) $p_i$ is in its first loop iteration.}
|
||||
To compute the value $r_{max}$, $p_i$ must have observed one or many $(\_ , r+1)$ in $P$ at \ref{code:rmax-compute}, issued by some processes (possibly different from $p_i$). Let's call $p_j$ the issuer of the first $\PROVE_j(r+1)$ in the linearization $H$. \\
|
||||
When $p_j$ executed $P \gets \READ()$ at \ref{code:set-up-read} and compute $r_{max}$ at \ref{code:rmax-compute}, he observed no tuple $(\_,r+1)$ in $P$ because he's the issuer of the first one. So when $p_j$ executed the loop (\ref{code:sumbited-check-loop}), he run it for the round $r$, didn't seen any $(j,r)$ in $P$ at B6, and then executed the first $\PROVE_j(r+1)$ at \ref{code:submit-proposition} in a second iteration. \\
|
||||
If round $r$ wasn't closed when $p_j$ execute $\PROVE_j(r)$ at \ref{code:submit-proposition}, then the $(j, r)$ will be in $P$ and the condition at \ref{code:sumbited-check-loop} should be true which implies that $p_j$ sould leave the loop at round $r$, contradicting the assumption that $p_j$ is now executing $\PROVE_j(r+1)$. In this case $r$ is closed.
|
||||
\end{itemize}
|
||||
|
||||
\item \textbf{Case (C8) :}
|
||||
Some process invokes $\APPEND(k+1)$ at C8.
|
||||
Line C8 is guarded by the presence of $\PROVE(\textit{next})$ in $P$ with $\textit{next}=k+1$ (C5).
|
||||
Moreover, the local pointer $\textit{next}$ grow by increment of 1 and only advances after finishing the current round (C17), so if a process can reach $\textit{next}=k+1$ it implies that he has completed round $k$, which includes closing $k$ at C8 when $\PROVE(k)$ is observed.
|
||||
Hence $\APPEND^\star(k+1)$ implies a prior $\APPEND(k)$ in $H$, so $k$ is closed.
|
||||
\item \textbf{Case Algorithm \ref{alg:ADeliver} :}
|
||||
Some process invokes $\APPEND(r+1)$ at \ref{code:append-read}. Let $p_i$ be this process.
|
||||
Line~\ref{code:append-read} is guarded by the condition at \ref{code:check-if-winners}, which ensures that $p_i$ observed some $(\_,r+1)$ in $P$. Let $p_j$ be the issuer of the first $\PROVE_j(r+1)$ in the linearization $H$.
|
||||
When $p_j$ executed $\PROVE_j(r+1)$ at \ref{code:submit-proposition}, he observed no tuple $(\_,r+1)$ in $P$ at \ref{code:check-if-winners} because he's the issuer of the first one. By the same reasoning as in the Case Algorithm \ref{alg:ABroadcast} (ii), $p_j$ must have observed that the round $r$ was closed.
|
||||
% Line C7 is guarded by the presence of $\PROVE(r)$ in $P$ with $r=r+1$ (C5).
|
||||
% Moreover, the local pointer $\textit{next}$ grow by increment of 1 and only advances after finishing the current round (C17), so if a process can reach $\textit{next}=r+1$ it implies that he has completed round $r$, which includes closing $r$ at C8 when $\PROVE(r)$ is observed.
|
||||
% Hence $\APPEND^\star(r+1)$ implies a prior $\APPEND(r)$ in $H$, so $r$ is closed.
|
||||
\end{itemize}
|
||||
|
||||
\smallskip
|
||||
In all cases, $k+1$ closed implie $k$ closed. By induction on $k$, if the lemme is true for a closed $k$ then it is true for a closed $k+1$.
|
||||
In all cases, $r+1$ closed implies $r$ closed. By induction on $r$, if the lemma is true for a closed $r$ then it is true for a closed $r+1$.
|
||||
Therefore, the lemma is true for all closed rounds $r$.
|
||||
\end{proof}
|
||||
|
||||
\begin{definition}[Winner Invariant]\label{def:winner-invariant}
|
||||
For any closed round $r$, define
|
||||
\[
|
||||
\Winners_r \triangleq \{ j : \PROVE^{(j)}(r) \prec \APPEND^\star(r) \}
|
||||
\Winners_r \triangleq \{ j : \PROVE_j(r) \prec \APPEND^\star(r) \}
|
||||
\]
|
||||
as the unique set of winners of round $r$.
|
||||
called the unique set of winners of round $r$.
|
||||
\end{definition}
|
||||
|
||||
\begin{lemma}[Invariant view of closure]\label{lem:closure-view}
|
||||
@@ -162,15 +156,15 @@ If there exists a $r$ such that $r$ is closed, $\forall r'$ such that $r' < r$,
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}
|
||||
Let's take a closed round $r$. By \Cref{def:first-append}, there exists a unique earliest $\APPEND(r)$ in the DL linearization, denoted $\APPEND^\star(r)$.
|
||||
Let's take a closed round $r$. By \Cref{def:first-append}, there exists $\APPEND^{(\star)}(r)$ the earliest $\APPEND(r)$ in the DL linearization.
|
||||
|
||||
Consider any correct process $p$ that invokes $\READ()$ after $\APPEND^\star(r)$ in the DL linearization. Since $\APPEND^\star(r)$ invalidates all subsequent $\PROVE(r)$, the set of valid tuples $(\_,\PROVEtrace(r))$ observed by any correct process after $\APPEND^\star(r)$ is fixed and identical across all correct processes.
|
||||
Consider any correct process $p_i$ that invokes $\READ()$ after $\APPEND^\star(r)$ in the DL linearization. Since $\APPEND^\star(r)$ invalidates all subsequent $\PROVE(r)$, the set of valid tuples $(\_,r)$ retrieved by a $\READ()$ after $\APPEND^\star(r)$ is fixed and identical across all correct processes.
|
||||
|
||||
Therefore, for any closed round $r$, all correct processes eventually observe the same set of valid tuples $(\_,\PROVEtrace(r))$ in their \DL view.
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[Well-defined winners]\label{lem:winners}
|
||||
For any correct process and round $r$, if the process computes $W_r$ at line C9, then :
|
||||
For any correct process $p_i$ and round $r$, if $p_i$ computes $W_r$ at line~\ref{code:Wcompute}, then :
|
||||
\begin{itemize}
|
||||
\item $\Winners_r$ is defined;
|
||||
\item the computed $W_r$ is exactly $\Winners_r$.
|
||||
@@ -178,11 +172,11 @@ If there exists a $r$ such that $r$ is closed, $\forall r'$ such that $r' < r$,
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}
|
||||
Let take a correct process $p_i$ that reach line C9 to compute $W_r$. \\
|
||||
By program order, $p_i$ must have executed $\APPEND^{(i)}(r)$ at C8 before, which implies by \Cref{def:closed-round} that round $r$ is closed. 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 $(\_,\PROVEtrace(r))$ in their \DL view. Hence, when $p_i$ executes the $\READ()$ at C8 after the $\APPEND^{(i)}(r)$, it observes a set $P$ that includes all valid tuples $(\_,\PROVEtrace(r))$ such that
|
||||
Lets consider a correct process $p_i$ that reach line~\ref{code:Wcompute} to compute $W_r$. \\
|
||||
By program order, $p_i$ must have executed $\APPEND_i(r)$ at line~\ref{code:append-read} 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:append-read} after the $\APPEND_i(r)$, it observes a set $P$ that includes all valid tuples $(\_,r)$ such that
|
||||
\[
|
||||
W_r = \{ j : (j,\PROVEtrace(r)) \in P \} = \{j : \PROVE^{(j)}(r) \prec \APPEND^\star(r) \} = \Winners_r
|
||||
W_r = \{ j : (j,r) \in P \} = \{j : \PROVE_j(r) \prec \APPEND^{(\star)}(r) \} = \Winners_r
|
||||
\]
|
||||
\end{proof}
|
||||
|
||||
@@ -194,59 +188,51 @@ If some process invokes $\APPEND(r)$, then at least a process must have previous
|
||||
Consider the round $r$ such that some process invokes $\APPEND(r)$. There are two possible cases
|
||||
|
||||
\begin{itemize}
|
||||
\item \textbf{Case (B6) :}
|
||||
There exists a process $p^\star$ who's the issuer of the earliest $\APPEND^{(\star)}(r)$ in the DL linearization $H$. By program order, $p^\star$ must have previously invoked $\PROVE^{(\star)}(r)$ before invoking $\APPEND^{(\star)}(r)$ at B6. In this case, there is at least one $\PROVE(r)$ valid in $H$ issued by a correct process before $\APPEND^{(\star)}(r)$.
|
||||
\item \textbf{Case (\ref{code:submit-proposition}) :}
|
||||
There exists a process $p_i$ who's the issuer of the earliest $\APPEND^{(\star)}(r)$ in the DL linearization $H$. By program order, $p_i$ must have previously invoked $\PROVE_i(r)$ before invoking $\APPEND^{(\star)}(r)$ at line~\ref{code:submit-proposition}. In this case, there is at least one $\PROVE(r)$ valid in $H$ issued by a correct process before $\APPEND^{(\star)}(r)$.
|
||||
|
||||
\item \textbf{Case (C8) :}
|
||||
There exist a process $p^\star$ invokes $\APPEND^{(\star)}(r)$ at C8. Line C8 is guarded by the condition at C5, which ensures that $p$ observed some $(\_,\PROVEtrace(r))$ in $P$. In this case, there is at least one $\PROVE(r)$ valid in $H$ issued by some process before $\APPEND^{(\star)}(r)$.
|
||||
\item \textbf{Case (\ref{code:append-read}) :}
|
||||
There exists a process $p_i$ that invoked $\APPEND^{(\star)}(r)$ at . Line~\ref{code:append-read} is guarded by the condition at \ref{code:check-if-winners}, which ensures that $p$ observed some $(\_,r)$ in $P$. In this case, there is at least one $\PROVE(r)$ valid in $H$ issued by some process before $\APPEND^{(\star)}(r)$.
|
||||
\end{itemize}
|
||||
|
||||
In both cases, if some process invokes $\APPEND(r)$, then some process must have previously invoked $\PROVE(r)$.
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[No empty winners]\label{lem:nonempty}
|
||||
Let $r$ be a round, if $\Winners_r$ is defined, then $\Winners_r \neq \emptyset$.
|
||||
Let $r$ be a closed round, then $\Winners_r \neq \emptyset$.
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}[Proof]
|
||||
If $\Winners_r$ is defined, then by \Cref{def:winner-invariant}, round $r$ is closed. By \Cref{def:closed-round}, some $\APPEND(r)$ occurs in the DL linearization. \\
|
||||
By \Cref{lem:append-prove}, at least a process must have invoked a valid $\PROVE(r)$ before $\APPEND^{(\star)}(r)$. Hence, there exists at least one $j$ such that $\{j: \PROVE^{(j)}(r) \prec \APPEND^\star(r)\}$, so $\Winners_r \neq \emptyset$.
|
||||
By \Cref{def:closed-round}, some $\APPEND(r)$ occurs in the DL linearization. \\
|
||||
By \Cref{lem:append-prove}, at least one process must have invoked a valid $\PROVE(r)$ before $\APPEND^{(\star)}(r)$. Hence, there exists at least one $p_j$ such that $p_j$ invoked $\PROVE_j(r) \prec \APPEND^\star(r)$, so $\Winners_r \neq \emptyset$.
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[Winners must propose]\label{lem:winners-propose}
|
||||
For any closed round $r$, $\forall j \in \Winners_r$, process $j$ must have invoked a $\RBcast(S^{(j)}, r, j)$
|
||||
For any closed round $r$, $\forall i \in \Winners_r$, process $p_i$ must have invoked a $\RBcast(S^{(i)}, r, i)$ and hence any correct will eventually set $\prop[r][i]$ to a non-$\bot$ value.
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}[Proof]
|
||||
Fix a closed round $r$. By \Cref{def:winner-invariant}, for any $j \in \Winners_r$, there exist a valid $\PROVE^{(j)}(r)$ such that $\PROVE^{(j)}(r) \prec \APPEND^\star(r)$ in the DL linearization. By program order, if $j$ invoked a valid $\PROVE^{(j)}(r)$ at line B6 he must have invoked $\RBcast(S^{(j)}, r, j)$ directly before.
|
||||
Fix a closed round $r$. By \Cref{def:winner-invariant}, for any $i \in \Winners_r$, there exist a valid $\PROVE_i(r)$ such that $\PROVE_i(r) \prec \APPEND^\star(r)$ in the DL linearization. By program order, if $i$ invoked a valid $\PROVE_i(r)$ at line~\ref{code:submit-proposition} he must have invoked $\RBcast(S^{(i)}, r, i)$ directly before.
|
||||
|
||||
Let take a correct process $p_j$, by \RB \emph{Validity}, every correct process eventually receives $i$'s \RB message for round $r$, which sets $\prop[r][i]$ to a non-$\bot$ value at line~\ref{code:prop-set}.
|
||||
\end{proof}
|
||||
|
||||
\begin{definition}[Messages invariant]\label{def:messages-invariant}
|
||||
For any closed round $r$ and any correct process $p_i$ such that $\nexists j \in \Winners_r : prop^{[i)}[r][j] = \bot$, define
|
||||
For any closed round $r$ and any correct process $p_i$ such that $\forall j \in \Winners_r : prop^{[i)}[r][j] \neq \bot$, define
|
||||
\[
|
||||
\Messages_r \triangleq \bigcup_{j\in\Winners_r} \prop^{(i)}[r][j]
|
||||
\]
|
||||
as the unique set of messages proposed by the winners of round $r$.
|
||||
as the set of messages proposed by the winners of round $r$.
|
||||
\end{definition}
|
||||
|
||||
\begin{lemma}[Non-empty winners proposal]\label{lem:winner-propose-nonbot}
|
||||
For any closed round $r$, $\forall j \in \Winners_r$, for any correct process $p_i$, eventually $\prop^{(i)}[r][j] \neq \bot$.
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}[Proof]
|
||||
Fix a closed round $r$. By \Cref{def:winner-invariant}, for any $j \in \Winners_r$, there exist a valid $\PROVE^{(j)}(r)$ such that $\PROVE^{(j)}(r) \prec \APPEND^\star(r)$ in the DL linearization. By \Cref{lem:winners-propose}, $j$ must have invoked $\RBcast(S^{(j)}, r, j)$.
|
||||
|
||||
Let take a process $p_i$, by \RB \emph{Validity}, every correct process eventually receives $j$'s \RB message for round $r$, which sets $\prop[r][j]$ to a non-$\bot$ value at line A3.
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[Eventual proposal closure]\label{lem:eventual-closure}
|
||||
If a correct process $p_i$ define $M_r$ at line C13, then for every $j \in \Winners_r$, $\prop^{(i)}[r][j] \neq \bot$.
|
||||
If a correct process $p_i$ define $M_r$ at line~\ref{code:Mcompute}, then for every $j \in \Winners_r$, $\prop^{(i)}[r][j] \neq \bot$.
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}[Proof]
|
||||
Let take a correct process $p_i$ that computes $M_r$ at line C13. By \Cref{lem:winners}, $p_i$ computes the unique winner set $\Winners_r$.
|
||||
Let take a correct process $p_i$ that computes $M_r$ at line~\ref{code:Mcompute}. By \Cref{lem:winners}, $p_i$ computation is the winner set $\Winners_r$.
|
||||
|
||||
By \Cref{lem:nonempty}, $\Winners_r \neq \emptyset$. The instruction at line C13 where $p_i$ computes $M_r$ is guarded by the condition at C10, which ensures that $p_i$ has received all \RB messages from every winner $j \in \Winners_r$. Hence, when $p_i$ computes $M_r = \bigcup_{j\in\Winners_r} \prop^{(i)}[r][j]$, we have $\prop^{(i)}[r][j] \neq \bot$ for all $j \in \Winners_r$.
|
||||
By \Cref{lem:nonempty}, $\Winners_r \neq \emptyset$. The instruction at line~\ref{code:Mcompute} where $p_i$ computes $M_r$ is guarded by the condition at line~\ref{code:check-winners-ack}, which ensures that $p_i$ has received all \RB messages from every winner $j \in \Winners_r$. Hence, $M_r = \bigcup_{j\in\Winners_r} \prop^{(i)}[r][j]$, we have $\prop^{(i)}[r][j] \neq \bot$ for all $j \in \Winners_r$.
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[Unique proposal per sender per round]\label{lem:unique-proposal}
|
||||
@@ -254,18 +240,18 @@ If some process invokes $\APPEND(r)$, then at least a process must have previous
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}[Proof]
|
||||
By program order, any process $p_i$ invokes $\RBcast(S, r, i)$ at line B6 must be in the loop B5–B11. No matter the number of iterations of the loop, line B5 always uses the current value of $r$ which is incremented by 1 at each turn. Hence, in any execution, any process $p_i$ invokes $\RBcast(S, r, j)$ at most once for any round $r$.
|
||||
By program order, any process $p_i$ invokes $\RBcast(S, r, i)$ at line~\ref{code:submit-proposition} must be in the loop \ref{code:sumbited-check-loop}. No matter the number of iterations of the loop, line~\ref{code:sumbited-check-loop} always uses the current value of $r$ which is incremented by 1 at each turn. Hence, in any execution, any process $p_i$ invokes $\RBcast(S, r, j)$ at most once for any round $r$.
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[Proposal convergence]\label{lem:convergence}
|
||||
For any round $r$, for any correct processes $p_i$ that define $M_r$ at line C13, we have
|
||||
For any round $r$, for any correct processes $p_i$ that execute line~\ref{code:Mcompute}, we have
|
||||
\[
|
||||
M_r^{(i)} = \Messages_r
|
||||
\]
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}[Proof]
|
||||
Let take a correct process $p_i$ that define $M_r$ at line C13. That implies that $p_i$ has defined $W_r$ at line C9. It implies that, by \Cref{lem:winners}, $r$ is closed and $W_r = \Winners_r$. \\
|
||||
Let take a correct process $p_i$ that compute $M_r$ at line~\ref{code:Mcompute}. That implies that $p_i$ has defined $W_r$ at line~\ref{code:Wcompute}. It implies that, by \Cref{lem:winners}, $r$ is closed and $W_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(S^{(j)}, r, j)$, so $\prop^{(i)}[r][j] = S^{(j)}$ is uniquely defined. Hence, when $p_i$ computes
|
||||
\[
|
||||
M_r^{(i)} = \bigcup_{j\in\Winners_r} \prop^{(i)}[r][j] = \bigcup_{j\in\Winners_r} S^{(j)} = \Messages_r.
|
||||
@@ -275,17 +261,17 @@ If some process invokes $\APPEND(r)$, then at least a process must have previous
|
||||
\begin{lemma}[Inclusion]\label{lem:inclusion}
|
||||
If some correct process invokes $\ABbroadcast(m)$, then there exist a round $r$ and a process $j\in\Winners_r$ such that $p_j$ invokes
|
||||
\[
|
||||
\RBcast(S, r, j)\quad\text{with}\quad m\in S.
|
||||
\RBcast(S, r, j)\quad\text{for same S with}\quad m\in S.
|
||||
\]
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}
|
||||
Fix a correct process $p_i$ that invokes $\ABbroadcast(m)$ and eventually exits the loop (B5–B11) at some round $r$. There are two possible cases.
|
||||
Fix a correct process $p_i$ that invokes $\ABbroadcast(m)$ and eventually exits the loop (\ref{code:sumbited-check-loop}) at some round $r$. There are two possible cases.
|
||||
|
||||
\begin{itemize}
|
||||
\item \textbf{Case 1:} $p_i$ exits the loop because $(i, \PROVEtrace(r)) \in P$. In this case, by \Cref{def:winner-invariant}, $p_i$ is a winner in round $r$. By program order, $p_i$ must have invoked $\RBcast(S, r, i)$ at B6 before invoking $\PROVE^{(i)}(r)$ at B7. By line B4, $m \in S$. Hence there exist a closed round $r$ and a correct process $j=i\in\Winners_r$ such that $j$ invokes $\RBcast(S, r, j)$ with $m\in S$.
|
||||
\item \textbf{Case 1:} $p_i$ exits the loop because $(i, r) \in P$. In this case, by \Cref{def:winner-invariant}, $p_i$ is a winner in round $r$. By program order, $p_i$ must have invoked $\RBcast(S, r, i)$ at \ref{code:submit-proposition} before invoking $\PROVE_i(r)$. By line~\ref{code:Sconstruction}, $m \in S$. Hence there exist a closed round $r$ and $p_i$ is a correct process such that $i\in\Winners_r$. Hence, $i$ invokes $\RBcast(S, r, i)$ with $m\in S$.
|
||||
|
||||
\item \textbf{Case 2:} $p_i$ exits the loop because $\exists j, r': (j, \PROVEtrace(r')) \in P \wedge m \in \prop[r'][j]$. In this case, by \Cref{lem:winners-propose} and \Cref{lem:unique-proposal} $j$ must have invoked a unique $\RBcast(S, r', j)$. Which set $\prop^{(i)}[r'][j] = S$ with $m \in S$.
|
||||
\item \textbf{Case 2:} $p_i$ exits the loop because $\exists j, r': (j, r') \in P \wedge m \in \prop[r'][j]$. In this case, by \Cref{lem:winners-propose} and \Cref{lem:unique-proposal} $p_j$ must have invoked a unique $\RBcast(S, r', j)$. Which set $\prop^{(i)}[r'][j] = S$ with $m \in S$.
|
||||
\end{itemize}
|
||||
|
||||
In both cases, if some correct process invokes $\ABbroadcast(m)$, then there exist a round $r$ and a correct process $j\in\Winners_r$ such that $j$ invokes
|
||||
@@ -295,22 +281,22 @@ If some process invokes $\APPEND(r)$, then at least a process must have previous
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[Broadcast Termination]\label{lem:bcast-termination}
|
||||
If a correct process invokes $\ABbroadcast(m)$, then he eventually exit the function and returns.
|
||||
A correct process which invokes $\ABbroadcast(m)$, eventually exits the function and returns.
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}[Proof]
|
||||
Let a correct process $p_i$ that invokes $\ABbroadcast(m)$. The lemma is true if $\exists r_1$ such that $r_1 \geq r_{max}$ and if $(i, \PROVEtrace(r_1)) \in P$; or if $\exists r_2$ such that $r_2 \geq r_{max}$ and if $\exists j: (j, \PROVEtrace(r_2)) \in P \wedge m \in \prop[r_2][j]$ (like guarded at B8).
|
||||
Consider a correct process $p_i$ that invokes $\ABbroadcast(m)$. The statement is true if $\exists r_1$ such that $r_1 \geq r_{max}$ and if $(i, r_1) \in P$; or if $\exists r_2$ such that $r_2 \geq r_{max}$ and if $\exists j: (j, r_2) \in P \wedge m \in \prop[r_2][j]$ (like guarded at B8).
|
||||
|
||||
Let admit that there exists no round $r_1$ such that $p_i$ invokes a valid $\PROVE(r_1)$. In this case $p_i$ invokes infinitely many $\RBcast(S, \_, i)$ at B6 with $m \in S$ (line B4).\\
|
||||
The assumption that no $\PROVE(r_1)$ invoked by $p$ is valid implies by \DL \emph{Validity} that for every round $r' \geq r_{max}$, there exists at least one $\APPEND(r')$ in the DL linearization, hence by \Cref{lem:nonempty} for every possible round $r'$ there at least a winner. Because there is an infinite number of rounds, and a finite number of processes, there exists at least a correct process $p_k$ that invokes infinitely many valid $\PROVE(r')$ and by extension infinitely many $\ABbroadcast(\_)$. By \RB \emph{Validity}, $p_k$ eventually receives $p_i$ 's \RB messages. Let call $t_0$ the time when $p_k$ receives $p_i$ 's \RB message. \\
|
||||
At $t_0$, $p_k$ execute \Cref{alg:rb-handler} and do $\received \leftarrow \received \cup \{S\}$ with $m \in S$ (line A2).
|
||||
For the first invocation of $\ABbroadcast(\_)$ by $p_k$ after the execution of \Cref{alg:rb-handler}, $p_k$ must include $m$ in his proposal $S$ at line B4 (because $m$ is pending in $j$'s $\received \setminus \delivered$ set). There exists a minimum round $r_2$ such that $p_k \in \Winners_{r_2}$ after $t_0$. By \Cref{lem:winner-propose-nonbot}, eventually $\prop^{(i)}[r_2][k] \neq \bot$. By \Cref{lem:unique-proposal}, $\prop^{(i)}[r_2][k]$ is uniquely defined as the set $S$ proposed by $p_k$ at B6, which by \Cref{lem:inclusion} includes $m$. Hence eventually $m \in \prop^{(i)}[r_2][k]$ and $k \in \Winners_{r_2}$.
|
||||
Consider that there exists no round $r_1$ such that $p_i$ invokes a valid $\PROVE(r_1)$. In this case $p_i$ invokes infinitely many $\RBcast(S, \_, i)$ at line~\ref{code:submit-proposition} with $m \in S$ (line~\ref{code:Sconstruction}).\\
|
||||
The assumption that no $\PROVE(r_1)$ invoked by $p$ is valid implies by \DL \emph{Validity} that for every round $r' \geq r_{max}$, there exists at least one $\APPEND(r')$ in the DL linearization, hence by \Cref{lem:nonempty} for every possible round $r'$ there at least a winner. Because there is an infinite number of rounds, and a finite number of processes, there exists at least one process $p_k$ that invokes infinitely many valid $\PROVE(r')$ and by extension infinitely many $\ABbroadcast(\_)$. By \RB \emph{Validity}, $p_k$ eventually receives $p_i$ 's \RB messages. Let call $t_0$ the time when $p_k$ receives $p_i$ 's \RB message. \\
|
||||
At $t_0$, $p_k$ executes Algorithm \ref{alg:rb-handler} and sets $\received \leftarrow \received \cup \{S\}$ with $m \in S$ (line~\ref{code:receivedConstruction}).
|
||||
For the first invocation of $\ABbroadcast(\_)$ by $p_k$ after the execution of \texttt{RReceived()}, $p_k$ must include $m$ in his proposal $S$ at line~\ref{code:Sconstruction} (because $m$ is pending in $j$'s $\received \setminus \delivered$ set). There exists a minimum round $r_2$ such that $p_k \in \Winners_{r_2}$ after $t_0$. By \Cref{lem:winners-propose}, eventually $\prop^{(i)}[r_2][k] \neq \bot$. By \Cref{lem:unique-proposal}, $\prop^{(i)}[r_2][k]$ is uniquely defined as the set $S$ proposed by $p_k$ at B6, which by \Cref{lem:inclusion} includes $m$. Hence eventually $m \in \prop^{(i)}[r_2][k]$ and $k \in \Winners_{r_2}$.
|
||||
|
||||
So if $p_i$ is a winner he cover the condition $(i, \PROVEtrace(r_1)) \in P$. And we show that if the first condition is never satisfied, the second one will eventually be satisfied. Hence either the first or the second condition will eventually be satisfied, and $p_i$ eventually exits the loop and returns from $\ABbroadcast(m)$.
|
||||
So if $p_i$ is a winner he satisfies the condition $(i, r_1) \in P$. And we show that if the first condition is never satisfied, the second one will eventually be satisfied. Hence either the first or the second condition will eventually be satisfied, and $p_i$ eventually exits the loop and returns from $\ABbroadcast(m)$.
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[Validity]\label{lem:validity}
|
||||
If a correct process $p$ invokes $\ABbroadcast(m)$, then every correct process that invokes a infinitely often times $\ABdeliver()$ eventually delivers $m$.
|
||||
If a correct process $p$ invokes $\ABbroadcast(m)$, then every correct process that invokes a infinitely many times $\ABdeliver()$ eventually delivers $m$.
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}[Proof]
|
||||
@@ -319,11 +305,11 @@ If some process invokes $\APPEND(r)$, then at least a process must have previous
|
||||
\RBcast(S, r, j)\quad\text{with}\quad m\in S.
|
||||
\]
|
||||
|
||||
By \Cref{lem:eventual-closure}, when $p_q$ computes $M_r$ at line C13, $\prop[r][j]$ is non-$\bot$ because $j \in \Winners_r$. By \Cref{lem:unique-proposal}, $p_j$ invokes at most one $\RBcast(S, r, j)$, so $\prop[r][j]$ is uniquely defined. Hence, when $p_q$ computes
|
||||
By \Cref{lem:eventual-closure}, when $p_q$ computes $M_r$ at line~\ref{code:Mcompute}, $\prop[r][j]$ is non-$\bot$ because $j \in \Winners_r$. By \Cref{lem:unique-proposal}, $p_j$ invokes at most one $\RBcast(S, r, j)$, so $\prop[r][j]$ is uniquely defined. Hence, when $p_q$ computes
|
||||
\[
|
||||
M_r = \bigcup_{k\in\Winners_r} \prop[r][k],
|
||||
\]
|
||||
we have $m \in \prop[r][j] = S$, so $m \in M_r$. By \Cref{lem:convergence}, $M_r$ is invariant so each computation of $M_r$ by any correct process that defines it includes $m$. At each invocation of $\ABdeliver()$ which deliver $m'$, $m'$ is add to $\delivered$ until $M_r \subseteq \delivered$. Once this append we're assured that there exist an invocation of $\ABdeliver()$ which return $m$. Hence $m$ is well delivered.
|
||||
we have $m \in \prop[r][j] = S$, so $m \in M_r$. By \Cref{lem:convergence}, $M_r$ is invariant so each computation of $M_r$ by a correct process includes $m$. At each invocation of $m' = \ABdeliver()$, $m'$ is added to $\delivered$ until $M_r \subseteq \delivered$. Once this happens we're assured that there exists an invocation of $\ABdeliver()$ which return $m$. Hence $m$ is well delivered.
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[No duplication]\label{lem:no-duplication}
|
||||
@@ -333,7 +319,7 @@ If some process invokes $\APPEND(r)$, then at least a process must have previous
|
||||
\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)}()$ occur, by program order and because it reach line C19 to return $m$, the process must have add $m$ to $\delivered$. Hence when $\ABdeliver^{(B)}()$ reach line C14 to extract the next message to deliver, it can't be $m$ because $m \not\in (M_r \setminus \{..., m, ...\})$. So a $\ABdeliver^{(B)}()$ which deliver $m$ can't occur.
|
||||
When $\ABdeliver^{(A)}()$ occurs, by program order and because it reached line C18 to return $m$, the process must have add $m$ to $\delivered$. Hence when $\ABdeliver^{(B)}()$ reached line~\ref{code:next-msg-extraction} to extract the next message to deliver, it can't be $m$ because $m \not\in (M_r \setminus \{..., m, ...\})$. So a $\ABdeliver^{(B)}()$ which delivers $m$ can't occur.
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[Total order]\label{lem:total-order}
|
||||
@@ -341,7 +327,7 @@ If some process invokes $\APPEND(r)$, then at least a process must have previous
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}
|
||||
Consider any correct process that delivers both $m_1$ and $m_2$. By \Cref{lem:validity}, there exist closed rounds $r'_1$ and $r'_2$ and correct processes $k_1 \in \Winners_{r'_1}$ and $k_2 \in \Winners_{r'_2}$ such that
|
||||
Consider a correct process that delivers both $m_1$ and $m_2$. By \Cref{lem:validity}, there exists a closed rounds $r'_1$ and $r'_2$ and correct processes $k_1 \in \Winners_{r'_1}$ and $k_2 \in \Winners_{r'_2}$ such that
|
||||
\[
|
||||
\RBcast(S_1, r'_1, k_1)\quad\text{with}\quad m_1\in S_1,
|
||||
\]
|
||||
@@ -351,20 +337,20 @@ If some process invokes $\APPEND(r)$, then at least a process must have previous
|
||||
|
||||
Let consider three cases :
|
||||
\begin{itemize}
|
||||
\item \textbf{Case 1:} $r_1 < r_2$. By program order, any correct process must have waited to append in $\delivered$ every messages in $M_{r_1}$ (which contains $m_1$) to increment $\current$ and eventually set $\current = r_2$ to compute $M_{r_2}$ and then invoke the $\ABdeliver()$ that returns $m_2$. Hence, for any correct process that delivers both $m_1$ and $m_2$, it delivers $m_1$ before $m_2$.
|
||||
\item \textbf{Case 1:} $r_1 < r_2$. By program order, any correct process must have waited to append in $\delivered$ every messages in $M_{r_1}$ (which contains $m_1$) to increment $\current$ and eventually set $\current = r_2$ to compute $M_{r_2}$ and then invoke the $ m_2 = \ABdeliver()$. Hence, for any correct process that delivers both $m_1$ and $m_2$, it delivers $m_1$ before $m_2$.
|
||||
|
||||
\item \textbf{Case 2:} $r_1 = r_2$. By \Cref{lem:convergence}, any correct process that computes $M_{r_1}$ at line C13 computes the same set of messages $\Messages_{r_1}$. By line C14 the messages are pull in a deterministic order defined by $\ordered(\_)$. Hence, for any correct process that delivers both $m_1$ and $m_2$, it delivers $m_1$ and $m_2$ in the deterministic order defined by $\ordered(\_)$.
|
||||
\item \textbf{Case 2:} $r_1 = r_2$. By \Cref{lem:convergence}, any correct process that computes $M_{r_1}$ at line~\ref{code:Mcompute} computes the same set of messages $\Messages_{r_1}$. By line~\ref{code:next-msg-extraction} the messages are pull in a deterministic order defined by $\ordered(\_)$. Hence, for any correct process that delivers both $m_1$ and $m_2$, it delivers $m_1$ and $m_2$ in the deterministic order defined by $\ordered(\_)$.
|
||||
\end{itemize}
|
||||
|
||||
In all possible cases, any correct process that delivers both $m_1$ and $m_2$ delivers $m_1$ and $m_2$ in the same order.
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[Fifo Order]\label{lem:fifo-order}
|
||||
For any two messages $m_1$ and $m_2$ broadcast by the same correct process $p_i$, if $p_i$ invokes $\ABbroadcast(m_1)$ before $\ABbroadcast(m_2)$, then any correct process $p_j$ that delivers both $m_1$ and $m_2$ delivers $m_1$ before $m_2$.
|
||||
For any two distints messages $m_1$ and $m_2$ broadcast by the same correct process $p_i$, if $p_i$ invokes $\ABbroadcast(m_1)$ before $\ABbroadcast(m_2)$, then any correct process $p_j$ that delivers both $m_1$ and $m_2$ delivers $m_1$ before $m_2$.
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}
|
||||
Let take two messages $m_1$ and $m_2$ broadcast by the same correct process $p_i$, with $p_i$ invoking $\ABbroadcast(m_1)$ before $\ABbroadcast(m_2)$. By \Cref{lem:validity}, there exist closed rounds $r_1$ and $r_2$ and correct processes $k_1 \in \Winners_{r_1}$ and $k_2 \in \Winners_{r_2}$ such that
|
||||
Let take $m_1$ and $m_2$ broadcast by the same correct process $p_i$, with $p_i$ invoking $\ABbroadcast(m_1)$ before $\ABbroadcast(m_2)$. By \Cref{lem:validity}, there exist closed rounds $r_1$ and $r_2$ such that $r_1 \leq r_2$ and correct processes $k_1 \in \Winners_{r_1}$ and $k_2 \in \Winners_{r_2}$ such that
|
||||
\[
|
||||
\RBcast(S_1, r_1, k_1)\quad\text{with}\quad m_1\in S_1,
|
||||
\]
|
||||
@@ -378,38 +364,36 @@ If some process invokes $\APPEND(r)$, then at least a process must have previous
|
||||
\end{proof}
|
||||
|
||||
\begin{theorem}[FIFO-\ARB]
|
||||
Under the assumed \DL synchrony and \RB reliability, the algorithm implements FIFO Atomic Reliable Broadcast.
|
||||
Under the assumed $\DL$ synchrony and $\RB$ reliability, the algorithm implements FIFO Atomic Reliable Broadcast.
|
||||
\end{theorem}
|
||||
|
||||
\begin{proof}
|
||||
We show that the algorithm satisfies the properties of FIFO Atomic Reliable Broadcast under the assumed \DL synchrony and \RB reliability.
|
||||
We show that the algorithm satisfies the properties of FIFO Atomic Reliable Broadcast under the assumed $\DL$ synchrony and $\RB$ reliability.
|
||||
|
||||
First, by \Cref{lem:bcast-termination}, if a correct process invokes \ABbroadcast$(m)$, then it eventually returns from this invocation.
|
||||
Moreover, \Cref{lem:validity} states that if a correct process invokes \ABbroadcast$(m)$, then every correct process that invokes \ABdeliver() infinitely often eventually delivers $m$.
|
||||
This gives the usual Validity property of \ARB.
|
||||
First, by \Cref{lem:bcast-termination}, if a correct process invokes $\ABbroadcast(m)$, then it eventually returns from this invocation.
|
||||
Moreover, \Cref{lem:validity} states that if a correct process invokes $\ABbroadcast(m)$, then every correct process that invokes $\ABdeliver()$ infinitely often eventually delivers $m$.
|
||||
This gives the usual Validity property of $\ARB$.
|
||||
|
||||
Concerning Integrity and No-duplicates, the construction only ever delivers messages that have been obtained from the underlying \RB primitive.
|
||||
By the Integrity property of \RB, every such message was previously \RBcast by some process, so no spurious messages are delivered.
|
||||
Concerning Integrity and No-duplicates, the construction only ever delivers messages that have been obtained from the underlying $\RB$ primitive.
|
||||
By the Integrity property of $\RB$, every such message was previously $\RBcast$ by some process, so no spurious messages are delivered.
|
||||
In addition, \Cref{lem:no-duplication} states that no correct process delivers the same message more than once.
|
||||
Together, these arguments yield the Integrity and No-duplicates properties required by \ARB.
|
||||
Together, these arguments yield the Integrity and No-duplicates properties required by $\ARB$.
|
||||
|
||||
For the ordering guarantees, \Cref{lem:total-order} shows that for any two messages $m_1$ and $m_2$ delivered by correct processes, every correct process that delivers both $m_1$ and $m_2$ delivers them in the same order.
|
||||
Hence all correct processes share a common total order on delivered messages.
|
||||
Furthermore, \Cref{lem:fifo-order} states that for any two messages $m_1$ and $m_2$ broadcast by the same correct process, any correct process that delivers both messages delivers $m_1$ before $m_2$ whenever $m_1$ was broadcast before $m_2$.
|
||||
Thus the global total order extends the per-sender FIFO order of \ABbroadcast.
|
||||
Thus the global total order extends the per-sender FIFO order of $\ABbroadcast$.
|
||||
|
||||
All the above lemmas are proved under the assumptions that \DL satisfies the required synchrony properties and that the underlying primitive is a Reliable Broadcast (\RB) with Integrity, No-duplicates and Validity.
|
||||
All the above lemmas are proved under the assumptions that $\DL$ satisfies the required synchrony properties and that the underlying primitive is a Reliable Broadcast ($\RB$) with Integrity, No-duplicates and Validity.
|
||||
Therefore, under these assumptions, the algorithm satisfies Validity, Integrity/No-duplicates, total order and per-sender FIFO order, and hence implements FIFO Atomic Reliable Broadcast, as claimed.
|
||||
\end{proof}
|
||||
|
||||
\subsection{Reciprocity}
|
||||
% ------------------------------------------------------------------------------
|
||||
|
||||
So far, we assumed the existence of a synchronous DenyList (\DL) object and
|
||||
showed how to upgrade a Reliable Broadcast (\RB) primitive into FIFO Atomic
|
||||
Reliable Broadcast (\ARB). We now briefly argue that, conversely, an \ARB{}
|
||||
primitive is strong enough to implement a synchronous \DL object (ignoring the
|
||||
anonymity property).
|
||||
So far, we assumed the existence of a synchronous DenyList ($\DL$) object and showed how to upgrade a Reliable Broadcast ($\RB$) primitive into FIFO Atomic Reliable Broadcast ($\ARB$). We now briefly argue that, conversely, an $\ARB$ primitive is strong enough to implement a synchronous $\DL$ object.
|
||||
|
||||
\xspace
|
||||
|
||||
\paragraph{DenyList as a deterministic state machine.}
|
||||
Without anonymity, the \DL specification defines a
|
||||
@@ -434,36 +418,16 @@ Which are cover by our FIFO-\ARB specification.
|
||||
|
||||
|
||||
\begin{theorem}[From \ARB to synchronous \DL]\label{thm:arb-to-dl}
|
||||
In an asynchronous message-passing system with crash failures, assume a
|
||||
FIFO Atomic Reliable Broadcast primitive with Integrity, No-duplicates,
|
||||
Validity, and the liveness of $\ABbroadcast$. Then, ignoring anonymity, there
|
||||
exists an implementation of a synchronous DenyList object that satisfies the
|
||||
Termination, Validity, and Anti-flickering properties.
|
||||
In an asynchronous message-passing system with crash failures, assume a FIFO Atomic Reliable Broadcast primitive with Integrity, No-duplicates,Validity, and the liveness of $\ABbroadcast$. Then there exists an implementation of a DenyList object that satisfies Termination, Validity, and Anti-flickering properties.
|
||||
\end{theorem}
|
||||
|
||||
\begin{proof}
|
||||
Because the \DL object is deterministic, all correct processes see the same
|
||||
sequence of operations and compute the same sequence of states and return
|
||||
values. We obtain:
|
||||
Because the \DL object is deterministic, all correct processes see the same sequence of operations and compute the same sequence of states and return values. We obtain:
|
||||
|
||||
\begin{itemize}[leftmargin=*]
|
||||
\item \textbf{Termination.} The liveness of \ARB ensures that each
|
||||
$\ABbroadcast$ invocation by a correct process eventually returns, and
|
||||
the corresponding operation is eventually delivered and applied at all
|
||||
correct processes. Thus every $\APPEND$, $\PROVE$, and $\READ$ operation invoked by a correct process
|
||||
eventually returns.
|
||||
\item \textbf{APPEND/PROVE/READ Validity.} The local code that forms
|
||||
\ABbroadcast requests can achieve the same preconditions as in the
|
||||
abstract \DL specification (e.g., $p\in\Pi_M$, $x\in S$ for
|
||||
$\APPEND(x)$). Once an operation is delivered, its effect and return
|
||||
value are exactly those of the sequential \DL specification applied in
|
||||
the common order.
|
||||
\item \textbf{PROVE Anti-Flickering.} In the sequential \DL specification,
|
||||
once an element $x$ has been appended, all subsequent $\PROVE(x)$ are
|
||||
invalid forever. Since all replicas apply operations in the same order,
|
||||
this property holds in every execution of the replicated implementation:
|
||||
after the first linearization point of $\APPEND(x)$, no later
|
||||
$\PROVE(x)$ can return ``valid'' at any correct process.
|
||||
\item \textbf{Termination.} The liveness of \ARB ensures that each $\ABbroadcast$ invocation by a correct process eventually returns, and the corresponding operation is eventually delivered and applied at all correct processes. Thus every $\APPEND$, $\PROVE$, and $\READ$ operation invoked by a correct process eventually returns.
|
||||
\item \textbf{APPEND/PROVE/READ Validity.} The local code that forms \ABbroadcast requests can achieve the same preconditions as in the abstract \DL specification (e.g., $p\in\Pi_M$, $x\in S$ for $\APPEND(x)$). Once an operation is delivered, its effect and return value are exactly those of the sequential \DL specification applied in the common order.
|
||||
\item \textbf{PROVE Anti-Flickering.} In the sequential \DL specification, once an element $x$ has been appended, all subsequent $\PROVE(x)$ are invalid forever. Since all replicas apply operations in the same order, this property holds in every execution of the replicated implementation: after the first linearization point of $\APPEND(x)$, no later $\PROVE(x)$ can return ``valid'' at any correct process.
|
||||
\end{itemize}
|
||||
|
||||
Formally, we can describe the \DL object with the state machine approach for
|
||||
@@ -473,7 +437,7 @@ Which are cover by our FIFO-\ARB specification.
|
||||
|
||||
\subsubsection{Example executions}
|
||||
|
||||
\begin{figure}[H]
|
||||
\begin{figure}
|
||||
\centering
|
||||
\resizebox{0.4\textwidth}{!}{
|
||||
\input{diagrams/nonBFT_behaviour.tex}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
|
||||
\subsection{Model extension}
|
||||
We consider a static set of $n$ processes with known identities, communicating by reliable point-to-point channels, in a complete graph. Messages are uniquely identifiable.
|
||||
We consider a static set $\Pi$ of $n$ processes with known identities, communicating by reliable point-to-point channels, in a complete graph. Messages are uniquely identifiable. At most $f$ processes may be Byzantine, and we assume $n > 3f$.
|
||||
|
||||
\paragraph{Synchrony.} The network is asynchronous. Processes may crash or be byzantine.
|
||||
\paragraph{Synchrony.} The network is asynchronous.
|
||||
|
||||
\paragraph{Communication.} Processes can exchange through a Reliable Broadcast (\RB) object (defined below) which is invoked with the functions \RBcast$(m)$ and \RBreceived$()$. There exists $n$ shared object called DenyList (\DL) (defined below) that is interfaced with the functions \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.
|
||||
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.
|
||||
|
||||
Byzantine processes are constrained by the following. They cannot forge valid cryptographic signatures or threshold shares without access to the corresponding private keys. They cannot violate the termination, validity, or anti-flickering properties of the \DL{} object. They also cannot break the integrity, no-duplicates, or validity properties of the \RB{} primitive.
|
||||
Byzantine processes are constrained by the following. They cannot forge valid cryptographic signatures or threshold shares without access to the corresponding private keys. They cannot violate the termination, validity, or anti-flickering properties of the $\DL$ object. They also cannot break the integrity, no-duplicates, or validity properties of the $\RB$ primitive.
|
||||
|
||||
|
||||
\paragraph{Notation.} Let $\Pi$ be the finite set of process identifiers. Two authorization subsets are $M \subseteq \Pi$ (processes allowed to issue \APPEND) and $V \subseteq \Pi$ (processes allowed to issue \PROVE). Indice $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_k$ for the $\DL_k$ linearization: $x \prec_k y$ means that operation $x$ appears strictly before $y$ in the linearized history of $\DL_k$. 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 round $r \in \mathcal{R}$, define $\Winners_r^i \triangleq \{\, j \in \Pi \mid (j,\PROVEtrace(r)) \prec_k \APPEND(r) \,\}$, i.e., the set of processes whose $\PROVE(r)$ appears before the first $\APPEND(r)$ in the $\DL_k$ linearization. By extension for the set $X$ which contains every $\DL$ we define $\Winners_r \triangleq \bigcup_{k \in X} \Winners_r^k$.
|
||||
We denoted by $\PROVE^{(j)}(r)$ or $\APPEND^{(j)}(r)$ the operation $\PROVE(r)$ or $\APPEND(r)$ invoked by process $j$, and by $\PROVE^{(j)}_{(k)}(r)$ or $\APPEND^{(j)}_{(k)}(r)$ the same operation invoked on the $\DL_k$ object.
|
||||
\paragraph{Notation.} For any indice $k$ we defined by $\DL[k]$ as the $k$-th DenyList object. For a given $\DL[k]$ and any indice $x$ we defined by $\Pi_x^k$ a subset of $\Pi$. Still for a given $k$ we consider $\Pi_M^k \subseteq \Pi$ and $\Pi_V^k \subseteq \Pi$ two authorization subsets for $\DL[k]$. Indice $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_k$ for the $\DL[k]$ linearization: $x \prec_k y$ means that operation $x$ appears strictly before $y$ in the linearized history of $\DL[k]$. 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$, and by $F_i^k(...)$ the same operation invoked on the $\DL[k]$ object.
|
||||
|
||||
% ------------------------------------------------------------------------------
|
||||
\subsection{Primitives}
|
||||
@@ -21,7 +21,7 @@ We denoted by $\PROVE^{(j)}(r)$ or $\APPEND^{(j)}(r)$ the operation $\PROVE(r)$
|
||||
\subsubsection{t-BFT-DL}
|
||||
|
||||
We consider a t-Byzantine Fault Tolerant DenyList (t-$\BFTDL$) with the following properties.
|
||||
There are 3 operations : $\BFTPROVE(x), \BFTAPPEND(x), \BFTREAD(x)$ such that :
|
||||
There are 3 operations : $\BFTPROVE(x), \BFTAPPEND(x), \BFTREAD()$ such that :
|
||||
|
||||
\paragraph{Termination.} Every operation $\BFTAPPEND(x)$, $\BFTPROVE(x)$, and $\BFTREAD()$ invoked by a correct process always returns.
|
||||
|
||||
@@ -33,7 +33,7 @@ There are 3 operations : $\BFTPROVE(x), \BFTAPPEND(x), \BFTREAD(x)$ such that :
|
||||
|
||||
\paragraph{READ Anti-Flickering.} Let $op_1, op_2$ two $\BFTREAD()$ operations that returns respectively $R_1, R_2$. Iff $op_1 \prec op_2$ then $R_2 \subseteq R_1$. Otherwise $R_1 \subseteq R_2$.
|
||||
|
||||
\paragraph{READ Safety.} Let $op_1, op_2$ respectively a valid $\BFTPROVE(x)$ operation submited by the process $p_i$ and a $\BFTREAD()$ operation submited by any correct process such that $op_1 \prec op_2$. Let $R$ the result of $op_2$ then $R \ni (i, \PROVEtrace(x))$
|
||||
\paragraph{READ Safety.} Let $op_1, op_2$ respectively a valid $\BFTPROVE(x)$ operation submited by the process $p_i$ and a $\BFTREAD()$ operation submited by any correct process such that $op_1 \prec op_2$. Let $R$ the result of $op_2$ then $R \ni (i, x)$
|
||||
|
||||
\subsection{DL $\Rightarrow$ t-BFT-DL}
|
||||
|
||||
@@ -53,42 +53,35 @@ For each $U \in \mathcal{U}$, we instantiate one DenyList object $DL_U$ whose au
|
||||
|\mathcal{U}| = \binom{|M|}{|M| - t}.
|
||||
\]
|
||||
|
||||
\begin{algorithmic}[1]
|
||||
\begin{algorithm}
|
||||
\caption{t-BFT-DL implementation using multiple DL objects}
|
||||
|
||||
% \renewcommand{\algletter}{}
|
||||
\begin{algorithm}[H]
|
||||
\caption{t-BFT-DL implementation using multiple DL objects}
|
||||
\Fn{$\BFTAPPEND(x)$}{
|
||||
\For{\textbf{each } $U \in \mathcal{U}$ st $i \in U$}{
|
||||
$DL_U.\APPEND(x)$\;
|
||||
}
|
||||
}
|
||||
|
||||
% \caption{\BFTAPPEND}
|
||||
\Function{$\BFTAPPEND$}{x}
|
||||
\For{\textbf{each } $U \in \mathcal{U}$ st $i \in U$}
|
||||
\State $DL_U.\APPEND(x)$
|
||||
\EndFor
|
||||
\EndFunction
|
||||
\vspace{1em}
|
||||
|
||||
\vspace{1em}
|
||||
\Fn{$\BFTPROVE(x)$}{
|
||||
$state \gets false$\;
|
||||
\For{\textbf{each } $U \in \mathcal{U}$}{
|
||||
$state \gets state \textbf{ OR } DL_U.\PROVE(x)$\;\nllabel{code:prove-or}
|
||||
}
|
||||
\Return{$state$}\;
|
||||
}
|
||||
|
||||
% \caption{\BFTPROVE}
|
||||
\Function{$\BFTPROVE$}{x}
|
||||
\State $state \gets false$
|
||||
\For{\textbf{each } $U \in \mathcal{U}$}
|
||||
\State $state \gets state \textbf{ OR } DL_U.\PROVE(x)$
|
||||
\EndFor
|
||||
\State \Return $state$
|
||||
\EndFunction
|
||||
\vspace{1em}
|
||||
|
||||
\vspace{1em}
|
||||
|
||||
% \caption{\BFTREAD}
|
||||
\Function{$\BFTREAD$}{$\bot$}
|
||||
\State $results \gets \emptyset$
|
||||
\For{\textbf{each } $U \in \mathcal{U}$}
|
||||
\State $results \gets results \cup DL_U.\READ()$
|
||||
\EndFor
|
||||
\State \Return $results$
|
||||
\EndFunction
|
||||
\end{algorithm}
|
||||
\end{algorithmic}
|
||||
\Fn{$\BFTREAD()$}{
|
||||
$results \gets \emptyset$\;
|
||||
\For{\textbf{each } $U \in \mathcal{U}$}{
|
||||
$results \gets results \cup DL_U.\READ()$\;
|
||||
}
|
||||
\Return{$results$}\;
|
||||
}
|
||||
\end{algorithm}
|
||||
|
||||
\begin{lemma}[BFT-PROVE Validity]\label{lem:bft-prove-validity}
|
||||
The invocation of $op = \BFTPROVE(x)$ by a correct process is invalid iff there exist at least $t+1$ distinct processes in $M$ that invoked a valid $\BFTAPPEND(x)$ before $op$ in $\Seq$.
|
||||
@@ -99,10 +92,10 @@ 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 DL9 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.
|
||||
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.
|
||||
\end{itemize}
|
||||
|
||||
\smallskip
|
||||
@@ -117,7 +110,7 @@ For each $U \in \mathcal{U}$, we instantiate one DenyList object $DL_U$ whose au
|
||||
Let $op=\BFTPROVE(x)$ be an invocation by a correct process $p_i$ that is \emph{invalid} in $\Seq$.
|
||||
By BFT-PROVE Validity, this implies that there exist at least $t+1$ \emph{distinct} processes in $M$ that invoked a \emph{valid} $\BFTAPPEND(x)$ before $op$ in $\Seq$. Let $A\subseteq M$ denote that set, with $|A|\ge t+1$.
|
||||
|
||||
Fix any $U\in\mathcal{U}$. We have $A\cap U\neq\emptyset$. Pick $j\in A\cap U$. Since $j\in U$, the call $\BFTAPPEND^{(j)}(x)$ triggers a call $DL_U.\APPEND(x)$. Moreover, because $\BFTAPPEND^{(j)}(x)\prec op$ in $\Seq$, the induced $DL_U.\APPEND(x)$ appears before the induced $DL_U.\PROVE(x)$ of $op$ in the projection $\Seq_U$.
|
||||
Fix any $U\in\mathcal{U}$. We have $A\cap U\neq\emptyset$. Pick $j\in A\cap U$. Since $j\in U$, the call $\BFTAPPEND_j(x)$ triggers a call $DL_U.\APPEND(x)$. Moreover, because $\BFTAPPEND_j(x)\prec op$ in $\Seq$, the induced $DL_U.\APPEND(x)$ appears before the induced $DL_U.\PROVE(x)$ of $op$ in the projection $\Seq_U$.
|
||||
|
||||
Hence, in $\Seq_U$, there exists a \emph{valid} $DL_U.\APPEND(x)$ that appears before the $DL_U.\PROVE(x)$ induced by $op$. By \textbf{PROVE Validity} the base $\DL$ object, the induced $DL_U.\PROVE(x)$ is therefore \emph{invalid} in $\Seq_U$.
|
||||
|
||||
@@ -127,15 +120,15 @@ For each $U \in \mathcal{U}$, we instantiate one DenyList object $DL_U$ whose au
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[BFT-READ Liveness]
|
||||
Let $op = \BFTREAD()$ invoke by a correct process such that $R$ is the result of $op$. For all $(i, \PROVEtrace(x)) \in R$ there exist a valid invocation of $\BFTPROVE(x)$ by $p_i$.
|
||||
Let $op = \BFTREAD()$ invoke by a correct process such that $R$ is the result of $op$. For all $(i, x) \in R$ there exist a valid invocation of $\BFTPROVE(x)$ by $p_i$.
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}
|
||||
Let $R$ the result of a $READ()$ operation submit by any correct process. $(i, \PROVEtrace(x)) \in R$ implie that $\exists U^\star \in \mathcal{U}$ such that $(i, \PROVEtrace(x)) \in R^{U^\star}$ with $R^{U^\star}$ the result of $DL_{U^\star}.\READ()$. By \textbf{READ Validity} $(i, \PROVEtrace(x)) \in R^{U^\star}$ implie that there exist a valid $DL_{U^\star}.\PROVE^{(i)}(x)$. The for loop in the $\BFTPROVE(x)$ implementation return true iff there at least one valid $DL_{U}.\PROVE^{(i)}(x)$ for any $U \in \mathcal{U}$.
|
||||
Let $R$ the result of a $READ()$ operation submit by any correct process. $(i, \PROVEtrace(x)) \in R$ implie that $\exists U^\star \in \mathcal{U}$ such that $(i, x) \in R^{U^\star}$ with $R^{U^\star}$ the result of $DL_{U^\star}.\READ()$. By \textbf{READ Validity} $(i, x) \in R^{U^\star}$ implie that there exist a valid $DL_{U^\star}.\PROVE_i(x)$. The for loop in the $\BFTPROVE(x)$ implementation return true iff there at least one valid $DL_{U}.\PROVE_i(x)$ for any $U \in \mathcal{U}$.
|
||||
|
||||
Hence because there exist a $U^\star$ such that $DL_{U^\star}.\PROVE^{(i)}(x)$, there exist a valid $\BFTPROVE^{(i)}(x)$.
|
||||
Hence because there exist a $U^\star$ such that $DL_{U^\star}.\PROVE_i(x)$, there exist a valid $\BFTPROVE_i(x)$.
|
||||
|
||||
$(i, \PROVEtrace(x)) \in R \implies \exists \BFTPROVE^{(i)}(x)$
|
||||
$(i, x) \in R \implies \exists \BFTPROVE_i(x)$
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[BFT-READ Anti-Flickering]
|
||||
@@ -155,18 +148,18 @@ For each $U \in \mathcal{U}$, we instantiate one DenyList object $DL_U$ whose au
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[BFT-READ Safety]\label{lem:bft-read-safety}
|
||||
Let $op_1, op_2$ respectively a valid $\BFTPROVE(x)$ operation submited by the process $p_i$ and a $\BFTREAD()$ operation submited by any correct process such that $op_1 \prec op_2$. Let $R$ the result of $op_2$ then $R \ni (i, \PROVEtrace(x))$
|
||||
Let $op_1, op_2$ respectively a valid $\BFTPROVE(x)$ operation submited by the process $p_i$ and a $\BFTREAD()$ operation submited by any correct process such that $op_1 \prec op_2$. Let $R$ the result of $op_2$ then $R \ni (i, x)$
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}
|
||||
Let $op_1 = \BFTPROVE^{(i)}(x)$ be a valid operation by a correct process $p_i$ and $op_2 = \BFTREAD()$ be any $\BFTREAD()$ operation such that $op_1 \prec op_2$ in $\Seq$.
|
||||
Let $op_1 = \BFTPROVE_i(x)$ be a valid operation by a correct process $p_i$ and $op_2 = \BFTREAD()$ be any $\BFTREAD()$ operation such that $op_1 \prec op_2$ in $\Seq$.
|
||||
By BFT-PROVE Validity, there exist at most $t$ distinct processes in $M$ that invoked a valid $\BFTAPPEND(x)$ before $op_1$ in $\Seq$. Let $A\subseteq M$ denote that set, with $|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)$ of $op_1$. Since also $i\in \Pi_V(DL_{U^\star})$, by \textbf{PROVE Validity} of $\DL$ the induced $DL_{U^\star}.\PROVE^{(i)}(x)$ is valid.
|
||||
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)$ of $op_1$. Since also $i\in \Pi_V(DL_{U^\star})$, by \textbf{PROVE Validity} of $\DL$ the induced $DL_{U^\star}.\PROVE_i(x)$ is valid.
|
||||
|
||||
Now, because $op_1 \prec op_2$ in $\Seq$, the induced $DL_{U^\star}.\PROVE^{(i)}(x)$ appears before the induced $DL_{U^\star}.\READ()$ of $op_2$ in $\Seq_{U^\star}$. By \textbf{READ Safety} of $\DL$, the result $R^{U^\star}$ of the induced $DL_{U^\star}.\READ()$ contains $(i, \PROVEtrace(x))$.
|
||||
Now, because $op_1 \prec op_2$ in $\Seq$, the induced $DL_{U^\star}.\PROVE_i(x)$ appears before the induced $DL_{U^\star}.\READ()$ of $op_2$ in $\Seq_{U^\star}$. By \textbf{READ Safety} of $\DL$, the result $R^{U^\star}$ of the induced $DL_{U^\star}.\READ()$ contains $(i, x)$.
|
||||
|
||||
Finally, by the implementation of $\BFTREAD()$, we have $R = \bigcup_{U \in \mathcal{U}} R^U$, so $(i, \PROVEtrace(x)) \in R$.
|
||||
Finally, by the implementation of $\BFTREAD()$, we have $R = \bigcup_{U \in \mathcal{U}} R^U$, so $(i, x) \in R$.
|
||||
\end{proof}
|
||||
|
||||
\begin{theorem}
|
||||
@@ -181,178 +174,254 @@ For each $U \in \mathcal{U}$, we instantiate one DenyList object $DL_U$ whose au
|
||||
|
||||
\subsubsection{Variables}
|
||||
Each process $p_i$ maintains the following local variables:
|
||||
\begin{algorithmic}
|
||||
% \State $\current \gets 0$
|
||||
\State $\texttt{last\_commited} \gets 0$
|
||||
\State $\texttt{last\_delivered} \gets 0$
|
||||
\State $\received \gets \emptyset$
|
||||
\State $\delivered \gets \emptyset$
|
||||
\State $\prop[r][j] \gets \bot, \forall r, j$
|
||||
\State $W[r] \gets \bot, \forall r$
|
||||
\State $\resolved[r] \gets \bot, \forall r$
|
||||
\State $Y[j]$ \Comment{Set of $n$ \BFTDL{}}
|
||||
\end{algorithmic}
|
||||
\LinesNotNumbered
|
||||
\begin{algorithm}
|
||||
$\texttt{last\_commited} \gets 0$\;
|
||||
$\texttt{last\_delivered} \gets 0$\;
|
||||
$\received \gets \emptyset$\;
|
||||
$\delivered \gets \emptyset$\;
|
||||
$\prop[r][j] \gets \bot, \forall r, j$\;
|
||||
$W[r] \gets \bot, \forall r$; this is the set of the winners for the round $r$\\
|
||||
$B[r] \gets \bot, \forall r$; this is the set of processes who have bahaved maliciously for round $r$\\
|
||||
$\resolved[r] \gets \bot, \forall r$\;
|
||||
$Y$ a $\BFTDL$ such that the value space is $\mathcal{R} \times \Pi$\;
|
||||
$V$ a $\BFTDL$ such that the value space is $(\mathcal{R} \times \mathcal{M} \times \Pi)$\;
|
||||
\end{algorithm}
|
||||
|
||||
\renewcommand{\algletter}{A}
|
||||
\LinesNumbered
|
||||
\begin{algorithm}[H]
|
||||
% \caption{ABroadcast$(m)$}
|
||||
\begin{algorithmic}[1]
|
||||
\Function{ABroadcast}{$m$}
|
||||
\State $\received \gets \received \cup \{m\}$
|
||||
\State \Call{Propose}{}()
|
||||
\EndFunction
|
||||
\end{algorithmic}
|
||||
\caption{$\ABbroadcast(m)$ at process $p_i$}\label{alg:broadcast-bft}
|
||||
\SetAlgoLined
|
||||
\Fn{ABroadcast($m$)}{
|
||||
$\received \gets \received \cup \{m\}$\;
|
||||
Propose()\;
|
||||
}
|
||||
\end{algorithm}
|
||||
|
||||
|
||||
\renewcommand{\algletter}{B}
|
||||
\begin{algorithm}[H]
|
||||
\begin{algorithmic}[1]
|
||||
\Statex \textbf{Proposer Job}
|
||||
\Function{Propose}{$\bot$}
|
||||
\State $r \gets \texttt{last\_commited}$
|
||||
\While{$S \neq \emptyset$ with $S \gets \received \setminus (\delivered \cup (\bigcup_{r' < r} \bigcup_{j \in W[r']} \prop[r'][j]))$}
|
||||
\Statex \Comment{PROP PHASE}
|
||||
\State $\RBcast(i, \texttt{PROP}, S, \current)$
|
||||
\State \textbf{wait} until $|\{j: |\{k: (k, \PROVEtrace(r)) \in Y[j].\BFTREAD()\}| \geq t+1\}| \geq n - f$
|
||||
\Statex \Comment{COMMIT PHASE}
|
||||
\State \textbf{for each} $j \in \Pi$ \textbf{do} $Y[j].\BFTAPPEND(r)$
|
||||
\State $\RBcast(i, \texttt{COMMIT}, r)$
|
||||
\State \textbf{wait} until $|\resolved[r]| \geq n - f$
|
||||
\Statex \Comment{X PHASE}
|
||||
\State $W[r] \gets \{j: |\{k: (k, \PROVEtrace(r)) \in Y[j].\BFTREAD()\}| \geq t+1\}$
|
||||
\State $r \gets r + 1$
|
||||
\EndWhile
|
||||
\State $\texttt{last\_commited} \gets r$
|
||||
\EndFunction
|
||||
\end{algorithmic}
|
||||
\caption{Propose($\bot$) at process $p_i$}\label{alg:propose-bft}
|
||||
\SetAlgoLined
|
||||
% \Statex \textbf{Proposer Job}
|
||||
\Fn{Propose($\bot$)}{
|
||||
$r \gets \texttt{last\_commited}$\;
|
||||
\While{$S \neq \emptyset$ with $S \gets \received \setminus (\delivered \cup (\bigcup_{r' < r} \bigcup_{\substack{(j,S')\in W[r']\\ j\notin B[r']\\ S' \in \prop[r'][j]}} S'))$}{
|
||||
% \Comment{PROP PHASE}\;
|
||||
\tcc*[f]{PROP PHASE}\\
|
||||
$V.\BFTPROVE((r, S, i))$\;
|
||||
$\RBcast(i, \texttt{PROP}, S, r)$\;
|
||||
\textbf{wait} until $|\{j: \exists S, |\{k: (k,(r, S, j)) \in V.\BFTREAD()\}| \geq t+1\}| \geq n - t$\;
|
||||
% \Comment{COMMIT PHASE}
|
||||
\tcc*[f]{COMMIT PHASE}\\
|
||||
\For{\textbf{each} $j \in \Pi$}{
|
||||
% $Y[j].\BFTAPPEND(r)$\;
|
||||
$V.\BFTAPPEND((r, S, j))$\;
|
||||
$Y.\BFTAPPEND((r, j))$\;
|
||||
}
|
||||
$\RBcast(i, \texttt{COMMIT}, r)$\;
|
||||
\textbf{wait} until $|\resolved[r]| \geq n - t$\;
|
||||
% \Comment*{X PHASE}
|
||||
% \tcc*[f]{X PHASE}\\
|
||||
\BlankLine
|
||||
$W[r] \gets \{(j, S): |\{k: (k, (r, S, j)) \in V.\BFTREAD()\}| \geq t+1\}$\;
|
||||
$B[r] \gets \{j: |\{k: (k, (r, j)) \in Y.\BFTREAD()\}| \geq t+1\}$\;
|
||||
$r \gets r + 1$\;
|
||||
}
|
||||
$\texttt{last\_commited} \gets r$\;
|
||||
}
|
||||
\end{algorithm}
|
||||
|
||||
\renewcommand{\algletter}{C}
|
||||
\begin{algorithm}[H]
|
||||
% \caption*{ADeliver$(m)$}
|
||||
\begin{algorithmic}[1]
|
||||
\Function{ADeliver}{$\bot$}
|
||||
\State $r \gets \texttt{last\_delivered}$
|
||||
\If{$|\resolved[r]| < n - f$}
|
||||
\State \Return $\bot$
|
||||
\EndIf
|
||||
\State $W[r] \gets \{j: |\{k: (k, \PROVEtrace(r)) \in Y[j].\BFTREAD()\}| \geq t+1\}$
|
||||
\If{$\exists j \in W[r],\ \prop[r][j] = \bot$}
|
||||
\State \Return $\bot$
|
||||
\EndIf
|
||||
\State $M \gets \bigcup_{j \in W[r]} \prop[r][j]$
|
||||
\State $m \gets \ordered(M \setminus \delivered)[0]$ \Comment{Set $m$ as the smaller message not already delivered}
|
||||
\State $\delivered \leftarrow \delivered \cup \{m\}$
|
||||
\If{$M \setminus \delivered = \emptyset$} \Comment{Check if all messages from round $r$ have been delivered}
|
||||
\State $\texttt{last\_delivered} \gets \texttt{last\_delivered} + 1$
|
||||
\EndIf
|
||||
\State \textbf{return} $m$
|
||||
\EndFunction
|
||||
\end{algorithmic}
|
||||
\caption{$\ABdeliver()$ at process $p_i$}\label{alg:deliver-bft}
|
||||
\SetAlgoLined
|
||||
\Fn{ADeliver($\bot$)}{
|
||||
$r \gets \texttt{last\_delivered}$\;
|
||||
\If{$|\resolved[r]| < n - t$}{
|
||||
\Return{$\bot$}
|
||||
}
|
||||
$W \gets \{(j, S): |\{k: (k, (r, S, j)) \in V.\BFTREAD()\}| \geq t+1\}$\;
|
||||
$B \gets \{j: |\{k: (k, (r, j)) \in Y.\BFTREAD()\}| \geq t+1\}$\;
|
||||
|
||||
\If{$\exists (j, S) \in W, j \notin B, S \notin \prop[r][j]$}{
|
||||
\Return{$\bot$}
|
||||
}
|
||||
\BlankLine
|
||||
$M \gets \bigcup_{\substack{(j,S)\in W\\ j\notin B\\ S \in prop[r][j]}} S$\;\nllabel{code:Mcompute}
|
||||
$m \gets \ordered(M \setminus \delivered)[0]$\;
|
||||
% \Comment*{Set $m$ as the smaller message not already delivered}
|
||||
$\delivered \leftarrow \delivered \cup \{m\}$\;
|
||||
\If{$M \setminus \delivered = \emptyset$}{
|
||||
$\texttt{last\_delivered} \gets \texttt{last\_delivered} + 1$\;
|
||||
}
|
||||
% \Comment*{Check if all messages from round $r$ have been delivered}
|
||||
\Return{$m$}
|
||||
}
|
||||
\end{algorithm}
|
||||
|
||||
\renewcommand{\algletter}{D}
|
||||
\begin{algorithm}[H]
|
||||
% \caption*{RB handlers}
|
||||
\begin{algorithmic}[1]
|
||||
\Upon{$Rdeliver(j, \texttt{PROP}, S, r)$}
|
||||
\State $\received \gets \received \cup \{S\}$
|
||||
\State $\prop[r][j] \gets S$
|
||||
\State $Y[j].\BFTPROVE(r)$
|
||||
\State \Call{Propose}{}()
|
||||
\EndUpon
|
||||
\caption{RB handler at process $p_i$}\label{alg:rb-handler-bft}
|
||||
\SetAlgoLined
|
||||
\Upon{$Rdeliver(j, \texttt{PROP}, S, r)$}{
|
||||
$\received \gets \received \cup \{S\}$\;
|
||||
\uIf{$\prop[r][j] = \bot \vee (\{S' : (j, (r, S', j)) \in V.\BFTREAD()\} = \{S\})$}{
|
||||
$V.\BFTPROVE((r, S, j))$\;
|
||||
}
|
||||
\Else{
|
||||
$Y.\BFTPROVE((r, j))$\;
|
||||
}
|
||||
$\prop[r][j] \gets \prop[r][j] \cup S$\;
|
||||
Propose()\;
|
||||
}
|
||||
|
||||
\vspace{1em}
|
||||
\vspace{1em}
|
||||
|
||||
\Upon{$Rdeliver(j, \texttt{COMMIT}, r)}$
|
||||
\State $\resolved[r] \gets \resolved[r] \cup \{j\}$
|
||||
\EndUpon
|
||||
\end{algorithmic}
|
||||
\Upon{$Rdeliver(j, \texttt{COMMIT}, r)$}{
|
||||
$\resolved[r] \gets \resolved[r] \cup \{j\}$\;
|
||||
}
|
||||
\end{algorithm}
|
||||
|
||||
\textbf{Everything below has to be updated}
|
||||
|
||||
\begin{definition}[BFT Closed round for $i$]
|
||||
Given $Seq^{(i)}$ the linearization of the $\BFTDL$ $Y[i]$, a round $r \in \mathcal{R}$ is \emph{closed} in $\Seq$ iff there exist at least $n - f$ distinct processes $j \in \Pi$ such that $\BFTAPPEND^{(j)}(r)$ appears in $\Seq^{(i)}$. Let call $\BFTAPPEND(r)^\star$ the $(n-f)^{th}$ $\BFTAPPEND(r)$.
|
||||
\begin{definition}[BFT Closed round for $k$]
|
||||
Given $Seq^{k}$ the linearization of the $\BFTDL$ $Y[k]$, a round $r \in \mathcal{R}$ is \emph{closed} in $\Seq$ iff there exist at least $n - f$ distinct processes $j \in \Pi$ such that $\BFTAPPEND_j(r)$ appears in $\Seq^k$. Let call $\BFTAPPEND(r)^\star$ the $(n-f)^{th}$ $\BFTAPPEND(r)$.
|
||||
\end{definition}
|
||||
|
||||
\begin{definition}[BFT Closed round]\label{def:bft-closed-round}
|
||||
A round $r \in \mathcal{R}$ is \emph{closed} iff for all process $p_i$, $r$ is closed in $\Seq^{(i)}$.
|
||||
A round $r \in \mathcal{R}$ is \emph{closed} iff for all $\DL[k]$, $r$ is closed in $\Seq^k$.
|
||||
\end{definition}
|
||||
|
||||
\subsection{Proof of correctness}
|
||||
|
||||
\begin{lemma}[BFT Stable round closure]\label{lem:bft-stable-round-closure}
|
||||
\begin{remark}[BFT Stable round closure]\label{rem:bft-stable-round-closure}
|
||||
If a round $r$ is closed, no more $\BFTPROVE(r)$ can be valid and thus linearized. In other words, once $\BFTAPPEND(r)^\star$ is linearized, no more process can make a proof on round $r$, and the set of valid proofs for round $r$ is fixed. Therefore $\Winners_r$ is fixed.
|
||||
\end{remark}
|
||||
|
||||
\begin{proof}
|
||||
By definition $r$ closed means that for all process $p_i$, there exist at least $n - f$ distinct processes $j \in \Pi$ such that $\BFTAPPEND_j(r)$ appears in $\Seq^k$. By BFT-PROVE Validity, any subsequent $\BFTPROVE(r)$ is invalid because at least $n - f$ processes already invoked a valid $\BFTAPPEND(r)$ before it. Thus no new valid $\BFTPROVE(r)$ can be linearized after $\BFTAPPEND(r)^\star$. Hence the set of valid proofs for round $r$ is fixed, and so is $\Winners_r$.
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[BFT Across rounds]\label{lem:bft-across-rounds}
|
||||
For any $r, r'$ such that $r < r'$, if $r'$ is closed, $r$ is also closed.
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}
|
||||
By definition $r$ closed means that for all process $p_i$, there exist at least $n - f$ distinct processes $j \in \Pi$ such that $\BFTAPPEND^{(j)}(r)$ appears in $\Seq^{(i)}$. By BFT-PROVE Validity, any subsequent $\BFTPROVE(r)$ is invalid because at least $n - f$ processes already invoked a valid $\BFTAPPEND(r)$ before it. Thus no new valid $\BFTPROVE(r)$ can be linearized after $\BFTAPPEND(r)^\star$. Hence the set of valid proofs for round $r$ is fixed, and so is $\Winners_r$.
|
||||
Let $r \in \mathcal{R}$. By \cref{def:bft-closed-round}, if $r + 1$ is closed, then for all $\DL[k]$, $r + 1$ is closed in $\Seq^k$. By the implementation, a process can only invoke $\BFTAPPEND(r + 1)$ after observing at least $n - f$ valid $\BFTPROVE(r)$, which means that for all $\DL[k]$, $r$ is closed in $\Seq^k$. Hence by \cref{def:bft-closed-round}, $r$ is closed.
|
||||
|
||||
Because $r$ is monotonically increasing, we can reccursively apply the same argument to conclude that for any $r, r'$ such that $r < r'$, if $r'$ is closed, $r$ is also closed.
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[BFT $W_r$ as grow only set]\label{lem:bft-wr-grow-only}
|
||||
For any correct process $p_i$. If $p_i$ computes $W_r$ at two different times $t_1$ and $t_2$ with $t_1 < t_2$, then $W_r^{t_1} \subseteq W_r^{t_2}$.
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}
|
||||
By the implementation, $W_r$ is computed exclusively from the results of $\{j: (j, \PROVEtrace(r)) \in \bigcup_{k \in \Pi} Y[k].\BFTREAD()\}$.
|
||||
|
||||
We know by BFT-READ Anti-Flickering that for any two $\BFTREAD()$ operations $op_1, op_2$ such that $op_1 \prec op_2$, the result of $op_2$ is included in the result of $op_1$. Therefore, if $p_i$ computes $W_r$ at two different times $t_1$ and $t_2$ with $t_1 < t_2$, then $W_r^{t_1} \subseteq W_r^{t_2}$.
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[BFT well defined winners]\label{lem:bft-well-defined-winners}
|
||||
For any closed round $r$, if a correct process $p_i$ compute $W_r$, then $W_r = \Winners_r$ with $|W_r| \geq n - f$.
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}
|
||||
By \Cref{lem:bft-read-safety}, any correct process $p_i$ computing $W_r$ after round $r$ is closed includes all valid $\BFTPROVE(r)$ in its computation of $W_r$. Therefore $W_r = \Winners_r$.
|
||||
|
||||
By \Cref{def:bft-closed-round}, at least $n - f$ distinct processes invoked a valid $\BFTAPPEND(r)$ before $\BFTAPPEND(r)^\star$. By the implementation in algorithm D, if a process correct $j$ invoked a valid $\BFTAPPEND(r)$, thats means that he observed at least $n - f$ valid $\BFTPROVE(r)$ submitted by distinct processes. By \Cref{lem:bft-wr-grow-only}, once $p_j$ observed $n - f$ valid $\BFTPROVE(r)$, any correct process computing $W_r$ will eventually observe at least these $n - f$ valid $\BFTPROVE(r)$. By \Cref{lem:bft-stable-round-closure}, no more valid $\BFTPROVE(r)$ can be linearized after round $r$ is closed, so any correct process computing the same fixed set $W_r$ of at least $n - f$ distinct processes.
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[BFT Non-empty winners proposal]\label{lem:bft-non-empty-winners-proposal}
|
||||
For every process $p_i$ such as $i \in W_r$, eventually $\prop[r][i] \neq \bot$.
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}
|
||||
By the implementation, if $i \in W_r$, then $(i, \PROVEtrace(r))$ is included in the result of at least one $\BFTREAD()$ operation. Hence there exist a valid $\BFTPROVE(r)$ operation.
|
||||
By \Cref{lem:bft-prove-validity}, this implies that there exist at least $f + 1$ valid $\PROVE(r)$ operation invoked by processes. At least one of these processes is correct, say $p_j$. By the implementation, $p_j$ invoked $\BFTPROVE(r)$ after receiving a $Rdeliver(j, \texttt{PROP}, S, r)$ message from $p_i$. Therefore, by the reliable broadcast properties, the message will eventually be delivered to every correct process, hence eventually for any correct process $\prop[r][i] \neq \bot$.
|
||||
\end{proof}
|
||||
|
||||
\begin{definition}[BFT Message invariant]\label{def:bft-message-invariant}
|
||||
For any closed round $r$, for any correct process $p_i$, such that $\nexists j \in W_r : \prop[r][j] = \bot$, twe define the set
|
||||
\begin{lemma}[BFT Progress]\label{lem:bft_progress}
|
||||
For any correct process $p_i$ such that
|
||||
\[
|
||||
\Messages_r = \bigcup_{j \in \Winners_r} \prop[r][j]
|
||||
\received \setminus (\delivered \cup (\cup_{r' < r} \cup_{j \in W[r'] \prop[r'][j]})) \neq \emptyset
|
||||
\]
|
||||
as the unique set of messages proposed during round $r$.
|
||||
\end{definition}
|
||||
|
||||
\begin{lemma}[BFT Proposal convergence]\label{lem:bft-proposal-convergence}
|
||||
For any closed round $r$, for any correct process $p_i$, that define $M_r$ at line B10, we have $M_r = \Messages_r$.
|
||||
with $r$ the highest closed round in the $\DL$ linearization. Eventually $r+1$ will be closed.
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}
|
||||
By \Cref{lem:bft-well-defined-winners}, any correct process $p_i$ computing $W_r$ after round $r$ is closed has $W_r = \Winners_r$.
|
||||
By \Cref{lem:bft-non-empty-winners-proposal}, for any correct process $p_i$, such as $i \in W_r$, eventually $\prop[r][i] \neq \bot$.
|
||||
|
||||
Therefore, eventually for any correct process $p_i$, at line B10 we have
|
||||
\begin{lemma}[BFT Winners invariant]\label{lem:bft-winners-invariant}
|
||||
For any closed round $r$, define
|
||||
\[
|
||||
M_r = \bigcup_{j \in W_r} \prop[r][j] = \bigcup_{j \in \Winners_r} \prop[r][j] = \Messages_r
|
||||
\Winners_r = \{j: \BFTPROVE_j(r) \prec \BFTAPPEND^\star(r)\}
|
||||
\]
|
||||
\end{proof}
|
||||
|
||||
\begin{lemma}[BFT Inclusion]\label{proof:bft-inclusion}
|
||||
If a correct process $p_i$ ABroadcasts a message $m$, then eventually any correct process $p_j$ ADelivers $m$.
|
||||
called the unique set of winners of round $r$.
|
||||
\end{lemma}
|
||||
|
||||
\begin{proof}
|
||||
Let $m$ be a message ABroadcast by a correct process $p_i$ and eventually exit the \texttt{ABroadcast} function at line A10.
|
||||
\begin{lemma}[BFT n-f lower-bounded Winners]
|
||||
Let $r$ a closed round, $|W[r]| \geq n-f$.
|
||||
\end{lemma}
|
||||
|
||||
By the implementation, if $p_i$ exits the \texttt{ABroadcast} function at line A10, then there exists a round $r'$ such that $m \in \prop[r'][j]$ for some $j \in W_{r'}$.
|
||||
\begin{remark}\label{rem:correct-in-winners}
|
||||
Because we assume $n \geq 2f+ 1$, if $|W[r]| \geq n-f$ at least 1 correct have to be in $W[r]$ to progress.
|
||||
\end{remark}
|
||||
|
||||
Since $p_i$ is correct, seeing that $m \in \prop[r'][j]$ for some $j \in W_{r'}$ implies that $p_i$ received a $Rdeliver(j, \texttt{PROP}, S, r')$ message from $p_j$ such that $m \in S$. And because $p_j$ is in $W_{r'}$, at least $n - f$ correct processes invoked a valid $Y[j].\BFTPROVE(r')$ before the round $r'$ were closed. By the reliable broadcast properties, the $Rdeliver(j, \texttt{PROP}, S, r')$ message will eventually be delivered to every correct process, hence eventually for any correct process $m \in \prop[r'][j]$ with $j \in W_{r'}$. Hence $m$ will eventually be included in the set $\Messages_{r'}$ defined in \Cref{def:bft-message-invariant} and thus eventually be ADelivered by any correct process.
|
||||
\end{proof}
|
||||
\begin{lemma}[BFT Winners must purpose]\label{lem:bft-winners-purpose}
|
||||
Let $r$ a closed round, for all process $p_j$ such that $j \in W[r]$, $p_j$ must have executed $\RBcast(j, PROP, \_, r)$ and hence any correct will eventually set $\prop[r][j]$ to a non-$\bot$ value.
|
||||
\end{lemma}
|
||||
|
||||
\begin{lemma}[BFT Messages Incariant]\label{lem:bft-messages-invariant}
|
||||
For any closed round $r$ and any correct process $p_i$ such that $\forall j \in \Winners_r$: $\prop^{(i)}[r][j] \neq \bot$ define
|
||||
\[
|
||||
\Messages_r = \cup_{j \in \Winners_r} prop^{(i)}[r][j]
|
||||
\]
|
||||
as the set of messages proposed by the winners of round $r$
|
||||
\end{lemma}
|
||||
|
||||
\begin{lemma}[BFT EVentual proposal closure]\label{lem:bft-eventual-proposal-closure}
|
||||
If a correct process $p_i$ define $M$ at line~\ref{code:Mcompute}, then for every $j \in \Winners_r$, $\prop^{(i)}[r][j] \neq \bot$.
|
||||
\end{lemma}
|
||||
|
||||
\begin{lemma}[BFT Unique proposal per sender per round]\label{lem:bft-unique-proposal}
|
||||
For any round $r$ and any process $p_i$, if $p_i$ invokes two $\RBcast$ call for the same round, such that $\RBcast(i, PROP, S, r) \prec \RBcast(i, PROP, S', r)$. Then for any correct process $p_j$, $\prop^{(j)}[r][i] \in \{\bot, S\}$
|
||||
\end{lemma}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
% \begin{lemma}[BFT $W_r$ as grow only set]\label{lem:bft-wr-grow-only}
|
||||
% For any correct process $p_i$. If $p_i$ computes $W_r$ at two different times $t_1$ and $t_2$ with $t_1 < t_2$, then $W_r^{t_1} \subseteq W_r^{t_2}$.
|
||||
% \end{lemma}
|
||||
|
||||
% \begin{proof}
|
||||
% By the implementation, $W_r$ is computed exclusively from the results of $\{j: (j, \PROVEtrace(r)) \in \bigcup_{k \in \Pi} Y[k].\BFTREAD()\}$.
|
||||
|
||||
% We know by BFT-READ Anti-Flickering that for any two $\BFTREAD()$ operations $op_1, op_2$ such that $op_1 \prec op_2$, the result of $op_2$ is included in the result of $op_1$. Therefore, if $p_i$ computes $W_r$ at two different times $t_1$ and $t_2$ with $t_1 < t_2$, then $W_r^{t_1} \subseteq W_r^{t_2}$.
|
||||
% \end{proof}
|
||||
|
||||
% \begin{lemma}[BFT well defined winners]\label{lem:bft-well-defined-winners}
|
||||
% For any closed round $r$, if a correct process $p_i$ compute $W_r$, then $W_r = \Winners_r$ with $|W_r| \geq n - f$.
|
||||
% \end{lemma}
|
||||
|
||||
% \begin{proof}
|
||||
% By \Cref{lem:bft-read-safety}, any correct process $p_i$ computing $W_r$ after round $r$ is closed includes all valid $\BFTPROVE(r)$ in its computation of $W_r$. Therefore $W_r = \Winners_r$.
|
||||
|
||||
% By \Cref{def:bft-closed-round}, at least $n - f$ distinct processes invoked a valid $\BFTAPPEND(r)$ before $\BFTAPPEND(r)^\star$. By the implementation in algorithm D, if a process correct $j$ invoked a valid $\BFTAPPEND(r)$, thats means that he observed at least $n - f$ valid $\BFTPROVE(r)$ submitted by distinct processes. By \Cref{lem:bft-wr-grow-only}, once $p_j$ observed $n - f$ valid $\BFTPROVE(r)$, any correct process computing $W_r$ will eventually observe at least these $n - f$ valid $\BFTPROVE(r)$. By \Cref{lem:bft-stable-round-closure}, no more valid $\BFTPROVE(r)$ can be linearized after round $r$ is closed, so any correct process computing the same fixed set $W_r$ of at least $n - f$ distinct processes.
|
||||
% \end{proof}
|
||||
|
||||
% \begin{lemma}[BFT Non-empty winners proposal]\label{lem:bft-non-empty-winners-proposal}
|
||||
% For every process $p_i$ such as $i \in W_r$, eventually $\prop[r][i] \neq \bot$.
|
||||
% \end{lemma}
|
||||
|
||||
% \begin{proof}
|
||||
% By the implementation, if $i \in W_r$, then $(i, \PROVEtrace(r))$ is included in the result of at least one $\BFTREAD()$ operation. Hence there exist a valid $\BFTPROVE(r)$ operation.
|
||||
% By \Cref{lem:bft-prove-validity}, this implies that there exist at least $f + 1$ valid $\PROVE(r)$ operation invoked by processes. At least one of these processes is correct, say $p_j$. By the implementation, $p_j$ invoked $\BFTPROVE(r)$ after receiving a $Rdeliver(j, \texttt{PROP}, S, r)$ message from $p_i$. Therefore, by the reliable broadcast properties, the message will eventually be delivered to every correct process, hence eventually for any correct process $\prop[r][i] \neq \bot$.
|
||||
% \end{proof}
|
||||
|
||||
% \begin{definition}[BFT Message invariant]\label{def:bft-message-invariant}
|
||||
% For any closed round $r$, for any correct process $p_i$, such that $\nexists j \in W_r : \prop[r][j] = \bot$, twe define the set
|
||||
% \[
|
||||
% \Messages_r = \bigcup_{j \in \Winners_r} \prop[r][j]
|
||||
% \]
|
||||
% as the unique set of messages proposed during round $r$.
|
||||
% \end{definition}
|
||||
|
||||
% \begin{lemma}[BFT Proposal convergence]\label{lem:bft-proposal-convergence}
|
||||
% For any closed round $r$, for any correct process $p_i$, that define $M_r$ at line B10, we have $M_r = \Messages_r$.
|
||||
% \end{lemma}
|
||||
|
||||
% \begin{proof}
|
||||
% By \Cref{lem:bft-well-defined-winners}, any correct process $p_i$ computing $W_r$ after round $r$ is closed has $W_r = \Winners_r$.
|
||||
% By \Cref{lem:bft-non-empty-winners-proposal}, for any correct process $p_i$, such as $i \in W_r$, eventually $\prop[r][i] \neq \bot$.
|
||||
|
||||
% Therefore, eventually for any correct process $p_i$, at line B10 we have
|
||||
% \[
|
||||
% M_r = \bigcup_{j \in W_r} \prop[r][j] = \bigcup_{j \in \Winners_r} \prop[r][j] = \Messages_r
|
||||
% \]
|
||||
% \end{proof}
|
||||
|
||||
% \begin{lemma}[BFT Inclusion]\label{proof:bft-inclusion}
|
||||
% If a correct process $p_i$ ABroadcasts a message $m$, then eventually any correct process $p_j$ ADelivers $m$.
|
||||
% \end{lemma}
|
||||
|
||||
% \begin{proof}
|
||||
% Let $m$ be a message ABroadcast by a correct process $p_i$ and eventually exit the \texttt{ABroadcast} function at line A10.
|
||||
|
||||
% By the implementation, if $p_i$ exits the \texttt{ABroadcast} function at line A10, then there exists a round $r'$ such that $m \in \prop[r'][j]$ for some $j \in W_{r'}$.
|
||||
|
||||
% Since $p_i$ is correct, seeing that $m \in \prop[r'][j]$ for some $j \in W_{r'}$ implies that $p_i$ received a $Rdeliver(j, \texttt{PROP}, S, r')$ message from $p_j$ such that $m \in S$. And because $p_j$ is in $W_{r'}$, at least $n - f$ correct processes invoked a valid $Y[j].\BFTPROVE(r')$ before the round $r'$ were closed. By the reliable broadcast properties, the $Rdeliver(j, \texttt{PROP}, S, r')$ message will eventually be delivered to every correct process, hence eventually for any correct process $m \in \prop[r'][j]$ with $j \in W_{r'}$. Hence $m$ will eventually be included in the set $\Messages_{r'}$ defined in \Cref{def:bft-message-invariant} and thus eventually be ADelivered by any correct process.
|
||||
% \end{proof}
|
||||
|
||||
\begin{theorem}
|
||||
The algorithm implements a BFT Atomic Reliable Broadcast.
|
||||
|
||||
BIN
Recherche/BFT-ARBover/dlarb.pdf
Normal file
BIN
Recherche/BFT-ARBover/dlarb.pdf
Normal file
Binary file not shown.
Binary file not shown.
@@ -11,19 +11,13 @@
|
||||
\usepackage{csquotes}
|
||||
\usepackage[hidelinks]{hyperref}
|
||||
\usepackage[nameinlink,noabbrev]{cleveref}
|
||||
\usepackage{algorithm}
|
||||
\usepackage{algpseudocode}
|
||||
\usepackage[ruled, vlined, linesnumbered, algonl, titlenumbered]{algorithm2e}
|
||||
\usepackage{graphicx}
|
||||
% Line-number prefix configuration (A/B/C)
|
||||
\renewcommand{\thealgorithm}{\Alph{algorithm}} % Float labels: Algorithm A, B, C
|
||||
\newcommand{\algletter}{}
|
||||
\algrenewcommand\alglinenumber[1]{\scriptsize\textbf{\algletter}#1}
|
||||
|
||||
\algnewcommand\algorithmicupon{\textbf{upon}}
|
||||
% \algnewcommand\algorithmicdo{\textbf{do}}
|
||||
\algdef{SE}[UPON]{Upon}{EndUpon}[1]{%
|
||||
\algorithmicupon\ #1\ \algorithmicdo%
|
||||
}{\textbf{end upon}}
|
||||
\SetKwProg{Fn}{Function}{}{EndFunction}
|
||||
\SetKwFunction{Wait}{Wait Until}
|
||||
\SetKwProg{Upon}{Upon}{}{EndUpon}
|
||||
\SetKwComment{Comment}{}{}
|
||||
|
||||
\usepackage{tikz}
|
||||
\graphicspath{{diagrams/out}}
|
||||
@@ -63,10 +57,10 @@
|
||||
\newcommand{\BFTREAD}{\textsf{BFT\text{-}READ}}
|
||||
|
||||
|
||||
\newcommand{\ABbroadcast}{\textsf{AB-broadcast}}
|
||||
\newcommand{\ABdeliver}{\textsf{AB-deliver}}
|
||||
\newcommand{\RBcast}{\textsf{RB-cast}}
|
||||
\newcommand{\RBreceived}{\textsf{RB-received}}
|
||||
\newcommand{\ABbroadcast}{\textsf{ABroadcast}}
|
||||
\newcommand{\ABdeliver}{\textsf{ADeliver}}
|
||||
\newcommand{\RBcast}{\textsf{RBroadcast}}
|
||||
\newcommand{\RBreceived}{\textsf{RReceived}}
|
||||
\newcommand{\ordered}{\textsf{ordered}}
|
||||
\newcommand{\Winners}{\mathsf{Winners}}
|
||||
\newcommand{\Messages}{\mathsf{Messages}}
|
||||
@@ -103,25 +97,33 @@
|
||||
\crefname{lemma}{Lemma}{Lemmas}
|
||||
\crefname{definition}{Definition}{Definitions}
|
||||
\crefname{algorithm}{Algorithm}{Algorithms}
|
||||
|
||||
% Pour pouvoir referencer des lignes dans le pseudocode
|
||||
% \crefname{ALC@Line}{Lignes}{Lignes}
|
||||
% \Crefname{ALC@Line}{Ligne}{Lignes}
|
||||
\crefname{AlgoLine}{ligne}{lignes}
|
||||
\Crefname{AlgoLine}{Ligne}{Lignes}
|
||||
% Code exécuté par tout processus p_i
|
||||
|
||||
\begin{document}
|
||||
|
||||
\section{Model}
|
||||
We consider a static set of $n$ processes with known identities, communicating by reliable point-to-point channels, in a complete graph. Messages are uniquely identifiable.
|
||||
\section{Model 1: Crash}
|
||||
We consider a static set $\Pi$ of $n$ processes with known identities, communicating by reliable point-to-point channels, in a complete graph. Messages are uniquely identifiable. At most $f$ processes can crash, with $n \geq f$.
|
||||
|
||||
\paragraph{Synchrony.} The network is asynchronous. Processes may crash; at most $f$ crashes occur.
|
||||
\paragraph{Synchrony.} The network is asynchronous.
|
||||
|
||||
\paragraph{Communication.} Processes can exchange through a Reliable Broadcast (\RB) primitive (defined below) which's invoked with the functions \RBcast$(m)$ and \RBreceived$(m)$. There exists a shared object called DenyList (\DL) (defined below) that is interfaced with the functions \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.} Let $\Pi$ be the finite set of process identifiers and let $n \triangleq |\Pi|$. Two authorization subsets are $\Pi_M \subseteq \Pi$ (processes allowed to issue \APPEND) and $\Pi_V \subseteq \Pi$ (processes allowed to issue \PROVE). Indices $i,j \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 round $r \in \mathcal{R}$, define $\Winners_r \triangleq \{\, j \in \Pi \mid (j,\PROVEtrace(r)) \prec \APPEND(r) \,\}$, i.e., the set of processes whose $\PROVE(r)$ appears before the first $\APPEND(r)$ in the \DL{} linearization.
|
||||
We denoted by $\PROVE^{(j)}(r)$ or $\APPEND^{(j)}(r)$ the operation $\PROVE(r)$ or $\APPEND(r)$ invoked by process $j$.
|
||||
\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$.
|
||||
%For any round $r \in \mathcal{R}$, define $\Winners_r \triangleq \{\, j \in \Pi \mid (j,\PROVEtrace(r)) \prec \APPEND(r) \,\}$, i.e., the set of processes whose $\PROVE(r)$ appears before the first $\APPEND(r)$ in the \DL{} linearization.
|
||||
%We denoted by $\PROVE^{(j)}(r)$ or $\APPEND^{(j)}(r)$ the operation $\PROVE(r)$ or $\APPEND(r)$ invoked by process $j$.
|
||||
|
||||
\section{Primitives}
|
||||
|
||||
\input{2_Primitives/index.tex}
|
||||
|
||||
\section{Target Abstraction: Atomic Reliable Broadcast (ARB)}
|
||||
\section{Atomic Reliable Broadcast (ARB)}
|
||||
|
||||
\input{3_ARB_Def/index.tex}
|
||||
|
||||
@@ -180,45 +182,73 @@ Each process can invoke the following functions :
|
||||
|
||||
Such that :
|
||||
|
||||
% \begin{algorithm}[H]
|
||||
% \caption{$\READ'() \rightarrow \mathcal{L}(\mathbb{R} \times \PROVEtrace(\mathbb{R}))$}
|
||||
% \begin{algorithmic}
|
||||
% \Function{READ'}{}
|
||||
% \State $j \gets$ the process invoking $\READ'()$
|
||||
% \State $res \gets \emptyset$
|
||||
% \ForAll{$i \in \{1, \dots, k\}$}
|
||||
% \State $res \gets res \cup DL_i.\READ()$
|
||||
% \EndFor
|
||||
% \State \Return $res$
|
||||
% \EndFunction
|
||||
% \end{algorithmic}
|
||||
% \end{algorithm}
|
||||
|
||||
% \begin{algorithm}[H]
|
||||
% \caption{$\APPEND'(\sigma) \rightarrow ()$}
|
||||
% \begin{algorithmic}
|
||||
% \Function{APPEND'}{$\sigma$}
|
||||
% \State $j \gets$ the process invoking $\APPEND'(\sigma)$
|
||||
% \ForAll{$M_i \in \{M_k \in M : j \in M_k\}$}
|
||||
% \State $DL_i.\APPEND(\sigma)$
|
||||
% \EndFor
|
||||
% \EndFunction
|
||||
% \end{algorithmic}
|
||||
% \end{algorithm}
|
||||
|
||||
% \begin{algorithm}[H]
|
||||
% \caption{$\PROVE'(\sigma) \rightarrow \{0, 1\}$}
|
||||
% \begin{algorithmic}
|
||||
% \Function{PROVE'}{$\sigma$}
|
||||
% \State $j \gets$ the process invoking $\PROVE'(\sigma)$
|
||||
% \State $flag \gets false$
|
||||
% \ForAll{$i \in \{1, \dots, k\}$}
|
||||
% \State $flag \gets flag$ OR $DL_i.\PROVE(\sigma)$
|
||||
% \EndFor
|
||||
% \State \Return $flag$
|
||||
% \EndFunction
|
||||
% \end{algorithmic}
|
||||
% \end{algorithm}
|
||||
|
||||
\begin{algorithm}[H]
|
||||
\caption{$\READ'() \rightarrow \mathcal{L}(\mathbb{R} \times \PROVEtrace(\mathbb{R}))$}
|
||||
\begin{algorithmic}
|
||||
\Function{READ'}{}
|
||||
\State $j \gets$ the process invoking $\READ'()$
|
||||
\State $res \gets \emptyset$
|
||||
\ForAll{$i \in \{1, \dots, k\}$}
|
||||
\State $res \gets res \cup DL_i.\READ()$
|
||||
\EndFor
|
||||
\State \Return $res$
|
||||
\EndFunction
|
||||
\end{algorithmic}
|
||||
\end{algorithm}
|
||||
$j \gets$ the process invoking $\READ'()$\;
|
||||
$res \gets \emptyset$\;
|
||||
\ForAll{$i \in \{1, \dots, k\}$}{
|
||||
$res \gets res \cup DL_i.\READ()$\;
|
||||
}
|
||||
\Return{$res$}\;
|
||||
\end{algorithm}
|
||||
|
||||
\begin{algorithm}[H]
|
||||
\caption{$\APPEND'(\sigma) \rightarrow ()$}
|
||||
\begin{algorithmic}
|
||||
\Function{APPEND'}{$\sigma$}
|
||||
\State $j \gets$ the process invoking $\APPEND'(\sigma)$
|
||||
\ForAll{$M_i \in \{M_k \in M : j \in M_k\}$}
|
||||
\State $DL_i.\APPEND(\sigma)$
|
||||
\EndFor
|
||||
\EndFunction
|
||||
\end{algorithmic}
|
||||
\end{algorithm}
|
||||
\begin{algorithm}[H]
|
||||
\caption{$\APPEND'(\sigma) \rightarrow ()$}
|
||||
$j \gets$ the process invoking $\APPEND'(\sigma)$\;
|
||||
\ForAll{$M_i \in \{M_k \in M : j \in M_k\}$}{
|
||||
$DL_i.\APPEND(\sigma)$\;
|
||||
}
|
||||
\end{algorithm}
|
||||
|
||||
\begin{algorithm}[H]
|
||||
\caption{$\PROVE'(\sigma) \rightarrow \{0, 1\}$}
|
||||
\begin{algorithmic}
|
||||
\Function{PROVE'}{$\sigma$}
|
||||
\State $j \gets$ the process invoking $\PROVE'(\sigma)$
|
||||
\State $flag \gets false$
|
||||
\ForAll{$i \in \{1, \dots, k\}$}
|
||||
\State $flag \gets flag$ OR $DL_i.\PROVE(\sigma)$
|
||||
\EndFor
|
||||
\State \Return $flag$
|
||||
\EndFunction
|
||||
\end{algorithmic}
|
||||
\end{algorithm}
|
||||
\begin{algorithm}[H]
|
||||
\caption{$\PROVE'(\sigma) \rightarrow \{0, 1\}$}
|
||||
$j \gets$ the process invoking $\PROVE'(\sigma)$\;
|
||||
$flag \gets false$\;
|
||||
\ForAll{$i \in \{1, \dots, k\}$}{
|
||||
$flag \gets flag$ OR $DL_i.\PROVE(\sigma)$\;
|
||||
}
|
||||
\Return{$flag$}\;
|
||||
\end{algorithm}
|
||||
|
||||
\subsection{Threshold Cryptography}
|
||||
|
||||
|
||||
BIN
misc/InstalParty2026/imgs/canonical.png
Normal file
BIN
misc/InstalParty2026/imgs/canonical.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 327 KiB |
BIN
misc/InstalParty2026/imgs/i3.png
Normal file
BIN
misc/InstalParty2026/imgs/i3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.5 KiB |
BIN
misc/InstalParty2026/imgs/logo-6011e.png
Normal file
BIN
misc/InstalParty2026/imgs/logo-6011e.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 47 KiB |
BIN
misc/InstalParty2026/imgs/plasma.png
Normal file
BIN
misc/InstalParty2026/imgs/plasma.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 748 KiB |
BIN
misc/InstalParty2026/imgs/xfce.jpg
Normal file
BIN
misc/InstalParty2026/imgs/xfce.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 306 KiB |
BIN
misc/InstalParty2026/main.pdf
Normal file
BIN
misc/InstalParty2026/main.pdf
Normal file
Binary file not shown.
291
misc/InstalParty2026/main.tex
Normal file
291
misc/InstalParty2026/main.tex
Normal file
@@ -0,0 +1,291 @@
|
||||
\documentclass[aspectratio=43,10pt]{beamer}
|
||||
|
||||
\usetheme{Madrid}
|
||||
\usecolortheme{default}
|
||||
\usefonttheme{professionalfonts}
|
||||
\setbeamertemplate{navigation symbols}{}
|
||||
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[french]{babel}
|
||||
\usepackage{lmodern}
|
||||
\usepackage{microtype}
|
||||
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{positioning,fit,calc,arrows.meta}
|
||||
|
||||
\title{}
|
||||
\subtitle{}
|
||||
\author{}
|
||||
\institute{}
|
||||
\date{}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{frame}{Install Party Linux}
|
||||
\framesubtitle{Luminy - 18 fevrier 2026}
|
||||
\centering
|
||||
\includegraphics[width=\linewidth,height=0.34\textheight,keepaspectratio]{imgs/logo-6011e.png}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Architecture d'un système d'exploitation}
|
||||
|
||||
Un OS c'est :
|
||||
\begin{itemize}
|
||||
\item Un Noyau (Kernel) : Ordonnancement, gestion de la mémoire, intéraction entre les composants physiques.
|
||||
\item Des Bibliothèques (Drivers) : UN driver est UNE interface avec un composant physique. (Carte Graphique, carte réseau, imprimante, \dots)
|
||||
\item Une Interface Graphique : Comment sont agenceés et gérées les fenetres
|
||||
\item Des Application : Les logiciels à utiliser
|
||||
\end{itemize}
|
||||
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Architecture d'un système d'exploitation}
|
||||
|
||||
Un OS c'est :
|
||||
|
||||
\vspace{1em}
|
||||
|
||||
\centering
|
||||
\begin{tikzpicture}[
|
||||
box/.style={draw, rounded corners, align=center, minimum width=6cm, minimum height=0.9cm},
|
||||
arrow/.style={-{Latex[length=3mm,width=2mm]}, thick}
|
||||
]
|
||||
\pause
|
||||
\node[box] at (0, 5) (Noyau) {Noyau \\ (XNU, Windows NT, Linux, BSD, \dots)};
|
||||
\pause
|
||||
\node[box] at (0, 4) (Drivers) {Drivers \\ (Carte Graphique, disques durs, carte réseau, \dots)};
|
||||
\node[box, red] at (0, 3) (Drivers) {Materiel};
|
||||
\pause
|
||||
\node[box] at (0, 6) (GUI) {GUI \\ (DWM, Quartz Compositor + WindowServer, X11 + Gnome, Wayland + Swayne)};
|
||||
\pause
|
||||
\node[box] at (0, 7) (Apps) {Applications};
|
||||
\end{tikzpicture}
|
||||
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Architecture d'un système d'exploitation}
|
||||
|
||||
Dans le cas de Windows, une version de windows = un package Noyau/GUI/Drivers définit et immuable + quelques applications par defaut
|
||||
|
||||
\vspace{1em}
|
||||
|
||||
\centering
|
||||
\begin{tikzpicture}[
|
||||
box/.style={draw, rounded corners, align=center, minimum width=6cm, minimum height=0.9cm},
|
||||
arrow/.style={-{Latex[length=3mm,width=2mm]}, thick}
|
||||
]
|
||||
\node[box] at (0, 5) (Noyau) {Noyau \\ Windows NT};
|
||||
\node[box] at (0, 4) (Drivers) {Drivers};
|
||||
\node[box] at (0, 3) (Drivers) {Materiel};
|
||||
\node[box] at (0, 6) (GUI) {GUI \\ DWM};
|
||||
\node[box] at (0, 7) (Apps) {Applications \\ Microsoft Edge, Outlook, Skype, \dots};
|
||||
\end{tikzpicture}
|
||||
|
||||
\pause
|
||||
|
||||
\textcolor{red}{Une distribution Linux c'est pareil !} \\
|
||||
\pause
|
||||
Une distribution = un package Noyau/GUI/Drivers définit + quelques applications par defaut
|
||||
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Allons un peu plus en détail - L'interface graphique}
|
||||
|
||||
D'un point de vue de "à quoi ca ressemble", une distribution linux peut jouer sur 3 facteurs :
|
||||
\begin{itemize}
|
||||
\item Le serveur d'affichage (Xorg ou Weston principalement)
|
||||
\item Le gestionnaire de fenetres (flottant ou tiling)
|
||||
\item L'interface graphique (Gnome, KDE)
|
||||
\end{itemize}
|
||||
|
||||
\begin{center}
|
||||
\resizebox{0.8\width}{!}{
|
||||
\begin{tikzpicture}[
|
||||
box/.style={draw, rounded corners, align=center, minimum width=6cm, minimum height=0.9cm},
|
||||
arrow/.style={-{Latex[length=3mm,width=2mm]}, thick}
|
||||
]
|
||||
\node[box] at (0, 5) (Noyau) {Noyau \\ Linux};
|
||||
\node[box] at (0, 4) (Drivers) {Drivers};
|
||||
\node[box] at (0, 3) (Drivers) {Materiel};
|
||||
\node[box] at (0, 6) (GUI) {Serveur d'affichage \\ Xorg, Weston};
|
||||
\node[box] at (6, 6) (GUI) {Windows Manager \\ Compiz, KWin, Awesome, I3};
|
||||
\node[box] at (0, 7) (GUI) {Interface Graphique \\ Gnome, KDE};
|
||||
\node[box] at (0, 8) (Apps) {Applications};
|
||||
\end{tikzpicture}
|
||||
}
|
||||
\end{center}
|
||||
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Allons un peu plus en détail - L'interface graphique}
|
||||
|
||||
|
||||
|
||||
\begin{center}
|
||||
\begin{minipage}{0.49\textwidth}
|
||||
\centering
|
||||
\includegraphics[width=\linewidth,height=0.34\textheight,keepaspectratio]{imgs/canonical.png}
|
||||
\par\smallskip
|
||||
\small GNOME
|
||||
\end{minipage}
|
||||
\hfill
|
||||
\begin{minipage}{0.49\textwidth}
|
||||
\centering
|
||||
\includegraphics[width=\linewidth,height=0.34\textheight,keepaspectratio]{imgs/xfce.jpg}
|
||||
\par\smallskip
|
||||
\small Xfce
|
||||
\end{minipage}
|
||||
|
||||
\vspace{4mm}
|
||||
|
||||
\begin{minipage}{0.49\textwidth}
|
||||
\centering
|
||||
\includegraphics[width=\linewidth,height=0.34\textheight,keepaspectratio]{imgs/plasma.png}
|
||||
\par\smallskip
|
||||
\small KDE Plasma
|
||||
\end{minipage}
|
||||
\hfill
|
||||
\begin{minipage}{0.49\textwidth}
|
||||
\centering
|
||||
\includegraphics[width=\linewidth,height=0.34\textheight,keepaspectratio]{imgs/i3.png}
|
||||
\par\smallskip
|
||||
\small i3 (tiling)
|
||||
\end{minipage}
|
||||
\end{center}
|
||||
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Allons un peu plus en détail - La gestion des paquets}
|
||||
Pour installer une applications sous windows :
|
||||
\pause
|
||||
\begin{itemize}
|
||||
\item On execute un installeur (.msi ou .exe)
|
||||
\item On execute une version "portable" (.exe)
|
||||
\end{itemize}
|
||||
\pause
|
||||
\vspace{1em}
|
||||
Sous linux c'est pareil :
|
||||
\begin{itemize}
|
||||
\item On execute un installeur (.dnf ou .deb)
|
||||
\item On execute une version portable (Snap, Appimage, Flatpak, \dots)
|
||||
\end{itemize}
|
||||
|
||||
\pause
|
||||
\vspace{1em}
|
||||
Le support des format d'installer dependent des distribution. \\
|
||||
Les version portable (ou conteneurisé) sont a priori universel.
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Allons un peu plus en détail - La gestion des paquets}
|
||||
On distingue donc deux grandes familles (en vrai y'en a plus que ca) \\
|
||||
RPM Package Manager et dpkg.
|
||||
|
||||
\pause
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[
|
||||
font=\small,
|
||||
n/.style={draw, rounded corners, align=center, minimum height=8mm, inner sep=3pt},
|
||||
a/.style={-{Latex[length=3mm,width=2mm]}, thick},
|
||||
node distance=10mm and 14mm
|
||||
]
|
||||
|
||||
\node[n] (rpm) {RPM\\DNF};
|
||||
\node[n, below=5mm of rpm] (dpkg) {DPKG\\APT};
|
||||
|
||||
\node[n, right=10mm of rpm] (redhat) {Red Hat};
|
||||
\node[n, right=10mm of redhat] (fedora) {Fedora};
|
||||
\node[n, right=10mm of fedora] (nobara) {Nobara};
|
||||
|
||||
\node[n, right=10mm of dpkg] (debian) {Debian};
|
||||
\node[n, right=10mm of debian] (ubuntu) {Ubuntu};
|
||||
\node[n, right=10mm of ubuntu] (mint) {Linux Mint};
|
||||
|
||||
\draw[a] (rpm) -- (redhat);
|
||||
\draw[a] (redhat) -- (fedora);
|
||||
\draw[a] (fedora) -- (nobara);
|
||||
|
||||
\draw[a] (dpkg) -- (debian);
|
||||
\draw[a] (debian) -- (ubuntu);
|
||||
\draw[a] (ubuntu) -- (mint);
|
||||
|
||||
\pause
|
||||
\node[n, below=5mm of dpkg] (tar) {tar.xx \\ PacMan};
|
||||
|
||||
\node[n, right=10mm of tar] (arch) {Arch Linux};
|
||||
\node[n, right=10mm of arch] (manjaro) {Manjaro};
|
||||
|
||||
\draw[a] (tar) -- (arch);
|
||||
\draw[a] (arch) -- (manjaro);
|
||||
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Allons un peu plus en détail - La gestion des paquets}
|
||||
Les grosses différences de chaque gestionnaire sont plutot philosophique :
|
||||
\begin{itemize}
|
||||
\pause
|
||||
\item APT : Image de stabilité et de grand publique.
|
||||
\begin{itemize}
|
||||
\item + : Très stable, grosse communauté donc beaucoup de ressources dont en francais.
|
||||
\item - : Souvent plus en retard sur des versions très recentes de certains logiciels.
|
||||
\end{itemize}
|
||||
\pause
|
||||
|
||||
\item DNF : Image de robustesse avec une image plus d'usage professionel
|
||||
\begin{itemize}
|
||||
\item + : Très robuste, moins de chance de casser le système même pour des configurations exotiques
|
||||
\item - : Le processus de mise à jour peut être plus lent, et plus compliqué à prendre en main que APT.
|
||||
\end{itemize}
|
||||
\pause
|
||||
|
||||
\item PacMan : Minimaliste et ultra à jour.
|
||||
\begin{itemize}
|
||||
\item + : Systeme de "Rolling Release" qui permet d'avoir les mise à jour en continu.
|
||||
\item - : Necessite un plus grand travail de veille sur les mise à jour.
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Quelques autres trucs à savoir}
|
||||
\begin{itemize}
|
||||
\item /bin (binaries): Exécutables essentiels au système, utilisables par tous les utilisateurs
|
||||
\pause
|
||||
\item /boot: fichiers permettant à Linux de démarrer
|
||||
\pause
|
||||
\item /dev (device): Fichiers spéciaux représentant les point d'entrées de tous les périphériques (fichiers spéciaux des disques durs, écrans, partitions, consoles TTY, webcam, clavier, ...)
|
||||
\pause
|
||||
\item /etc (editing text config): Contient les fichiers de configuration du système et des setvices (*.conf, passwd, inittab, fstab)
|
||||
\pause
|
||||
\item /home: Répertoire personnel des utilisateurs
|
||||
\pause
|
||||
\item /mnt (mount) /media: Là où les ressources peuvent être montées de manière permanente (/media) ou temporaire (/mnt)
|
||||
\pause
|
||||
\item /root: Répertoire personnel du super utilisateur
|
||||
\pause
|
||||
\item /sbin (super binaries): Contient les programmes système essentiels utilisables par l'admin uniquement.
|
||||
\pause
|
||||
\item /tmp (temporary): Répertoire fichier temporaires
|
||||
\pause
|
||||
\item /usr (Unix System Resources): Contient des programmes, des librairies et des données utilisés par tous les utilisateurs du système
|
||||
\pause
|
||||
\item /var (variable): contient les données variables qui varient en fonction de l'utilisation du système. (logs, bdd, mails)
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Comment ca s'installe}
|
||||
\begin{itemize}
|
||||
\item Faire un backup
|
||||
\item Avoir une clé usb bootable
|
||||
\item Rentrer dans la selection du disque de boot en trouvant le bon FX
|
||||
\item Tester en execution "live" que tout fonctionne bien
|
||||
\item Choisir si on veut du mono ou dual-boot
|
||||
\item Allouer ses partitions en fonction des ses usages
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\end{document}
|
||||
Reference in New Issue
Block a user