sync nextcloud
This commit is contained in:
60
Recherche/ALDLoverAB/algo/index.tex
Normal file
60
Recherche/ALDLoverAB/algo/index.tex
Normal file
@ -0,0 +1,60 @@
|
||||
We consider a set of processes communicating asynchronously over reliable point-to-point channels. Each process maintains the following shared variables:
|
||||
|
||||
\begin{itemize}
|
||||
\item \textbf{received}: the set of messages received (but not yet delivered).
|
||||
\item \textbf{delivered}: the set of messages that have been received, ordered, and delivered.
|
||||
\item \textbf{prop[$r$][$j$]}: the proposal set of process $j$ at round $r$. It contains the set of messages that process $j$ claims to have received but not yet delivered at round $r$, concatenated with its newly broadcast message.
|
||||
\item \textbf{proves}: the current content of the \texttt{DenyList} registry, accessible via the operation \texttt{READ()}. It returns a list of tuples $(j, \texttt{PROVE}(r))$, each indicating that process $j$ has issued a valid \texttt{PROVE} for round $r$.
|
||||
\item \textbf{winner$^r$}: the set of processes that have issued a valid \texttt{PROVE} operation for round $r$.
|
||||
\item \textbf{RB-cast}: a reliable broadcast primitive that satisfies the properties defined in Section~1.1.2.
|
||||
\item \textbf{APPEND$(r)$}, \textbf{PROVE$(r)$}: operations that respectively insert (APPEND) and attest (PROVE) the participation of a process in round $r$ in the DenyList registry.
|
||||
\item \textbf{READ()}: retrieves the current local view of valid operations (APPENDs and PROVEs) from the DenyList.
|
||||
\item \textbf{ordered$(S)$}: returns a deterministic total order over a set $S$ of messages (e.g., via hash or lexicographic order).
|
||||
\end{itemize}
|
||||
|
||||
\resetalgline
|
||||
\begin{algorithm}
|
||||
|
||||
\vspace{1em}
|
||||
\textbf{RB-received$(m, S, r_0, j_0)$}
|
||||
\begin{algorithmic}[1]
|
||||
\State \nextalgline $\textit{received} \gets \textit{received} \cup \{m\}$
|
||||
\State \nextalgline $\textit{prop}[r_0][j_0] \gets S$
|
||||
\end{algorithmic}
|
||||
|
||||
\vspace{1em}
|
||||
\textbf{AB-broadcast$(m, j_0)$}
|
||||
\begin{algorithmic}[1]
|
||||
\State \nextalgline $\textit{proves} \gets \texttt{READ}()$
|
||||
\State \nextalgline $r_0 \gets \max\{r : \exists j,\ (j, \texttt{PROVE}(r)) \in \textit{proves}\} + 1$
|
||||
\State \nextalgline $\texttt{RB-cast}(m, (\textit{received} \setminus \textit{delivered}) \cup \{m\}, r_0, j_0)$
|
||||
\State \nextalgline \texttt{PROVE}$(r_0)$
|
||||
\State \nextalgline \texttt{APPEND}$(r_0)$
|
||||
\Repeat
|
||||
\State \nextalgline $\textit{proves} \gets \texttt{READ}()$
|
||||
\State \nextalgline $r_1 \gets \max\{r : \exists j,\ (j, \texttt{PROVE}(r)) \in \textit{proves}\} - 1$
|
||||
\State \nextalgline $\textit{winner}^{r_1} \gets \{j : (j, \texttt{PROVE}(r_1)) \in \textit{proves}\}$
|
||||
\State \nextalgline \textbf{wait} $\forall j \in \textit{winner}^{r_1},\ \textit{prop}[r_1][j] \neq \bot$
|
||||
\Until{\nextalgline $\forall r_2,\ \exists j_2 \in \textit{winner}^{r_2},\ m \in \textit{prop}[r_2][j_2]$} \nextalgline
|
||||
\end{algorithmic}
|
||||
|
||||
\vspace{1em}
|
||||
\textbf{AB-listen}
|
||||
\begin{algorithmic}[1]
|
||||
\While{true}
|
||||
\State \nextalgline $\textit{proves} \gets \texttt{READ}()$
|
||||
\State \nextalgline $r_1 \gets \max\{r : \exists j,\ (j, \texttt{PROVE}(r)) \in \textit{proves}\} - 1$
|
||||
\For{$r_2 \in [r_0, \dots, r_1]$} \nextalgline
|
||||
\State \nextalgline \texttt{APPEND}$(r_2)$
|
||||
\State \nextalgline $\textit{proves} \gets \texttt{READ}()$
|
||||
\State \nextalgline $\textit{winner}^{r_2} \gets \{j : (i, \texttt{PROVE}(r_2)) \in \textit{proves}\}$
|
||||
\State \nextalgline \textbf{wait} $\forall j \in \textit{winner}^{r_2},\ \textit{prop}[r_2][j] \neq \bot$
|
||||
\State \nextalgline $M^{r_2} \gets \bigcup_{j \in \textit{winner}^{r_2}} \textit{prop}[r_2][j]$
|
||||
\ForAll{$m \in \texttt{ordered}(M^{r_2})$} \nextalgline
|
||||
\State \nextalgline $\textit{delivered} \gets \textit{delivered} \cup \{m\}$
|
||||
\State \nextalgline \texttt{AB-deliver}$(m)$
|
||||
\EndFor
|
||||
\EndFor
|
||||
\EndWhile
|
||||
\end{algorithmic}
|
||||
\end{algorithm}
|
77
Recherche/ALDLoverAB/intro/index.tex
Normal file
77
Recherche/ALDLoverAB/intro/index.tex
Normal file
@ -0,0 +1,77 @@
|
||||
|
||||
\subsubsection{Model Properties}
|
||||
|
||||
The system consists of \textit{n} asynchronous processes communicating via reliable point-to-point message passing. \\
|
||||
Each process has a unique, unforgeable identifier and knows the identifiers of all other processes. \\
|
||||
Up to $f<n$ processes may crash (fail-stop). \\
|
||||
The network is reliable: if a correct process sends a message to another correct process, it is eventually delivered. \\
|
||||
Messages are uniquely identifiable: two messages sent by distinct processes or at different rounds are distinguishable \\
|
||||
2 messages sent by the same processus in two differents rounds are differents \\
|
||||
|
||||
\begin{property}[Message Uniqueness]
|
||||
If two messages are sent by different processes, or by the same process in different rounds, then the messages are distinct. \\
|
||||
Formally : \\
|
||||
\[
|
||||
\forall p_1, p_2,\ \forall r_1, r_2,\ \forall m_1, m_2,\
|
||||
\left(
|
||||
\begin{array}{l}
|
||||
\text{send}(p_1, r_1, m_1) \land \text{send}(p_2, r_2, m_2) \\
|
||||
\land\ (p_1 \ne p_2 \lor r_1 \ne r_2)
|
||||
\end{array}
|
||||
\right)
|
||||
\Rightarrow m_1 \ne m_2
|
||||
\]
|
||||
\end{property}
|
||||
|
||||
|
||||
\subsubsection{Reliable Broadcast Properties}
|
||||
|
||||
\begin{property}{Integrity}
|
||||
Every message received was previously sent. \\
|
||||
Formally : \\
|
||||
$\forall p_i : \text{bc-recv}_i(m) \Rightarrow \exists p_j : \text{bc-send}_j(m)$
|
||||
\end{property}
|
||||
|
||||
\begin{property}{No Duplicates}
|
||||
No message is received more than once at any single processor. \\
|
||||
Formally : \\
|
||||
$\forall m, \forall p_i: \text{bc-recv}_i(m) \text{ occurs at most once}$ \\
|
||||
\end{property}
|
||||
|
||||
\begin{property}{Validity}
|
||||
All messages broadcast by a correct process are eventually received by all non faulty processors. \\
|
||||
Formally : \\
|
||||
$\forall m, \forall p_i: \text{correct}(p_i) \wedge \text{bc-send}_i(m) => \forall p_j : \text{correct}(p_j) \Rightarrow \text{bc-recv}_j(m)$
|
||||
\end{property}
|
||||
|
||||
\subsubsection{AtomicBroadcast Properties}
|
||||
|
||||
\begin{property}{AB Totally ordered}
|
||||
$\forall m_1, m_2, \forall p_i, p_j : \text{ab-recv}_{p_i}(m_1) < \text{ab-recv}_{p_i}(m_2) \Rightarrow \text{ab-recv}_{p_j}(m_1) < \text{ab-recv}_{p_j}(m_2)$
|
||||
\end{property}
|
||||
|
||||
|
||||
\subsubsection{DenyList Properties}
|
||||
|
||||
Let $\Pi_M$ be the set of processes authorized to issue \texttt{APPEND} operations,
|
||||
and $\Pi_V$ the set of processes authorized to issue \texttt{PROVE} operations. \\
|
||||
Let $S$ be the set of valid values that may be appended. Let $\texttt{Seq}$ be
|
||||
the linearization of operations recorded in the DenyList.
|
||||
|
||||
\begin{property}{APPEND Validity}
|
||||
An operation $\texttt{APPEND}(x)$ is valid iff :
|
||||
the issuing process $p \in \Pi_M$, and the value $x \in S$
|
||||
\end{property}
|
||||
|
||||
\begin{property}{PROVE Validity}
|
||||
An operation $\texttt{PROVE}(x)$ is valid iff:
|
||||
the issuing process $p \in \Pi_V$, and there exists no $\texttt{APPEND}(x)$ that appears earlier in $\texttt{Seq}$.
|
||||
\end{property}
|
||||
|
||||
\begin{property}{PROGRESS}
|
||||
If an APPEND(x) is invoked by a correct process, then all correct processes will eventually be unable to PROVE(x).
|
||||
\end{property}
|
||||
|
||||
\begin{property}{READ Validity}
|
||||
READ() return a list of tuples who is a random permutation of all valids PROVE() associated to the identity of the emiter process.
|
||||
\end{property}
|
BIN
Recherche/ALDLoverAB/main.pdf
Normal file
BIN
Recherche/ALDLoverAB/main.pdf
Normal file
Binary file not shown.
63
Recherche/ALDLoverAB/main.tex
Normal file
63
Recherche/ALDLoverAB/main.tex
Normal file
@ -0,0 +1,63 @@
|
||||
\documentclass{article}
|
||||
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage{csquotes}
|
||||
\usepackage[french]{babel}
|
||||
\usepackage[affil-it]{authblk}
|
||||
\usepackage{fullpage}
|
||||
|
||||
\usepackage{amsmath}
|
||||
\usepackage{amssymb}
|
||||
|
||||
\usepackage{biblatex}
|
||||
|
||||
% \usepackage[linesnumbered,ruled,vlined]{algorithm2e}
|
||||
\usepackage{algorithm}
|
||||
\usepackage{algorithmicx}
|
||||
\usepackage[noend]{algpseudocode}
|
||||
\algrenewcommand\alglinenumber[1]{\tiny #1}
|
||||
|
||||
\usepackage{etoolbox}
|
||||
|
||||
% --- Partage du compteur de lignes entre plusieurs algorithmes
|
||||
\makeatletter
|
||||
\newcounter{algoLine}
|
||||
\renewcommand{\alglinenumber}[1]{\arabic{algoLine}}
|
||||
\newcommand{\nextalgline}{\stepcounter{algoLine}}
|
||||
\newcommand{\resetalgline}{\setcounter{algoLine}{1}}
|
||||
\makeatother
|
||||
|
||||
\newtheorem{property}{Property}
|
||||
\newtheorem{theorem}{Theorem}
|
||||
\newtheorem{proof}{Proof}
|
||||
|
||||
\addbibresource{sources.bib}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\title{???}
|
||||
\author{JOLY Amaury \\ \textbf{Encadrants :} GODARD Emmanuel, TRAVERS Corentin}
|
||||
\affil{Aix-Marseille Université, Scille}
|
||||
\date{\today}
|
||||
|
||||
\begin{titlepage}
|
||||
\maketitle
|
||||
\end{titlepage}
|
||||
|
||||
|
||||
\section{Introduction}
|
||||
|
||||
\subsection{Model}
|
||||
\input{intro/index.tex}
|
||||
|
||||
\subsection{Algorithms}
|
||||
\input{algo/index.tex}
|
||||
|
||||
\subsection{proof}
|
||||
\input{proof/index.tex}
|
||||
|
||||
\printbibliography
|
||||
|
||||
|
||||
\end{document}
|
121
Recherche/ALDLoverAB/proof/index.tex
Normal file
121
Recherche/ALDLoverAB/proof/index.tex
Normal file
@ -0,0 +1,121 @@
|
||||
\begin{theorem}[Integrity]
|
||||
If a message $m$ is delivered by any process, then it was previously broadcast by some process via the \texttt{AB-broadcast} primitive.
|
||||
\end{theorem}
|
||||
|
||||
\begin{proof}
|
||||
Let $j$ be a process such that $\text{AB-deliver}_j(m)$ occurs.
|
||||
|
||||
\begin{align*}
|
||||
&\text{AB-deliver}_j(m) & \text{(line 24)} \\
|
||||
\Rightarrow\; &\exists r_0 : m \in \texttt{ordered}(M^{r_0}) & \text{(line 22)} \\
|
||||
\Rightarrow\; &\exists j_0 : j_0 \in \textit{winner}^{r_0} \land m \in \textit{prop}[r_0][j_0] & \text{(line 21)} \\
|
||||
\Rightarrow\; &\exists m_0, S_0 : \text{RB-received}_{j_0}(m_0, S_0, r_0, j_0) \land m \in S_0 & \text{(line 2)} \\
|
||||
\Rightarrow\; &S_0 = (\textit{received}_{j_0} \setminus \textit{delivered}_{j_0}) \cup \{m_1\} & \text{(line 5)} \\
|
||||
\Rightarrow\; &\textbf{if } m_1 = m: \exists\, \text{AB-broadcast}_{j_0}(m) \hspace{1em} \square \\
|
||||
&\textbf{else if } m_1 \neq m: \\
|
||||
&\quad m \in \textit{received}_{j_0} \setminus \textit{delivered}_{j_0} \Rightarrow m \in \textit{received}_{j_0} \land m \notin \textit{delivered}_{j_0} \\
|
||||
&\quad \exists j_1, S_1, r_1 : \text{RB-received}_{j_1}(m, S_1, r_1, j_1) & \text{(line 1)} \\
|
||||
&\quad \Rightarrow \exists\, \text{AB-broadcast}_{j_1}(m) \hspace{1em} \square & \text{(line 5)}
|
||||
\end{align*}
|
||||
\end{proof}
|
||||
|
||||
|
||||
|
||||
|
||||
\begin{theorem}[No Duplication]
|
||||
No message is delivered more than once by any process.
|
||||
\end{theorem}
|
||||
|
||||
\begin{proof}
|
||||
Let $j$ be a process such that both $\text{AB-deliver}_j(m_0)$ and $\text{AB-deliver}_j(m_1)$ occur, with $m_0 = m_1$.
|
||||
|
||||
\begin{align*}
|
||||
&\text{AB-deliver}_j(m_0) \wedge \text{AB-deliver}_j(m_1) & \text{(line 24)} \\
|
||||
\Rightarrow\; & m_0, m_1 \in \textit{delivered}_j & \text{(line 23)} \\
|
||||
\Rightarrow\; &\exists r_0, r_1 : m_0 \in M^{r_0} \wedge m_1 \in M^{r_1} & \text{(line 22)} \\
|
||||
\Rightarrow\; &\exists j_0, j_1 : m_0 \in \textit{prop}[r_0][j_0] \wedge m_1 \in \textit{prop}[r_1][j_1] \\
|
||||
&\hspace{2.5em} \wedge\ j_0 \in \textit{winner}^{r_0},\ j_1 \in \textit{winner}^{r_1} & \text{(line 21)}
|
||||
\end{align*}
|
||||
|
||||
We now distinguish two cases:
|
||||
|
||||
\vspace{0.5em}
|
||||
\noindent\textbf{Case 1:} $r_0 = r_1$:
|
||||
\begin{itemize}
|
||||
\item If $j_0 \neq j_1$: this contradicts message uniqueness, since two different processes would include the same message in round $r_0$.
|
||||
\item If $j_0 = j_1$:
|
||||
\begin{align*}
|
||||
\Rightarrow & |{(j_0, \texttt{PROVE}(r_0)) \in proves}| \geq 2 & \text{(line 19)}\\
|
||||
\Rightarrow &\texttt{PROVE}_{j_0}(r_0) \text{ occurs 2 times} & \text{(line 6)}\\
|
||||
\Rightarrow &\texttt{AB-Broadcast}_{j_0}(m_0) \text{ were invoked two times} \\
|
||||
\Rightarrow &(max\{r: \exists j, (j, \texttt{PROVE}(r)) \in proves\} + 1) & \text{(line 4)}\\
|
||||
&\text{ returned the same value in two differents invokations of \texttt{AB-Broadcast}} \\
|
||||
&\textbf{But } \texttt{PROVE}(r_0) \Rightarrow \texttt{max}\{r: \exists j, (j, \texttt{PROVE}(r)) \in proves\} + 1 > r_0 \\
|
||||
&\text{It's impossible for a single process to submit two messages in the same round} \hspace{1em} \\
|
||||
\end{align*}
|
||||
\end{itemize}
|
||||
|
||||
% \vspace{0.5em}
|
||||
\noindent\textbf{Case 2:} $r_0 \ne r_1$:
|
||||
\begin{itemize}
|
||||
\item If $j_0 \neq j_1$: again, message uniqueness prohibits two different processes from broadcasting the same message in different rounds.
|
||||
\item If $j_0 = j_1$: message uniqueness also prohibits the same process from broadcasting the same message in two different rounds.
|
||||
\end{itemize}
|
||||
|
||||
In all cases, we reach a contradiction. Therefore, it is impossible for a process to deliver the same message more than once. $\square$
|
||||
\end{proof}
|
||||
|
||||
% \subsubsection{No Duplication}
|
||||
|
||||
% $M = (\bigcup_{i \rightarrow |P|} AB\_receieved_{i}(m)), \not\exists m_0 m_1 \in M \text{s.t. } m_1 = m_2$
|
||||
% \\
|
||||
% Proof \\
|
||||
% \begin{align*}
|
||||
% &\text{Soit } i, m_0, m_1 \text{ tels que } m_0 = m_1 \\
|
||||
% &\exists r_0,\ m_0 \in M^{r_0} \\
|
||||
% &\exists r_1,\ m_1 \in M^{r_1} \\
|
||||
% &\text{if } r_0 = r_1 \\
|
||||
% &\quad \exists j_0, j_1,\ \text{prop tq } \text{prop}[r_0][j_0] = m_0,\ \text{prop}[r_0][j_1] = m_1 \quad j_0, j_1 \in \text{winnner}^{r_0} \\
|
||||
% &\quad \text{if} j_0 \neq j_1 \\
|
||||
% &\quad\quad \text{On admet qu'il est impossible pour un processus de soumettre le même msg qu'un autre} \\
|
||||
% &\quad \text{if } j_0 = j_1 \\
|
||||
% &\quad\quad j_0 \text{ a émis son } \text{PROVE}(r_0) \text{ valide 2 fois}\\
|
||||
% &\quad\quad \text{Impossible si } j_0 \text{ correct} \\
|
||||
% &\text{else} \\
|
||||
% &\quad \exists j_0, j_1,\ \text{prop tq } \text{prop}[r_0][j_0] = m_0,\ \text{prop}[r_0][j_1] = m_1 \quad j_0, j_1 \in \text{winnner}^{r_0} \\
|
||||
% &\quad \text{if } j_0 \neq j_1 \\
|
||||
% &\quad\quad \text{On admet qu'il est impossible pour un processus de soumettre le même msg qu'un autre} \\
|
||||
% &\quad \text{if } j_0 = j_1 \\
|
||||
% &j_0 \text{ à emis et validé 2 fois le même messages a des rounds différents.}\\
|
||||
% &\text{On admet que deux message identiques soumis a des rounds différents ne peuvent être identiques}
|
||||
% \end{align*}
|
||||
|
||||
\subsubsection{Broadcast Validity}
|
||||
$\exists j_0, m_0 \quad AB\_broadcast_{j_0}(m_0) \Rightarrow \forall j_1 \quad AB\_received_{j_1}(m_0)$ \\
|
||||
|
||||
Proof:
|
||||
\begin{align*}
|
||||
&\exists j_0, m_0 \quad AB\_broadcast_{j_0}(m_0) \\
|
||||
&\forall j_1, \exists r_1 \quad RB\_deliver_{j_1}^{r_1}(m_0) \\
|
||||
&\exists receieved : m_0 \in receieved_{j_1} \\
|
||||
&\exists r_0 : RB\_deliver(PROP, r_0, m_0) & LOOP\\
|
||||
&\exists prop: \text{prop}[r_0][j_0] = m_0 \\
|
||||
&\text{if } \not\exists (j_0, PROVE(r_0)) \in \text{proves} \\
|
||||
&\quad r_0 += 1 \\
|
||||
&\quad \text{jump to LOOP} \\
|
||||
&\text{else} \\
|
||||
&\quad \exists \text{winner}, \text{winner}^{r_0} \ni j_0 \\
|
||||
&\quad \exists M^{r_0} \ni (\text{prop}[r_0][j_0] = m_0) \\
|
||||
&\quad \forall j_1, \quad AB\_deliver_{j_1}(m_0)
|
||||
\end{align*}
|
||||
|
||||
\subsubsection*{AB receive width}
|
||||
\[
|
||||
\exists j_0, m_0 \quad AB\_deliver_{j_0}(m_0) \Rightarrow \forall j_1\ AB\_deliver_{j_1}
|
||||
\]
|
||||
|
||||
Proof:
|
||||
\begin{align*}
|
||||
&\forall j_0, m_0\ AB\_deliver_{j_0}(m_0) \Rightarrow \exists j_1 \text{ correct }, AB\_broadcast(m_0) \\
|
||||
&\exists j_0, m_0 \quad AB\_broadcast_{j_0}(m_0) \Rightarrow \forall j_1,\ AB\_deliver_{j_1}(m_0)
|
||||
\end{align*}
|
0
Recherche/ALDLoverAB/sources.bib
Normal file
0
Recherche/ALDLoverAB/sources.bib
Normal file
Reference in New Issue
Block a user