Ver Fonte

[doc/architecture] added missing raw in block

mohab há 4 anos atrás
pai
commit
e9f3d2901b
2 ficheiros alterados com 38 adições e 0 exclusões
  1. 38 0
      doc/src/architecture/blockchain.md
  2. BIN
      doc/src/zkas/examples/sapling.pdf

+ 38 - 0
doc/src/architecture/blockchain.md

@@ -0,0 +1,38 @@
+## blockchain
+
+blockchain $\mathbb{C}$ is a series of epochs, it's a tree of chains, $C_1$, $C_2$, $\dots$, $C_n$, the chain of the max length in $\mathbb{C}$ is the driving chain C
+
+## epoch
+is multiple of blocks, some of those block might be empty due to the nature of the leader selection with VRF.
+
+
+## Genesis block
+the first block in the epoch updates the stake for stakeholders, which influences weighted random leader selection algorithm, for epoch j, $S_j$ is the genesis block's data for n stakeholders of the blockchain:
+$$S_j=((U_1,v_1^{vrf},v_1^{kes},v_1^{dsig},s_1),\dots,(U_n,v_n^{vrf},v_n^{kes},v_n^{dsig},s_n)$$
+$$\small\text{\emph{note that new stakeholders need to wait for the next epoch to be added to the genesis block}}$$
+
+## Block
+block $\textbf{B}$ is the building block of the blockchain
+
+block $B_{i}=(st,d,sl,B_{\pi},\rho, \sigma_s)$ created for slot i by stakeholder, and slot i leader $U_s$:
+
+$$\textbf{\textcolor{red}{st}}: \text{state of the prebvious block, hash($B_{i-1})$}$$
+$$\textbf{\textcolor{red}{d}}: \text{data held by the block}$$
+$$\textbf{\textcolor{red}{sl}}: \text{slot id generated by the beacon}$$
+$$\textbf{\textcolor{red}{$B_\pi$}}: \text{proof the stakeholder ${U_s}$ is the owner, $B_{\pi}=(U_s,y,\pi)$, y,$\pi$ are the output of the VRF}$$
+$$\textbf{\textcolor{red}{$\rho$}}: \text{random seed for vrf, $\rho=(\rho_y,\rho_{\pi})$}$$
+$$\textbf{\textcolor{red}{$\sigma_{s}$}}: \text{owner signature on the block}$$
+
+
+
+
+
+## leader selection
+at the onset of each slot each stakeholder needs to verify if it's the weighted random leader for this slot.
+$$y < T_{i}$$
+$$\small\text{\emph{check if VRF output is less than some threshold}}$$
+this statement might hold true for zero or more stakeholders, thus we might end up with multiple leaders for a slot, and other times no leader.
+also note that no one would know who is the leader, how many leaders are there for the slot, until you receive signed block with a proof claiming to be a leader.
+$$y = VRF(slot_id||nonce)$$
+$$\phi_{f} = 1 - (1-f)^{\alpha_i}$$
+$$T_{i} = 2^{l_{VRF}}\phi_{f}(\alpha_i^j)$$

BIN
doc/src/zkas/examples/sapling.pdf