Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
- name: Setup mdBook
uses: peaceiris/actions-mdbook@adeb05db28a0c0004681db83893d56c0388ea9ea # v1.2.0
with:
mdbook-version: '0.4.52'
mdbook-version: '0.5.1'

- name: Install mdbook-katex and mdbook-pdf
run: cargo install mdbook-katex mdbook-pdf
run: cargo install mdbook-katex@0.10.0-alpha mdbook-pdf

- name: Install mdbook-pdf-outline
run: pip3 install mdbook-pdf-outline
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,19 @@
with:
persist-credentials: false
- uses: ./.github/actions/prepare
# Build with stable so the .rmeta files match what mdBook expects.
- uses: dtolnay/rust-toolchain@stable
id: toolchain
- run: rustup override set "${TOOLCHAIN}"
shell: sh
env:
TOOLCHAIN: ${{steps.toolchain.outputs.name}}
- name: cargo build
run: cargo build
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
uses: peaceiris/actions-mdbook@adeb05db28a0c0004681db83893d56c0388ea9ea # v1.2.0
with:
mdbook-version: '0.4.5'
mdbook-version: '0.5.1'
- name: Test halo2 book
run: mdbook test -L target/debug/deps book/

Expand Down
1 change: 0 additions & 1 deletion book/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ authors = [
"Ying Tong Lai",
]
language = "en"
multilingual = false
src = "src"
title = "The halo2 Book"

Expand Down
4 changes: 2 additions & 2 deletions book/src/design/gadgets/ecc/addition.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ So we get the constraints:
and so cannot be used with arbitrary inputs.
- $(y_r + y_q) \cdot (x_p - x_q) - (y_p - y_q) \cdot (x_q - x_r) = 0.$

### Constraints <a name="incomplete-addition-constraints">
### Constraints <a name="incomplete-addition-constraints"></a>

$$
\begin{array}{|c|l|}
Expand Down Expand Up @@ -99,7 +99,7 @@ $\hspace{1em}
\end{array}
$

### Constraints <a name="complete-addition-constraints">
### Constraints <a name="complete-addition-constraints"></a>

$$
\begin{array}{|c|lcl|l|}
Expand Down
10 changes: 5 additions & 5 deletions book/src/design/gadgets/ecc/var-base-scalar-mul.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ $$

For each $hi$ and $lo$ half, we have three sets of gates. Note that $i$ is going from $255..=3$; $i$ is NOT indexing the rows.

### $q_1 = 1$ <a name="incomplete-first-row-gate">
### $q_1 = 1$ <a name="incomplete-first-row-gate"></a>
This gate is only used on the first row (before the for loop). We check that $\lambda_1, \lambda_2$ are initialized to values consistent with the initial $y_A.$
$$
\begin{array}{|c|l|}
Expand All @@ -194,7 +194,7 @@ y_{A,n}^\text{witnessed} &\text{ is witnessed.}
\end{aligned}
$$

### $q_2 = 1$ <a name="incomplete-main-loop-gate">
### $q_2 = 1$ <a name="incomplete-main-loop-gate"></a>
This gate is used on all rows corresponding to the for loop except the last.

$$
Expand All @@ -218,7 +218,7 @@ y_{A,i-1} &= \frac{(\lambda_{1,i-1} + \lambda_{2,i-1}) \cdot (x_{A,i-1} - (\lamb
\end{aligned}
$$

### $q_3 = 1$ <a name="incomplete-last-row-gate">
### $q_3 = 1$ <a name="incomplete-last-row-gate"></a>
This gate is used on the final iteration of the for loop, handling the special case where we check that the output $y_A$ has been witnessed correctly.
$$
\begin{array}{|c|l|}
Expand Down Expand Up @@ -261,7 +261,7 @@ x_A & y_A & x_q & y_q & \lambda_2 & \alpha_2 & \beta_2 & \gamma_2 & \delta_2 & y
\end{array}
$$

### Constraints <a name="complete-gate">
### Constraints <a name="complete-gate"></a>

In addition to the complete addition constraints, we define the following gate:

Expand All @@ -287,7 +287,7 @@ x_T & y_T & x_r & y_r & & & & & & z_0 & 0 \\\
\end{array}
$$

### Constraints <a name="lsb-gate">
### Constraints <a name="lsb-gate"></a>

$$
\begin{array}{|c|l|}
Expand Down
Loading