Skip to content

Commit

Permalink
(fixup) remove the image link of the formula
Browse files Browse the repository at this point in the history
  • Loading branch information
tnasu committed Nov 9, 2022
1 parent a4903c5 commit 5bf6b3b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
4 changes: 4 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ Welcome to the Ostracon documentation!
Therefore, sorry for under construction.

Basically, you can find the information on [Tendermint v0.34.8 docs/README.md](https://github.com/tendermint/tendermint/blob/v0.34.8/docs/README.md)

In addition, we have prepared a simple document here.
* [English](en)
* [Japanese](ja)
6 changes: 0 additions & 6 deletions docs/en/02-consensus.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ VRF is an algorithm for generating a hash value $t$ that can be used as a crypto

A VRF hash generator $k$ generates a proof $\pi$ (VRF Proof) from the message $m$ using its private key $S_k$ as in Equation `1.`. Here, the hash value $t$ can be acquired from the proof $pi$ using Equation. `2.` On the other hand, to verify that the hash value $t$ was generated by the owner of the private key $S_k$ based on the message $m$, the verifier applies the public key $P_k$ for $S_k$, $m$, and $\pi$ to Equation `3.` to verify that both hash values are identical.

![VRF Expression](../static/consensus/math_expression.png)

1. $\pi = {\rm vrf\\_prove}(S_k, m)$
2. $t = {\rm vrf\\_proof\\_to\\_hash}(\pi)$
3. ${\rm vrf\\_proof\\_to\\_hash}(\pi) \overset{\text{?}}{=} {\rm vrf\\_verify}(P_k, m, \pi)$
Expand All @@ -36,8 +34,6 @@ The node that receives the new block initiates the election phase. In this phase

The node selected as the Proposer by this phase picks up the unapproved transactions from its own mempool and generates a proposal block (at this point, the block is not confirmed yet). Then, the Proposer calculates VRF Proof $\pi'$ using the previous VRF Hash $t$ that selected itself, the new block height $h$, and the current round $r$ and sets it to the block.

![VRF Prove](../static/consensus/math_prove.png)

```math
\begin{eqnarray*}
m_h & = & {\rm SHA256}(h \,\|\, r \,\|\, t_{h-1}) \\
Expand All @@ -59,8 +55,6 @@ During the verification phase, the following VRF-related verifications are perfo
* The Proposer that generated the block must be a node selected based on the VRF hash of its previous block. This can be determined by matching the node that actually generated the block with the Proposer selected by weighted random sampling using the VRF hash $t$.
* The $\pi$ contained in the block must be a VRF Proof generated using the private key of the Proposer. If the $t$ calculated from the VRF Proof $\pi$ matches the $t$ calculated using the `vrf_verify()` function, we can conclude that $\pi$ is not forged.

![VRF Verify](../static/consensus/math_verify.png)

```math
{\rm vrf\_verify}(P_i, m_h, \pi_h) \overset{\text{?}}{=} {\rm vrf\_proof\_to\_hash}(\pi_h)
```
Expand Down
6 changes: 0 additions & 6 deletions docs/ja/02-consensus.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ $t$ は式 `2.` を使って証明 $pi$ から生成することができます
基づいて生成されたものであることを検証するために、$S_k$ に対する公開鍵 $P_k$ と $m$, $\pi$ を式 `3.` に適用して同一のハッシュ値 $t$ が
生成されることを確認します。

![VRF Expression](../static/consensus/math_expression.png)

1. $\pi = {\rm vrf\\_prove}(S_k, m)$
2. $t = {\rm vrf\\_proof\\_to\\_hash}(\pi)$
3. ${\rm vrf\\_proof\\_to\\_hash}(\pi) \overset{\text{?}}{=} {\rm vrf\\_verify}(P_k, m, \pi)$
Expand All @@ -54,8 +52,6 @@ Ostracon では、あるブロックを作成した Proposer による*無作為
作成します (この時点ではまだブロックは確定していません)。このとき、自分を選択した VRF ハッシュ $t$ とブロックの高さ $h$、現在のラウンド
$r$ に基づいて算出した新しい VRF Proof $\pi'$ をブロックに設定します。

![VRF Prove](../static/consensus/math_prove.png)

```math
\begin{eqnarray*}
m_h & = & {\rm SHA256}(h \,\|\, r \,\|\, t_{h-1}) \\
Expand All @@ -81,8 +77,6 @@ prevote, precommit, commit を経て複製され、定足数以上の有効票
2. ブロックに含まれている $\pi$ が本当にその Proposer の秘密鍵を使って生成された VRF Proof であること。VRF Proof $\pi$ から算出した
$t$ と、vrf_verify() 関数を使って算出した $t$ が一致していれば $\pi$ が偽造されたものでないと判断できます。

![VRF Verify](../static/consensus/math_verify.png)

```math
{\rm vrf\_verify}(P_i, m_h, \pi_h) \overset{\text{?}}{=} {\rm vrf\_proof\_to\_hash}(\pi_h)
```
Expand Down

0 comments on commit 5bf6b3b

Please sign in to comment.