Owner: @Alexander Mozeika @David Rusu @Giacomo Pasini
Description of processes
Election process
- We consider stochastic process of leader election for $N$ nodes, labelled by the set $[N]=\{1,\ldots,N\}$, in the blockchain network.
- The state of node $i\in [N]$ in time-slot $t$ is described by the variable $s_i(t)\in\{0,1\}$, where $0$ and $1$ correspond to, respectively, loosing and winning the slot.
- The random variable $s_i(t)$ is governed by the probability distribution
$$
\mathrm{P}(s_i(t))=\phi_f(\alpha_i)\,\delta_{1;s_i(t)}+(1-\phi_f(\alpha_i))\,\delta_{0;s_i(t)}
$$
- Here $\phi_f(\alpha_i)=1-(1-f)^{\alpha_i}$ is the lottery function, where $f\in (0,1)$, and $\alpha_i$ is the relative stake of node $i$. We note that $\alpha_i>0$ and $\sum_{i=1}^N\alpha_i=1$.
- The state of all nodes in the network $\mathbf{s}(t)=(s_1(t),\ldots,s_N(t))$ is governed by the probability distribution
$$
\mathrm{P}(\mathbf{s}(t))=\prod_{i=1}^N \mathrm{P}(s_i(t))
$$
- The number of nodes which won the election in time-slot $t$ is given by the sum
$$
N_V(\mathbf{s}(t))=\sum_{i=1}^N s_i(t)
$$
Block addition process
- We assume that among the nodes which won the election a single node, selected randomly and uniformly, adds a proposed block to the blockchain.
- Let us define the set of nodes which won the election $V(t)=\{j: s_j(t)=1\}$ then the probability that node $i\in V(t)$ adds a block to the blockchain is $1/\vert V(t) \vert$, where $\vert V(t)\vert =N_V(\mathbf{s}(t))$, for $\vert V(t)\vert>0$.
- For node $i$ in time-slot $t$ we define the variable $b_i(t)\in\{0,1\}$, where $0$ and $1$ correspond to, respectively, the event of not adding and adding **block proposed by node $i$ to the blockchain.
- We note that $b_i(t)=1$ can occur only if $s_i(t)=1$ and hence for $N_V(\mathbf{s}(t))>0$ the random variable $b_i(t)$ is governed by the (conditional) probability distribution
$$
\mathrm{P}(b_i(t)\vert s_i(t))=\left[\frac{1}{N_V(\mathbf{s}(t))}\,\delta_{1;b_i(t)}+\left(1-\frac{1}{N_V(\mathbf{s}(t))}\right)\,\delta_{0;b_i(t)}\right]\delta_{1;s_i(t)}+\delta_{0;b_i(t)}\delta_{0;s_i(t)},
$$
i.e. given that node $i$ won the election the probability of $b_i(t)=1$ is $\\frac{1}{N_V(\\mathbf{s}(t))}$ and the probability of $b_i(t)=0$ is $1-\\frac{1}{N_V(\\mathbf{s}(t))}$, and given that node $i$ lost the election the probability of $b_i(t)=0$ is exactly $1$.
- Furthermore, when $N_V(\mathbf{s}(t))>0$, i.e. there is at least one winner in time-slot $t$, only one node can add a block to the blockchain and hence the sum $\sum_{i=1}^N b_i(t)=1$ and when $N_V(\mathbf{s}(t))=0$ we have that $b_i(t)=0$ for all $i$ and hence we can define the following distribution